mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Merge pull request #4955 from OPM/summary-adjustments
Summary adjustments
This commit is contained in:
commit
856580699c
@ -353,14 +353,6 @@ void RiaPreferences::defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
myAttr->m_selectDirectory = true;
|
||||
myAttr->m_appendUiSelectedFolderToText = true;
|
||||
}
|
||||
else if ( field == &m_defaultPlotTemplate )
|
||||
{
|
||||
auto folders = plotTemplateFolders();
|
||||
if ( !folders.empty() )
|
||||
{
|
||||
myAttr->m_defaultPath = folders.back();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -463,7 +455,6 @@ void RiaPreferences::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering&
|
||||
caf::PdmUiGroup* group = uiOrdering.addNewGroup( "Plot Templates" );
|
||||
group->add( &m_plotTemplateFolders );
|
||||
group->add( &m_searchPlotTemplateFoldersRecursively );
|
||||
group->add( &m_defaultPlotTemplate );
|
||||
}
|
||||
else if ( uiConfigName == RiaPreferences::tabNameScripting() )
|
||||
{
|
||||
|
@ -58,8 +58,8 @@ void RicCreatePlotFromTemplateByShortcutFeature::onActionTriggered( bool isCheck
|
||||
auto mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
||||
|
||||
auto reply = QMessageBox::question( mainPlotWindow,
|
||||
QString( "No default plot template found." ),
|
||||
QString( "Do you want to define default plot template? " ),
|
||||
QString( "No last used plot template found." ),
|
||||
QString( "Do you want to select plot template? " ),
|
||||
QMessageBox::Yes | QMessageBox::No );
|
||||
|
||||
if ( reply == QMessageBox::No ) return;
|
||||
@ -68,8 +68,6 @@ void RicCreatePlotFromTemplateByShortcutFeature::onActionTriggered( bool isCheck
|
||||
if ( fileNameSelectedInUi.isEmpty() ) return;
|
||||
|
||||
fileName = fileNameSelectedInUi;
|
||||
RiaApplication::instance()->preferences()->setDefaultPlotTemplatePath( fileName );
|
||||
RiaApplication::instance()->preferences()->writePreferencesToApplicationStore();
|
||||
}
|
||||
|
||||
auto sumCases = RicSummaryPlotTemplateTools::selectedSummaryCases();
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaGuiApplication.h"
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaPreferences.h"
|
||||
#include "RiaSummaryCurveAnalyzer.h"
|
||||
|
||||
#include "RicSelectPlotTemplateUi.h"
|
||||
@ -330,11 +331,15 @@ QString RicSummaryPlotTemplateTools::selectPlotTemplatePath()
|
||||
RicSelectPlotTemplateUi* ui = RiaGuiApplication::instance()->project()->dialogData()->selectPlotTemplateUi();
|
||||
|
||||
caf::PdmUiPropertyViewDialog propertyDialog( plotwindow, ui, "Select Plot Template", "" );
|
||||
propertyDialog.resize( QSize( 400, 600 ) );
|
||||
|
||||
if ( propertyDialog.exec() == QDialog::Accepted && !ui->selectedPlotTemplates().empty() )
|
||||
{
|
||||
QString fileName = ui->selectedPlotTemplates().front()->absoluteFilePath();
|
||||
|
||||
RiaApplication::instance()->preferences()->setDefaultPlotTemplatePath( fileName );
|
||||
RiaApplication::instance()->preferences()->writePreferencesToApplicationStore();
|
||||
|
||||
return fileName;
|
||||
}
|
||||
|
||||
|
@ -853,7 +853,9 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection()
|
||||
{
|
||||
menuBuilder << "RicCreatePlotFromSelectionFeature";
|
||||
menuBuilder << "RicCreatePlotFromTemplateByShortcutFeature";
|
||||
appendPlotTemplateMenus( menuBuilder );
|
||||
|
||||
// TODO: Consider to remove plot template menus, only support dialog selection
|
||||
// appendPlotTemplateMenus( menuBuilder );
|
||||
}
|
||||
|
||||
menuBuilder << "Separator";
|
||||
|
@ -1304,8 +1304,6 @@ void RimProject::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, Q
|
||||
itemCollection->add( mainPlotCollection->saturationPressurePlotCollection() );
|
||||
}
|
||||
}
|
||||
|
||||
uiTreeOrdering.add( m_plotTemplateFolderItem() );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -203,8 +203,6 @@ RimSummaryPlot::RimSummaryPlot()
|
||||
CAF_PDM_InitField( &m_isAutoZoom_OBSOLETE, "AutoZoom", true, "Auto Zoom", "", "", "" );
|
||||
RiaFieldhandleTools::disableWriteAndSetFieldHidden( &m_isAutoZoom_OBSOLETE );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_plotTemplate, "PlotTemplate", "Template", "", "", "" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_textCurveSetEditor,
|
||||
"SummaryPlotFilterTextCurveSetEditor",
|
||||
"Text Filter Curve Creator",
|
||||
@ -1348,26 +1346,6 @@ QList<caf::PdmOptionItemInfo> RimSummaryPlot::calculateValueOptions( const caf::
|
||||
options.push_back( caf::PdmOptionItemInfo( text, value ) );
|
||||
}
|
||||
}
|
||||
else if ( fieldNeedingOptions == &m_plotTemplate )
|
||||
{
|
||||
options.push_back( caf::PdmOptionItemInfo( "None", nullptr ) );
|
||||
|
||||
auto rootPlotTemplate = RiaApplication::instance()->project()->rootPlotTemlateItem();
|
||||
if ( rootPlotTemplate )
|
||||
{
|
||||
std::vector<caf::PdmObject*> allTemplates;
|
||||
{
|
||||
RimPlotTemplateFileItem fileItem;
|
||||
rootPlotTemplate->descendantsIncludingThisFromClassKeyword( fileItem.classKeyword(), allTemplates );
|
||||
}
|
||||
|
||||
for ( auto t : allTemplates )
|
||||
{
|
||||
caf::PdmOptionItemInfo optionItem( t->uiName(), t );
|
||||
options.push_back( optionItem );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return options;
|
||||
}
|
||||
@ -1697,7 +1675,6 @@ void RimSummaryPlot::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering&
|
||||
}
|
||||
|
||||
mainOptions->add( &m_normalizeCurveYValues );
|
||||
mainOptions->add( &m_plotTemplate );
|
||||
|
||||
RimViewWindow::defineUiOrdering( uiConfigName, uiOrdering );
|
||||
|
||||
@ -1940,22 +1917,6 @@ void RimSummaryPlot::showLegend( bool enable )
|
||||
m_showLegend = enable;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryPlot::setPlotTemplate( RimPlotTemplateFileItem* plotTemplate )
|
||||
{
|
||||
m_plotTemplate = plotTemplate;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimPlotTemplateFileItem* RimSummaryPlot::plotTemplate() const
|
||||
{
|
||||
return m_plotTemplate();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -156,9 +156,6 @@ public:
|
||||
bool isNormalizationEnabled();
|
||||
void showLegend( bool enable );
|
||||
|
||||
void setPlotTemplate( RimPlotTemplateFileItem* plotTemplate );
|
||||
RimPlotTemplateFileItem* plotTemplate() const;
|
||||
|
||||
void handleKeyPressEvent( QKeyEvent* keyEvent );
|
||||
virtual RimSummaryPlotSourceStepping* sourceSteppingObjectForKeyEventHandling() const;
|
||||
virtual std::vector<caf::PdmFieldHandle*> fieldsToShowInToolbar();
|
||||
@ -245,8 +242,6 @@ private:
|
||||
caf::PdmChildField<RimPlotAxisProperties*> m_bottomAxisProperties;
|
||||
caf::PdmChildField<RimSummaryTimeAxisProperties*> m_timeAxisProperties;
|
||||
|
||||
caf::PdmPtrField<RimPlotTemplateFileItem*> m_plotTemplate;
|
||||
|
||||
caf::PdmChildField<RimSummaryPlotFilterTextCurveSetEditor*> m_textCurveSetEditor;
|
||||
|
||||
QPointer<RiuSummaryQwtPlot> m_plotWidget;
|
||||
|
Loading…
Reference in New Issue
Block a user