mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#846 Mirrored relevant items to plot window menus
This commit is contained in:
@@ -143,13 +143,67 @@ void RiuMainPlotWindow::createActions()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuMainPlotWindow::createMenus()
|
||||
{
|
||||
caf::CmdFeatureManager* cmdFeatureMgr = caf::CmdFeatureManager::instance();
|
||||
|
||||
// File menu
|
||||
QMenu* fileMenu = new RiuToolTipMenu(menuBar());
|
||||
fileMenu->setTitle("&File");
|
||||
|
||||
menuBar()->addMenu(fileMenu);
|
||||
|
||||
fileMenu->addAction("Close", this, SLOT(close()));
|
||||
fileMenu->addAction(cmdFeatureMgr->action("RicOpenProjectFeature"));
|
||||
fileMenu->addAction(cmdFeatureMgr->action("RicOpenLastUsedFileFeature"));
|
||||
fileMenu->addSeparator();
|
||||
|
||||
QMenu* importMenu = fileMenu->addMenu("&Import");
|
||||
importMenu->addAction(cmdFeatureMgr->action("RicImportEclipseCaseFeature"));
|
||||
importMenu->addAction(cmdFeatureMgr->action("RicImportInputEclipseCaseFeature"));
|
||||
importMenu->addAction(cmdFeatureMgr->action("RicImportInputEclipseCaseOpmFeature"));
|
||||
importMenu->addAction(cmdFeatureMgr->action("RicCreateGridCaseGroupFeature"));
|
||||
importMenu->addSeparator();
|
||||
#ifdef USE_ODB_API
|
||||
importMenu->addAction(cmdFeatureMgr->action("RicImportGeoMechCaseFeature"));
|
||||
importMenu->addSeparator();
|
||||
#endif
|
||||
importMenu->addAction(cmdFeatureMgr->action("RicWellPathsImportFileFeature"));
|
||||
importMenu->addAction(cmdFeatureMgr->action("RicWellPathsImportSsihubFeature"));
|
||||
importMenu->addAction(cmdFeatureMgr->action("RicWellLogsImportFileFeature"));
|
||||
importMenu->addSeparator();
|
||||
importMenu->addAction(cmdFeatureMgr->action("RicImportFormationNamesFeature"));
|
||||
|
||||
fileMenu->addSeparator();
|
||||
fileMenu->addAction(cmdFeatureMgr->action("RicSaveProjectFeature"));
|
||||
fileMenu->addAction(cmdFeatureMgr->action("RicSaveProjectAsFeature"));
|
||||
|
||||
std::vector<QAction*> recentFileActions = RiaApplication::instance()->recentFileActions();
|
||||
for (auto act : recentFileActions)
|
||||
{
|
||||
fileMenu->addAction(act);
|
||||
}
|
||||
|
||||
fileMenu->addSeparator();
|
||||
fileMenu->addAction(cmdFeatureMgr->action("RicCloseProjectFeature"));
|
||||
fileMenu->addSeparator();
|
||||
fileMenu->addAction(cmdFeatureMgr->action("RicExitApplicationFeature"));
|
||||
|
||||
// Edit menu
|
||||
QMenu* editMenu = menuBar()->addMenu("&Edit");
|
||||
editMenu->addAction(cmdFeatureMgr->action("RicSnapshotViewToClipboardFeature"));
|
||||
|
||||
// View menu
|
||||
QMenu* viewMenu = menuBar()->addMenu("&View");
|
||||
viewMenu->addAction(cmdFeatureMgr->action("RicViewZoomAllFeature"));
|
||||
|
||||
// Windows menu
|
||||
m_windowMenu = menuBar()->addMenu("&Windows");
|
||||
connect(m_windowMenu, SIGNAL(aboutToShow()), SLOT(slotBuildWindowActions()));
|
||||
|
||||
// Help menu
|
||||
QMenu* helpMenu = menuBar()->addMenu("&Help");
|
||||
helpMenu->addAction(cmdFeatureMgr->action("RicHelpAboutFeature"));
|
||||
helpMenu->addAction(cmdFeatureMgr->action("RicHelpCommandLineFeature"));
|
||||
helpMenu->addSeparator();
|
||||
helpMenu->addAction(cmdFeatureMgr->action("RicHelpOpenUsersGuideFeature"));
|
||||
}
|
||||
|
||||
|
||||
@@ -162,23 +216,12 @@ void RiuMainPlotWindow::createToolBars()
|
||||
CVF_ASSERT(cmdFeatureMgr);
|
||||
|
||||
{
|
||||
// Snapshots
|
||||
QToolBar* toolbar = addToolBar(tr("View Snapshots"));
|
||||
QToolBar* toolbar = addToolBar(tr("Standard"));
|
||||
toolbar->setObjectName(toolbar->windowTitle());
|
||||
/*
|
||||
toolbar->addAction(m_snapshotToClipboard);
|
||||
toolbar->addAction(m_snapshotToFile);
|
||||
toolbar->addAction(m_snapshotAllViewsToFile);
|
||||
*/
|
||||
|
||||
toolbar->addAction(cmdFeatureMgr->action("RicSnapshotViewToClipboardFeature"));
|
||||
}
|
||||
|
||||
{
|
||||
// Snapshots
|
||||
QToolBar* toolbar = addToolBar(tr("View"));
|
||||
toolbar->setObjectName(toolbar->windowTitle());
|
||||
toolbar->addAction(cmdFeatureMgr->action("RicViewZoomAllFeature"));
|
||||
toolbar->addAction(cmdFeatureMgr->action("RicImportEclipseCaseFeature"));
|
||||
toolbar->addAction(cmdFeatureMgr->action("RicImportInputEclipseCaseFeature"));
|
||||
toolbar->addAction(cmdFeatureMgr->action("RicOpenProjectFeature"));
|
||||
toolbar->addAction(cmdFeatureMgr->action("RicSaveProjectFeature"));
|
||||
}
|
||||
|
||||
{
|
||||
@@ -187,6 +230,18 @@ void RiuMainPlotWindow::createToolBars()
|
||||
toolbar->addAction(cmdFeatureMgr->action("RicShowMainWindowFeature"));
|
||||
toolbar->addAction(cmdFeatureMgr->action("RicTilePlotWindowsFeature"));
|
||||
}
|
||||
|
||||
{
|
||||
QToolBar* toolbar = addToolBar(tr("View Snapshots"));
|
||||
toolbar->setObjectName(toolbar->windowTitle());
|
||||
toolbar->addAction(cmdFeatureMgr->action("RicSnapshotViewToClipboardFeature"));
|
||||
}
|
||||
|
||||
{
|
||||
QToolBar* toolbar = addToolBar(tr("View"));
|
||||
toolbar->setObjectName(toolbar->windowTitle());
|
||||
toolbar->addAction(cmdFeatureMgr->action("RicViewZoomAllFeature"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -446,7 +501,7 @@ void RiuMainPlotWindow::slotBuildWindowActions()
|
||||
QAction* closeAllSubWindowsAction = new QAction("Close All Windows", this);
|
||||
connect(closeAllSubWindowsAction, SIGNAL(triggered()), m_mdiArea, SLOT(closeAllSubWindows()));
|
||||
|
||||
m_windowMenu->addAction(caf::CmdFeatureManager::instance()->action("RicTileWindowsFeature"));
|
||||
m_windowMenu->addAction(caf::CmdFeatureManager::instance()->action("RicTilePlotWindowsFeature"));
|
||||
m_windowMenu->addAction(cascadeWindowsAction);
|
||||
m_windowMenu->addAction(closeAllSubWindowsAction);
|
||||
}
|
||||
|
||||
@@ -448,20 +448,14 @@ void RiuMainWindow::createToolBars()
|
||||
caf::CmdFeatureManager* cmdFeatureMgr = caf::CmdFeatureManager::instance();
|
||||
CVF_ASSERT(cmdFeatureMgr);
|
||||
|
||||
m_standardToolBar = addToolBar(tr("Standard"));
|
||||
m_standardToolBar->setObjectName(m_standardToolBar->windowTitle());
|
||||
|
||||
m_standardToolBar->addAction(cmdFeatureMgr->action("RicImportEclipseCaseFeature"));
|
||||
m_standardToolBar->addAction(cmdFeatureMgr->action("RicImportInputEclipseCaseFeature"));
|
||||
m_standardToolBar->addAction(cmdFeatureMgr->action("RicOpenProjectFeature"));
|
||||
m_standardToolBar->addAction(cmdFeatureMgr->action("RicSaveProjectFeature"));
|
||||
|
||||
// Snapshots
|
||||
m_snapshotToolbar = addToolBar(tr("View Snapshots"));
|
||||
m_snapshotToolbar->setObjectName(m_snapshotToolbar->windowTitle());
|
||||
m_snapshotToolbar->addAction(m_snapshotToClipboard);
|
||||
m_snapshotToolbar->addAction(m_snapshotToFile);
|
||||
m_snapshotToolbar->addAction(m_snapshotAllViewsToFile);
|
||||
{
|
||||
QToolBar* toolbar = addToolBar(tr("Standard"));
|
||||
toolbar->setObjectName(toolbar->windowTitle());
|
||||
toolbar->addAction(cmdFeatureMgr->action("RicImportEclipseCaseFeature"));
|
||||
toolbar->addAction(cmdFeatureMgr->action("RicImportInputEclipseCaseFeature"));
|
||||
toolbar->addAction(cmdFeatureMgr->action("RicOpenProjectFeature"));
|
||||
toolbar->addAction(cmdFeatureMgr->action("RicSaveProjectFeature"));
|
||||
}
|
||||
|
||||
{
|
||||
QToolBar* toolbar = addToolBar(tr("Window Management"));
|
||||
@@ -471,26 +465,37 @@ void RiuMainWindow::createToolBars()
|
||||
toolbar->addAction(cmdFeatureMgr->action("RicTileWindowsFeature"));
|
||||
}
|
||||
|
||||
{
|
||||
QToolBar* toolbar = addToolBar(tr("View Snapshots"));
|
||||
toolbar->setObjectName(toolbar->windowTitle());
|
||||
toolbar->addAction(m_snapshotToClipboard);
|
||||
toolbar->addAction(m_snapshotToFile);
|
||||
toolbar->addAction(m_snapshotAllViewsToFile);
|
||||
}
|
||||
|
||||
|
||||
// View toolbar
|
||||
m_viewToolBar = addToolBar(tr("View"));
|
||||
m_viewToolBar->setObjectName(m_viewToolBar->windowTitle());
|
||||
m_viewToolBar->addAction(cmdFeatureMgr->action("RicTogglePerspectiveViewFeature"));
|
||||
m_viewToolBar->addAction(m_zoomAll);
|
||||
m_viewToolBar->addAction(m_viewFromNorth);
|
||||
m_viewToolBar->addAction(m_viewFromSouth);
|
||||
m_viewToolBar->addAction(m_viewFromEast);
|
||||
m_viewToolBar->addAction(m_viewFromWest);
|
||||
m_viewToolBar->addAction(m_viewFromAbove);
|
||||
m_viewToolBar->addAction(m_viewFromBelow);
|
||||
{
|
||||
QToolBar* toolbar = addToolBar(tr("View"));
|
||||
toolbar->setObjectName(toolbar->windowTitle());
|
||||
toolbar->addAction(cmdFeatureMgr->action("RicTogglePerspectiveViewFeature"));
|
||||
toolbar->addAction(m_zoomAll);
|
||||
toolbar->addAction(m_viewFromNorth);
|
||||
toolbar->addAction(m_viewFromSouth);
|
||||
toolbar->addAction(m_viewFromEast);
|
||||
toolbar->addAction(m_viewFromWest);
|
||||
toolbar->addAction(m_viewFromAbove);
|
||||
toolbar->addAction(m_viewFromBelow);
|
||||
|
||||
QLabel* scaleLabel = new QLabel(m_viewToolBar);
|
||||
scaleLabel->setText("Scale");
|
||||
m_viewToolBar->addWidget(scaleLabel);
|
||||
QLabel* scaleLabel = new QLabel(toolbar);
|
||||
scaleLabel->setText("Scale");
|
||||
toolbar->addWidget(scaleLabel);
|
||||
|
||||
m_scaleFactor = new QSpinBox(m_viewToolBar);
|
||||
m_scaleFactor->setValue(0);
|
||||
m_viewToolBar->addWidget(m_scaleFactor);
|
||||
connect(m_scaleFactor, SIGNAL(valueChanged(int)), SLOT(slotScaleChanged(int)));
|
||||
m_scaleFactor = new QSpinBox(toolbar);
|
||||
m_scaleFactor->setValue(0);
|
||||
toolbar->addWidget(m_scaleFactor);
|
||||
connect(m_scaleFactor, SIGNAL(valueChanged(int)), SLOT(slotScaleChanged(int)));
|
||||
}
|
||||
|
||||
{
|
||||
QToolBar* dsToolBar = addToolBar(tr("Draw Style"));
|
||||
|
||||
@@ -165,15 +165,8 @@ private:
|
||||
QAction* m_showRegressionTestDialog;
|
||||
QAction* m_executePaintEventPerformanceTest;
|
||||
|
||||
// Animation
|
||||
caf::AnimationToolBar* m_animationToolBar;
|
||||
|
||||
// Toolbars
|
||||
QToolBar* m_viewToolBar;
|
||||
QToolBar* m_standardToolBar;
|
||||
QToolBar* m_snapshotToolbar;
|
||||
|
||||
|
||||
QMdiArea* m_mdiArea;
|
||||
RiuViewer* m_mainViewer;
|
||||
RiuResultInfoPanel* m_resultInfoPanel;
|
||||
|
||||
Reference in New Issue
Block a user