mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#6516 Add user options for grid and info box
This commit is contained in:
parent
59bc8b1f43
commit
f72d271ea9
@ -226,6 +226,12 @@ RiaPreferences::RiaPreferences( void )
|
|||||||
CAF_PDM_InitField( &m_enableFaultsByDefault, "enableFaultsByDefault", true, "Enable Faults By Default", "", "", "" );
|
CAF_PDM_InitField( &m_enableFaultsByDefault, "enableFaultsByDefault", true, "Enable Faults By Default", "", "", "" );
|
||||||
m_enableFaultsByDefault.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
|
m_enableFaultsByDefault.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
|
||||||
|
|
||||||
|
CAF_PDM_InitField( &m_showInfoBox, "showInfoBox", true, "Show Info Box in New Projects", "", "", "" );
|
||||||
|
m_showInfoBox.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
|
||||||
|
|
||||||
|
CAF_PDM_InitField( &m_showGridBox, "showGridBox", true, "Show Grid Box in New Projects", "", "", "" );
|
||||||
|
m_showInfoBox.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
|
||||||
|
|
||||||
CAF_PDM_InitFieldNoDefault( &lastUsedProjectFileName, "lastUsedProjectFileName", "Last Used Project File", "", "", "" );
|
CAF_PDM_InitFieldNoDefault( &lastUsedProjectFileName, "lastUsedProjectFileName", "Last Used Project File", "", "", "" );
|
||||||
lastUsedProjectFileName.uiCapability()->setUiHidden( true );
|
lastUsedProjectFileName.uiCapability()->setUiHidden( true );
|
||||||
|
|
||||||
@ -425,7 +431,8 @@ void RiaPreferences::defineEditorAttribute( const caf::PdmFieldHandle* field,
|
|||||||
field == &m_showProjectChangedDialog || field == &m_searchPlotTemplateFoldersRecursively ||
|
field == &m_showProjectChangedDialog || field == &m_searchPlotTemplateFoldersRecursively ||
|
||||||
field == &m_showLegendBackground || field == &m_showSummaryTimeAsLongString ||
|
field == &m_showLegendBackground || field == &m_showSummaryTimeAsLongString ||
|
||||||
field == &m_showViewIdInProjectTree || field == &m_useMultipleThreadsWhenLoadingSummaryData ||
|
field == &m_showViewIdInProjectTree || field == &m_useMultipleThreadsWhenLoadingSummaryData ||
|
||||||
field == &m_enableFaultsByDefault || field == &m_showProgressBar || field == &m_openExportedPdfInViewer )
|
field == &m_enableFaultsByDefault || field == &m_showProgressBar || field == &m_openExportedPdfInViewer ||
|
||||||
|
field == &m_showInfoBox || field == &m_showGridBox )
|
||||||
{
|
{
|
||||||
caf::PdmUiCheckBoxEditorAttribute* myAttr = dynamic_cast<caf::PdmUiCheckBoxEditorAttribute*>( attribute );
|
caf::PdmUiCheckBoxEditorAttribute* myAttr = dynamic_cast<caf::PdmUiCheckBoxEditorAttribute*>( attribute );
|
||||||
if ( myAttr )
|
if ( myAttr )
|
||||||
@ -472,8 +479,11 @@ void RiaPreferences::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering&
|
|||||||
viewsGroup->add( &m_defaultMeshModeType );
|
viewsGroup->add( &m_defaultMeshModeType );
|
||||||
viewsGroup->add( &m_navigationPolicy );
|
viewsGroup->add( &m_navigationPolicy );
|
||||||
viewsGroup->add( &m_defaultScaleFactorZ );
|
viewsGroup->add( &m_defaultScaleFactorZ );
|
||||||
|
|
||||||
viewsGroup->add( &m_showLegendBackground );
|
viewsGroup->add( &m_showLegendBackground );
|
||||||
viewsGroup->add( &m_enableFaultsByDefault );
|
viewsGroup->add( &m_enableFaultsByDefault, {false, 1} );
|
||||||
|
viewsGroup->add( &m_showInfoBox );
|
||||||
|
viewsGroup->add( &m_showGridBox, {false, 1} );
|
||||||
|
|
||||||
caf::PdmUiGroup* otherGroup = uiOrdering.addNewGroup( "Other" );
|
caf::PdmUiGroup* otherGroup = uiOrdering.addNewGroup( "Other" );
|
||||||
otherGroup->add( &ssihubAddress );
|
otherGroup->add( &ssihubAddress );
|
||||||
@ -1061,6 +1071,22 @@ bool RiaPreferences::showLegendBackground() const
|
|||||||
return m_showLegendBackground();
|
return m_showLegendBackground();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
bool RiaPreferences::showInfoBox() const
|
||||||
|
{
|
||||||
|
return m_showInfoBox();
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
bool RiaPreferences::showGridBox() const
|
||||||
|
{
|
||||||
|
return m_showGridBox();
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -125,6 +125,8 @@ public:
|
|||||||
RiaGuiApplication::RINavigationPolicy navigationPolicy() const;
|
RiaGuiApplication::RINavigationPolicy navigationPolicy() const;
|
||||||
int defaultScaleFactorZ() const;
|
int defaultScaleFactorZ() const;
|
||||||
bool showLegendBackground() const;
|
bool showLegendBackground() const;
|
||||||
|
bool showInfoBox() const;
|
||||||
|
bool showGridBox() const;
|
||||||
|
|
||||||
public: // Pdm Fields
|
public: // Pdm Fields
|
||||||
caf::PdmField<bool> enableGrpcServer;
|
caf::PdmField<bool> enableGrpcServer;
|
||||||
@ -231,6 +233,8 @@ private:
|
|||||||
caf::PdmField<int> m_defaultScaleFactorZ;
|
caf::PdmField<int> m_defaultScaleFactorZ;
|
||||||
caf::PdmField<bool> m_showLegendBackground;
|
caf::PdmField<bool> m_showLegendBackground;
|
||||||
caf::PdmField<bool> m_enableFaultsByDefault;
|
caf::PdmField<bool> m_enableFaultsByDefault;
|
||||||
|
caf::PdmField<bool> m_showInfoBox;
|
||||||
|
caf::PdmField<bool> m_showGridBox;
|
||||||
|
|
||||||
QStringList m_tabNames;
|
QStringList m_tabNames;
|
||||||
};
|
};
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
#include "Rim3dOverlayInfoConfig.h"
|
#include "Rim3dOverlayInfoConfig.h"
|
||||||
|
|
||||||
|
#include "RiaPreferences.h"
|
||||||
#include "RiaQDateTimeTools.h"
|
#include "RiaQDateTimeTools.h"
|
||||||
|
|
||||||
#include "RicGridStatisticsDialog.h"
|
#include "RicGridStatisticsDialog.h"
|
||||||
@ -105,6 +106,7 @@ Rim3dOverlayInfoConfig::Rim3dOverlayInfoConfig()
|
|||||||
|
|
||||||
CAF_PDM_InitField( &m_active, "Active", true, "Active", "", "", "" );
|
CAF_PDM_InitField( &m_active, "Active", true, "Active", "", "", "" );
|
||||||
m_active.uiCapability()->setUiHidden( true );
|
m_active.uiCapability()->setUiHidden( true );
|
||||||
|
m_active = RiaPreferences::current()->showInfoBox();
|
||||||
|
|
||||||
CAF_PDM_InitField( &m_showAnimProgress, "ShowAnimProgress", true, "Animation progress", "", "", "" );
|
CAF_PDM_InitField( &m_showAnimProgress, "ShowAnimProgress", true, "Animation progress", "", "", "" );
|
||||||
CAF_PDM_InitField( &m_showCaseInfo, "ShowInfoText", true, "Case Info", "", "", "" );
|
CAF_PDM_InitField( &m_showCaseInfo, "ShowInfoText", true, "Case Info", "", "", "" );
|
||||||
|
@ -136,7 +136,13 @@ Rim3dView::Rim3dView( void )
|
|||||||
CAF_PDM_InitField( &meshMode, "MeshMode", defaultMeshType, "Grid Lines", "", "", "" );
|
CAF_PDM_InitField( &meshMode, "MeshMode", defaultMeshType, "Grid Lines", "", "", "" );
|
||||||
CAF_PDM_InitFieldNoDefault( &surfaceMode, "SurfaceMode", "Grid Surface", "", "", "" );
|
CAF_PDM_InitFieldNoDefault( &surfaceMode, "SurfaceMode", "Grid Surface", "", "", "" );
|
||||||
|
|
||||||
CAF_PDM_InitScriptableField( &m_showGridBox, "ShowGridBox", true, "Show Grid Box", "", "", "" );
|
CAF_PDM_InitScriptableField( &m_showGridBox,
|
||||||
|
"ShowGridBox",
|
||||||
|
RiaPreferences::current()->showGridBox(),
|
||||||
|
"Show Grid Box",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"" );
|
||||||
|
|
||||||
CAF_PDM_InitScriptableField( &m_disableLighting,
|
CAF_PDM_InitScriptableField( &m_disableLighting,
|
||||||
"DisableLighting",
|
"DisableLighting",
|
||||||
|
Loading…
Reference in New Issue
Block a user