mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4982 Preferences : Move Show 3D information to development tab
This commit is contained in:
parent
2aa704b18a
commit
0b3e5ecf0c
@ -555,14 +555,6 @@ RiaGuiApplication::RINavigationPolicy RiaGuiApplication::navigationPolicy() cons
|
||||
return m_preferences->navigationPolicy();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiaGuiApplication::showPerformanceInfo() const
|
||||
{
|
||||
return m_preferences->showHud;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -1529,7 +1521,7 @@ void RiaGuiApplication::applyGuiPreferences( const RiaPreferences* oldPreference
|
||||
if ( m_activeReservoirView && m_activeReservoirView->viewer() )
|
||||
{
|
||||
m_activeReservoirView->viewer()->updateNavigationPolicy();
|
||||
m_activeReservoirView->viewer()->enablePerfInfoHud( m_preferences->showHud() );
|
||||
m_activeReservoirView->viewer()->enablePerfInfoHud( m_preferences->show3dInformation() );
|
||||
}
|
||||
|
||||
if ( useShaders() )
|
||||
|
@ -100,7 +100,6 @@ public:
|
||||
std::vector<QString> gridFileNames,
|
||||
const QString& snapshotFolderName );
|
||||
bool useShaders() const;
|
||||
bool showPerformanceInfo() const;
|
||||
|
||||
RINavigationPolicy navigationPolicy() const;
|
||||
|
||||
|
@ -179,8 +179,8 @@ RiaPreferences::RiaPreferences( void )
|
||||
|
||||
CAF_PDM_InitField( &m_useShaders, "useShaders", true, "Use Shaders", "", "", "" );
|
||||
m_useShaders.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
|
||||
CAF_PDM_InitField( &showHud, "showHud", false, "Show 3D Information", "", "", "" );
|
||||
showHud.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
|
||||
CAF_PDM_InitField( &m_showHud, "showHud", false, "Show 3D Information", "", "", "" );
|
||||
m_showHud.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
|
||||
CAF_PDM_InitField( &m_appendClassNameToUiText, "appendClassNameToUiText", false, "Show Class Names", "", "", "" );
|
||||
m_appendClassNameToUiText.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
|
||||
CAF_PDM_InitField( &m_appendFieldKeywordToToolTipText,
|
||||
@ -360,12 +360,12 @@ void RiaPreferences::defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
}
|
||||
|
||||
if ( field == &octaveShowHeaderInfoWhenExecutingScripts || field == &autocomputeDepthRelatedProperties ||
|
||||
field == &loadAndShowSoil || field == &m_useShaders || field == &showHud || field == &m_appendClassNameToUiText ||
|
||||
field == &m_appendFieldKeywordToToolTipText || field == &m_showTestToolbar ||
|
||||
field == &m_includeFractureDebugInfoFile || field == &showLasCurveWithoutTvdWarning ||
|
||||
field == &holoLensDisableCertificateVerification || field == &m_showProjectChangedDialog ||
|
||||
field == &m_searchPlotTemplateFoldersRecursively || field == &showLegendBackground ||
|
||||
field == &m_showSummaryTimeAsLongString || field == &m_showViewIdInProjectTree )
|
||||
field == &loadAndShowSoil || field == &m_useShaders || field == &m_showHud ||
|
||||
field == &m_appendClassNameToUiText || field == &m_appendFieldKeywordToToolTipText ||
|
||||
field == &m_showTestToolbar || field == &m_includeFractureDebugInfoFile ||
|
||||
field == &showLasCurveWithoutTvdWarning || field == &holoLensDisableCertificateVerification ||
|
||||
field == &m_showProjectChangedDialog || field == &m_searchPlotTemplateFoldersRecursively ||
|
||||
field == &showLegendBackground || field == &m_showSummaryTimeAsLongString || field == &m_showViewIdInProjectTree )
|
||||
{
|
||||
caf::PdmUiCheckBoxEditorAttribute* myAttr = dynamic_cast<caf::PdmUiCheckBoxEditorAttribute*>( attribute );
|
||||
if ( myAttr )
|
||||
@ -413,7 +413,6 @@ void RiaPreferences::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering&
|
||||
viewsGroup->add( &navigationPolicy );
|
||||
viewsGroup->add( &defaultScaleFactorZ );
|
||||
viewsGroup->add( &showLegendBackground );
|
||||
viewsGroup->add( &showHud );
|
||||
|
||||
caf::PdmUiGroup* otherGroup = uiOrdering.addNewGroup( "Other" );
|
||||
otherGroup->add( &ssihubAddress );
|
||||
@ -492,6 +491,7 @@ void RiaPreferences::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering&
|
||||
uiOrdering.add( &m_holoLensExportFolder );
|
||||
|
||||
uiOrdering.add( &m_useShaders );
|
||||
uiOrdering.add( &m_showHud );
|
||||
}
|
||||
|
||||
uiOrdering.skipRemainingFields( true );
|
||||
@ -716,6 +716,14 @@ bool RiaPreferences::useShaders() const
|
||||
return m_useShaders();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiaPreferences::show3dInformation() const
|
||||
{
|
||||
return RiaApplication::enableDevelopmentFeatures() && m_showHud();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -82,6 +82,7 @@ public:
|
||||
bool showProjectChangedDialog() const;
|
||||
QString holoLensExportFolder() const;
|
||||
bool useShaders() const;
|
||||
bool show3dInformation() const;
|
||||
|
||||
const QString& dateFormat() const;
|
||||
const QString& timeFormat() const;
|
||||
@ -130,8 +131,6 @@ public: // Pdm Fields
|
||||
|
||||
caf::PdmField<bool> showLegendBackground;
|
||||
|
||||
caf::PdmField<bool> showHud;
|
||||
|
||||
caf::PdmField<QString> lastUsedProjectFileName;
|
||||
|
||||
caf::PdmField<bool> autocomputeDepthRelatedProperties;
|
||||
@ -167,10 +166,12 @@ private:
|
||||
|
||||
private:
|
||||
caf::PdmChildField<RifReaderSettings*> m_readerSettings;
|
||||
caf::PdmField<bool> m_appendClassNameToUiText;
|
||||
caf::PdmField<bool> m_appendFieldKeywordToToolTipText;
|
||||
caf::PdmField<bool> m_showViewIdInProjectTree;
|
||||
caf::PdmField<bool> m_useShaders;
|
||||
|
||||
caf::PdmField<bool> m_appendClassNameToUiText;
|
||||
caf::PdmField<bool> m_appendFieldKeywordToToolTipText;
|
||||
caf::PdmField<bool> m_showViewIdInProjectTree;
|
||||
caf::PdmField<bool> m_useShaders;
|
||||
caf::PdmField<bool> m_showHud;
|
||||
|
||||
caf::PdmField<bool> m_showProjectChangedDialog;
|
||||
|
||||
|
@ -265,7 +265,7 @@ void Rim3dView::updateViewWidgetAfterCreation()
|
||||
this->onResetLegendsInViewer();
|
||||
|
||||
m_viewer->updateNavigationPolicy();
|
||||
m_viewer->enablePerfInfoHud( RiaGuiApplication::instance()->showPerformanceInfo() );
|
||||
m_viewer->enablePerfInfoHud( RiaGuiApplication::instance()->preferences()->show3dInformation() );
|
||||
|
||||
m_viewer->mainCamera()->setViewMatrix( m_cameraPosition );
|
||||
m_viewer->setPointOfInterest( m_cameraPointOfInterest() );
|
||||
|
Loading…
Reference in New Issue
Block a user