#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:
Magne Sjaastad
2025-01-27 07:38:19 +01:00
parent ca0179d118
commit 41aed338ab
9 changed files with 347 additions and 7 deletions

View File

@@ -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 );
}