mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4590 Preferences : Improve definition and use of tab names in dialog
This commit is contained in:
parent
c30b34511b
commit
dab424ace3
@ -157,15 +157,6 @@ RiaPreferences::RiaPreferences(void)
|
|||||||
|
|
||||||
CAF_PDM_InitFieldNoDefault(&m_readerSettings, "readerSettings", "Reader Settings", "", "", "");
|
CAF_PDM_InitFieldNoDefault(&m_readerSettings, "readerSettings", "Reader Settings", "", "", "");
|
||||||
m_readerSettings = new RifReaderSettings;
|
m_readerSettings = new RifReaderSettings;
|
||||||
|
|
||||||
m_tabNames << "General";
|
|
||||||
m_tabNames << "Eclipse";
|
|
||||||
m_tabNames << "Scripting";
|
|
||||||
m_tabNames << "Export";
|
|
||||||
if (RiaApplication::enableDevelopmentFeatures())
|
|
||||||
{
|
|
||||||
m_tabNames << "System";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -233,7 +224,7 @@ void RiaPreferences::defineEditorAttribute(const caf::PdmFieldHandle* field, QSt
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RiaPreferences::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
|
void RiaPreferences::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
|
||||||
{
|
{
|
||||||
if (uiConfigName == m_tabNames[0])
|
if (uiConfigName == RiaPreferences::tabNameGeneral())
|
||||||
{
|
{
|
||||||
caf::PdmUiGroup* colorGroup = uiOrdering.addNewGroup("Default Colors");
|
caf::PdmUiGroup* colorGroup = uiOrdering.addNewGroup("Default Colors");
|
||||||
colorGroup->add(&defaultViewerBackgroundColor);
|
colorGroup->add(&defaultViewerBackgroundColor);
|
||||||
@ -260,7 +251,7 @@ void RiaPreferences::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering&
|
|||||||
otherGroup->add(&showLasCurveWithoutTvdWarning);
|
otherGroup->add(&showLasCurveWithoutTvdWarning);
|
||||||
otherGroup->add(&holoLensDisableCertificateVerification);
|
otherGroup->add(&holoLensDisableCertificateVerification);
|
||||||
}
|
}
|
||||||
else if (uiConfigName == m_tabNames[1])
|
else if (uiConfigName == RiaPreferences::tabNameEclipse())
|
||||||
{
|
{
|
||||||
caf::PdmUiGroup* newCaseBehaviourGroup = uiOrdering.addNewGroup("Behavior When Loading Data");
|
caf::PdmUiGroup* newCaseBehaviourGroup = uiOrdering.addNewGroup("Behavior When Loading Data");
|
||||||
newCaseBehaviourGroup->add(&autocomputeDepthRelatedProperties);
|
newCaseBehaviourGroup->add(&autocomputeDepthRelatedProperties);
|
||||||
@ -291,7 +282,7 @@ void RiaPreferences::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering&
|
|||||||
summaryPlotsGroup->add(&defaultSummaryCurvesTextFilter);
|
summaryPlotsGroup->add(&defaultSummaryCurvesTextFilter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (uiConfigName == m_tabNames[2])
|
else if (uiConfigName == RiaPreferences::tabNameScripting())
|
||||||
{
|
{
|
||||||
caf::PdmUiGroup* octaveGroup = uiOrdering.addNewGroup("Octave");
|
caf::PdmUiGroup* octaveGroup = uiOrdering.addNewGroup("Octave");
|
||||||
octaveGroup->add(&octaveExecutable);
|
octaveGroup->add(&octaveExecutable);
|
||||||
@ -307,11 +298,11 @@ void RiaPreferences::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering&
|
|||||||
scriptGroup->add(&scriptDirectories);
|
scriptGroup->add(&scriptDirectories);
|
||||||
scriptGroup->add(&scriptEditorExecutable);
|
scriptGroup->add(&scriptEditorExecutable);
|
||||||
}
|
}
|
||||||
else if (uiConfigName == m_tabNames[3])
|
else if (uiConfigName == RiaPreferences::tabNameExport())
|
||||||
{
|
{
|
||||||
uiOrdering.add(&csvTextExportFieldSeparator);
|
uiOrdering.add(&csvTextExportFieldSeparator);
|
||||||
}
|
}
|
||||||
else if (RiaApplication::enableDevelopmentFeatures() && uiConfigName == m_tabNames[4])
|
else if (RiaApplication::enableDevelopmentFeatures() && uiConfigName == RiaPreferences::tabNameSystem())
|
||||||
{
|
{
|
||||||
uiOrdering.add(&m_appendClassNameToUiText);
|
uiOrdering.add(&m_appendClassNameToUiText);
|
||||||
uiOrdering.add(&m_appendFieldKeywordToToolTipText);
|
uiOrdering.add(&m_appendFieldKeywordToToolTipText);
|
||||||
@ -369,12 +360,73 @@ void RiaPreferences::initAfterRead()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
QString RiaPreferences::tabNameGeneral()
|
||||||
|
{
|
||||||
|
return "General";
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
QString RiaPreferences::tabNameEclipse()
|
||||||
|
{
|
||||||
|
return "Eclipse";
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
QString RiaPreferences::tabNameEclipseSummary()
|
||||||
|
{
|
||||||
|
return "Summary";
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
QString RiaPreferences::tabNameScripting()
|
||||||
|
{
|
||||||
|
return "Scripting";
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
QString RiaPreferences::tabNameExport()
|
||||||
|
{
|
||||||
|
return "Export";
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
QString RiaPreferences::tabNameSystem()
|
||||||
|
{
|
||||||
|
return "System";
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
QStringList RiaPreferences::tabNames()
|
QStringList RiaPreferences::tabNames()
|
||||||
{
|
{
|
||||||
return m_tabNames;
|
QStringList names;
|
||||||
|
|
||||||
|
names << tabNameGeneral();
|
||||||
|
names << tabNameEclipse();
|
||||||
|
names << tabNameEclipseSummary();
|
||||||
|
names << tabNameScripting();
|
||||||
|
names << tabNameExport();
|
||||||
|
|
||||||
|
if (RiaApplication::enableDevelopmentFeatures())
|
||||||
|
{
|
||||||
|
names << tabNameSystem();
|
||||||
|
}
|
||||||
|
|
||||||
|
return names;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -121,6 +121,14 @@ protected:
|
|||||||
QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) override;
|
QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) override;
|
||||||
void initAfterRead() override;
|
void initAfterRead() override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
static QString tabNameGeneral();
|
||||||
|
static QString tabNameEclipse();
|
||||||
|
static QString tabNameEclipseSummary();
|
||||||
|
static QString tabNameScripting();
|
||||||
|
static QString tabNameExport();
|
||||||
|
static QString tabNameSystem();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
caf::PdmChildField<RifReaderSettings*> m_readerSettings;
|
caf::PdmChildField<RifReaderSettings*> m_readerSettings;
|
||||||
caf::PdmField<bool> m_appendClassNameToUiText;
|
caf::PdmField<bool> m_appendClassNameToUiText;
|
||||||
@ -131,6 +139,4 @@ private:
|
|||||||
caf::PdmField<bool> m_showTestToolbar;
|
caf::PdmField<bool> m_showTestToolbar;
|
||||||
caf::PdmField<bool> m_includeFractureDebugInfoFile;
|
caf::PdmField<bool> m_includeFractureDebugInfoFile;
|
||||||
caf::PdmField<QString> m_holoLensExportFolder;
|
caf::PdmField<QString> m_holoLensExportFolder;
|
||||||
QStringList m_tabNames;
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user