mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Plot Template updates (#9002)
* Ensemble plot templates now have .erpt extension and new icon * Default plot templates are given a checkmark overlay on the icon * Context menu has been cleaned up a bit * Old default template is really just the last used template. Rename it. * Add max. recursive depth setting in preferences for plot template searches * Only create plots based on correct template type when importing ensembles or single cases * Support creating new plot from template explorer * Update last used template when creating a new plot from a template
This commit is contained in:
@@ -213,13 +213,12 @@ RiaPreferences::RiaPreferences()
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_plotTemplateFolders, "plotTemplateFolders", "Plot Template Folder(s)" );
|
||||
m_plotTemplateFolders.uiCapability()->setUiEditorTypeName( caf::PdmUiFilePathEditor::uiEditorTypeName() );
|
||||
CAF_PDM_InitField( &m_searchPlotTemplateFoldersRecursively,
|
||||
"SearchPlotTemplateFoldersRecursively",
|
||||
true,
|
||||
"Search Plot Templates Recursively" );
|
||||
caf::PdmUiNativeCheckBoxEditor::configureFieldForEditor( &m_searchPlotTemplateFoldersRecursively );
|
||||
CAF_PDM_InitField( &m_maxPlotTemplateFoldersDepth,
|
||||
"MaxPlotTemplateFoldersDepth",
|
||||
2,
|
||||
"Maximum Plot Template Folder Search Depth" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_defaultPlotTemplate, "defaultPlotTemplate", "Default Plot Template" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_lastUsedPlotTemplate, "defaultPlotTemplate", "Default Plot Template" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_pageSize, "pageSize", "Page Size" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_pageOrientation, "pageOrientation", "Page Orientation" );
|
||||
@@ -383,7 +382,7 @@ void RiaPreferences::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering&
|
||||
|
||||
caf::PdmUiGroup* group = summaryGrp->addNewGroup( "Plot Templates" );
|
||||
group->add( &m_plotTemplateFolders );
|
||||
group->add( &m_searchPlotTemplateFoldersRecursively );
|
||||
group->add( &m_maxPlotTemplateFoldersDepth );
|
||||
|
||||
caf::PdmUiGroup* generalGrp = uiOrdering.addNewGroup( "General" );
|
||||
|
||||
@@ -671,9 +670,9 @@ QString RiaPreferences::dateTimeFormat( RiaDefines::DateFormatComponents dateCom
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiaPreferences::searchPlotTemplateFoldersRecursively() const
|
||||
int RiaPreferences::maxPlotTemplateFoldersDepth() const
|
||||
{
|
||||
return m_searchPlotTemplateFoldersRecursively();
|
||||
return m_maxPlotTemplateFoldersDepth();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -714,17 +713,17 @@ void RiaPreferences::appendPlotTemplateFolders( const QString& folder )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaPreferences::defaultPlotTemplateAbsolutePath() const
|
||||
QString RiaPreferences::lastUsedPlotTemplateAbsolutePath() const
|
||||
{
|
||||
return m_defaultPlotTemplate().path();
|
||||
return m_lastUsedPlotTemplate().path();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaPreferences::setDefaultPlotTemplatePath( const QString& templatePath )
|
||||
void RiaPreferences::setLastUsedPlotTemplatePath( const QString& templatePath )
|
||||
{
|
||||
m_defaultPlotTemplate = templatePath;
|
||||
m_lastUsedPlotTemplate = templatePath;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user