mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#11799 Add support for user defined 3D View
From the View menu, add Store and Apply User Defined View Show Apply User Defined View in the View toolbar Rename Look Down -> Top View and Look Up -> Bottom View Update keyboard shortcuts to new naming
This commit is contained in:
@@ -406,13 +406,13 @@ void RiuMainWindow::createActions()
|
||||
m_viewFromWest->setToolTip( "Look East (Ctrl+Alt+E)" );
|
||||
caf::CmdFeature::applyShortcutWithHintToAction( m_viewFromWest, QKeySequence( tr( "Ctrl+Alt+E" ) ) );
|
||||
|
||||
m_viewFromAbove = new QAction( QIcon( ":/DownView.svg" ), "Look Down", this );
|
||||
m_viewFromAbove->setToolTip( "Look Down (Ctrl+Alt+D)" );
|
||||
caf::CmdFeature::applyShortcutWithHintToAction( m_viewFromAbove, QKeySequence( tr( "Ctrl+Alt+D" ) ) );
|
||||
m_viewFromAbove = new QAction( QIcon( ":/DownView.svg" ), "Top View", this );
|
||||
m_viewFromAbove->setToolTip( "Top View (Ctrl+Alt+T)" );
|
||||
caf::CmdFeature::applyShortcutWithHintToAction( m_viewFromAbove, QKeySequence( tr( "Ctrl+Alt+T" ) ) );
|
||||
|
||||
m_viewFromBelow = new QAction( QIcon( ":/UpView.svg" ), "Look Up", this );
|
||||
m_viewFromBelow->setToolTip( "Look Up (Ctrl+Alt+U)" );
|
||||
caf::CmdFeature::applyShortcutWithHintToAction( m_viewFromBelow, QKeySequence( tr( "Ctrl+Alt+U" ) ) );
|
||||
m_viewFromBelow = new QAction( QIcon( ":/UpView.svg" ), "Bottom View", this );
|
||||
m_viewFromBelow->setToolTip( "Bottom View (Ctrl+Alt+B)" );
|
||||
caf::CmdFeature::applyShortcutWithHintToAction( m_viewFromBelow, QKeySequence( tr( "Ctrl+Alt+B" ) ) );
|
||||
|
||||
connect( m_viewFromNorth, SIGNAL( triggered() ), SLOT( slotViewFromNorth() ) );
|
||||
connect( m_viewFromSouth, SIGNAL( triggered() ), SLOT( slotViewFromSouth() ) );
|
||||
@@ -532,6 +532,9 @@ void RiuMainWindow::createMenus()
|
||||
viewMenu->addAction( m_viewFromEast );
|
||||
viewMenu->addAction( m_viewFromBelow );
|
||||
viewMenu->addAction( m_viewFromAbove );
|
||||
viewMenu->addSeparator();
|
||||
viewMenu->addAction( cmdFeatureMgr->action( "RicApplyUserDefinedCameraFeature" ) );
|
||||
viewMenu->addAction( cmdFeatureMgr->action( "RicStoreUserDefinedCameraFeature" ) );
|
||||
|
||||
connect( viewMenu, SIGNAL( aboutToShow() ), SLOT( slotRefreshViewActions() ) );
|
||||
|
||||
@@ -640,6 +643,7 @@ void RiuMainWindow::createToolBars()
|
||||
toolbar->addAction( m_viewFromWest );
|
||||
toolbar->addAction( m_viewFromAbove );
|
||||
toolbar->addAction( m_viewFromBelow );
|
||||
toolbar->addAction( cmdFeatureMgr->action( "RicApplyUserDefinedCameraFeature" ) );
|
||||
|
||||
QLabel* scaleLabel = new QLabel( toolbar );
|
||||
scaleLabel->setText( "Scale" );
|
||||
@@ -968,7 +972,9 @@ void RiuMainWindow::slotRefreshViewActions()
|
||||
commandIds << "RicLinkVisibleViewsFeature"
|
||||
<< "RicTileWindowsFeature"
|
||||
<< "RicTogglePerspectiveViewFeature"
|
||||
<< "RicViewZoomAllFeature";
|
||||
<< "RicViewZoomAllFeature"
|
||||
<< "RicApplyUserDefinedCameraFeature"
|
||||
<< "RicStoreUserDefinedCameraFeature";
|
||||
|
||||
caf::CmdFeatureManager::instance()->refreshEnabledState( commandIds );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user