mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-27 16:57:01 -06:00
#4581 Summary Plot: Add default curve style to preferences for history curves
This commit is contained in:
parent
dab424ace3
commit
4cb1c9faca
@ -44,7 +44,16 @@ namespace caf
|
|||||||
addItem(RiaPreferences::NOT_IMPORT, "NOT_IMPORT", "Skip");
|
addItem(RiaPreferences::NOT_IMPORT, "NOT_IMPORT", "Skip");
|
||||||
setDefault(RiaPreferences::IMPORT);
|
setDefault(RiaPreferences::IMPORT);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
template<>
|
||||||
|
void RiaPreferences::SummaryHistoryCurveStyleModeType::setUp()
|
||||||
|
{
|
||||||
|
addItem(RiaPreferences::SYMBOLS, "SYMBOLS", "Symbols");
|
||||||
|
addItem(RiaPreferences::LINES, "LINES", "Lines");
|
||||||
|
addItem(RiaPreferences::SYMBOLS_AND_LINES, "SYMBOLS_AND_LINES", "Symbols and Lines");
|
||||||
|
setDefault(RiaPreferences::SYMBOLS);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
CAF_PDM_SOURCE_INIT(RiaPreferences, "RiaPreferences");
|
CAF_PDM_SOURCE_INIT(RiaPreferences, "RiaPreferences");
|
||||||
@ -141,6 +150,7 @@ RiaPreferences::RiaPreferences(void)
|
|||||||
CAF_PDM_InitField(&gridImportMode, "gridImportMode", SummaryRestartFilesImportModeType(RiaPreferences::NOT_IMPORT), "Default Grid Import Option", "", "", "");
|
CAF_PDM_InitField(&gridImportMode, "gridImportMode", SummaryRestartFilesImportModeType(RiaPreferences::NOT_IMPORT), "Default Grid Import Option", "", "", "");
|
||||||
CAF_PDM_InitField(&summaryEnsembleImportMode, "summaryEnsembleImportMode", SummaryRestartFilesImportModeType(RiaPreferences::IMPORT), "Default Ensemble Summary Import Option", "", "", "");
|
CAF_PDM_InitField(&summaryEnsembleImportMode, "summaryEnsembleImportMode", SummaryRestartFilesImportModeType(RiaPreferences::IMPORT), "Default Ensemble Summary Import Option", "", "", "");
|
||||||
|
|
||||||
|
CAF_PDM_InitField(&defaultSummaryHistoryCurveStyle, "defaultSummaryHistoryCurveStyle", SummaryHistoryCurveStyleModeType(RiaPreferences::SYMBOLS), "Default Curve Style for History Vectors", "", "", "");
|
||||||
CAF_PDM_InitField(&defaultSummaryCurvesTextFilter, "defaultSummaryCurvesTextFilter", QString("FOPT"), "Default Summary Curves", "", "Semicolon separated list of filters used to create curves in new summary plots", "");
|
CAF_PDM_InitField(&defaultSummaryCurvesTextFilter, "defaultSummaryCurvesTextFilter", QString("FOPT"), "Default Summary Curves", "", "Semicolon separated list of filters used to create curves in new summary plots", "");
|
||||||
|
|
||||||
CAF_PDM_InitFieldNoDefault(&m_holoLensExportFolder, "holoLensExportFolder", "HoloLens Export Folder", "", "", "");
|
CAF_PDM_InitFieldNoDefault(&m_holoLensExportFolder, "holoLensExportFolder", "HoloLens Export Folder", "", "", "");
|
||||||
@ -276,11 +286,11 @@ void RiaPreferences::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering&
|
|||||||
caf::PdmUiGroup* group = restartBehaviourGroup->addNewGroup("Origin Ensemble Summary Files");
|
caf::PdmUiGroup* group = restartBehaviourGroup->addNewGroup("Origin Ensemble Summary Files");
|
||||||
group->add(&summaryEnsembleImportMode);
|
group->add(&summaryEnsembleImportMode);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
{
|
else if (uiConfigName == RiaPreferences::tabNameEclipseSummary())
|
||||||
caf::PdmUiGroup* summaryPlotsGroup = uiOrdering.addNewGroup("Summary Plots");
|
{
|
||||||
summaryPlotsGroup->add(&defaultSummaryCurvesTextFilter);
|
uiOrdering.add(&defaultSummaryCurvesTextFilter);
|
||||||
}
|
uiOrdering.add(&defaultSummaryHistoryCurveStyle);
|
||||||
}
|
}
|
||||||
else if (uiConfigName == RiaPreferences::tabNameScripting())
|
else if (uiConfigName == RiaPreferences::tabNameScripting())
|
||||||
{
|
{
|
||||||
|
@ -48,6 +48,14 @@ public:
|
|||||||
typedef caf::AppEnum<SummaryRestartFilesImportMode> SummaryRestartFilesImportModeType;
|
typedef caf::AppEnum<SummaryRestartFilesImportMode> SummaryRestartFilesImportModeType;
|
||||||
typedef RiaFontCache::FontSizeType FontSizeType;
|
typedef RiaFontCache::FontSizeType FontSizeType;
|
||||||
|
|
||||||
|
enum SummaryHistoryCurveStyleMode
|
||||||
|
{
|
||||||
|
SYMBOLS,
|
||||||
|
LINES,
|
||||||
|
SYMBOLS_AND_LINES
|
||||||
|
};
|
||||||
|
typedef caf::AppEnum<SummaryHistoryCurveStyleMode> SummaryHistoryCurveStyleModeType;
|
||||||
|
|
||||||
RiaPreferences(void);
|
RiaPreferences(void);
|
||||||
~RiaPreferences(void) override;
|
~RiaPreferences(void) override;
|
||||||
|
|
||||||
@ -110,7 +118,8 @@ public: // Pdm Fields
|
|||||||
caf::PdmField<SummaryRestartFilesImportModeType> gridImportMode;
|
caf::PdmField<SummaryRestartFilesImportModeType> gridImportMode;
|
||||||
caf::PdmField<SummaryRestartFilesImportModeType> summaryEnsembleImportMode;
|
caf::PdmField<SummaryRestartFilesImportModeType> summaryEnsembleImportMode;
|
||||||
|
|
||||||
caf::PdmField<QString> defaultSummaryCurvesTextFilter;
|
caf::PdmField<QString> defaultSummaryCurvesTextFilter;
|
||||||
|
caf::PdmField<SummaryHistoryCurveStyleModeType> defaultSummaryHistoryCurveStyle;
|
||||||
|
|
||||||
caf::PdmField<bool> holoLensDisableCertificateVerification;
|
caf::PdmField<bool> holoLensDisableCertificateVerification;
|
||||||
caf::PdmField<QString> csvTextExportFieldSeparator;
|
caf::PdmField<QString> csvTextExportFieldSeparator;
|
||||||
|
@ -18,13 +18,13 @@
|
|||||||
|
|
||||||
#include "RimSummaryCurve.h"
|
#include "RimSummaryCurve.h"
|
||||||
|
|
||||||
#include "RiaGuiApplication.h"
|
|
||||||
#include "RiaDefines.h"
|
#include "RiaDefines.h"
|
||||||
|
#include "RiaGuiApplication.h"
|
||||||
|
#include "RiaPreferences.h"
|
||||||
|
#include "RiaTimeHistoryCurveMerger.h"
|
||||||
|
|
||||||
#include "RifReaderEclipseSummary.h"
|
#include "RifReaderEclipseSummary.h"
|
||||||
|
|
||||||
#include "RiaTimeHistoryCurveMerger.h"
|
|
||||||
|
|
||||||
#include "RimEclipseResultCase.h"
|
#include "RimEclipseResultCase.h"
|
||||||
#include "RimEnsembleCurveSet.h"
|
#include "RimEnsembleCurveSet.h"
|
||||||
#include "RimEnsembleCurveSetCollection.h"
|
#include "RimEnsembleCurveSetCollection.h"
|
||||||
@ -806,15 +806,34 @@ void RimSummaryCurve::setCurveAppearanceFromCaseType()
|
|||||||
if (m_yValuesSummaryCase->isObservedData())
|
if (m_yValuesSummaryCase->isObservedData())
|
||||||
{
|
{
|
||||||
setLineStyle(RiuQwtPlotCurve::STYLE_NONE);
|
setLineStyle(RiuQwtPlotCurve::STYLE_NONE);
|
||||||
|
setSymbol(RiuQwtSymbol::SYMBOL_XCROSS);
|
||||||
if (symbol() == RiuQwtSymbol::SYMBOL_NONE)
|
|
||||||
{
|
|
||||||
setSymbol(RiuQwtSymbol::SYMBOL_XCROSS);
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_yValuesCurveVariable && m_yValuesCurveVariable->address().isHistoryQuantity())
|
||||||
|
{
|
||||||
|
RiaPreferences* prefs = RiaApplication::instance()->preferences();
|
||||||
|
|
||||||
|
if (prefs->defaultSummaryHistoryCurveStyle() == RiaPreferences::SYMBOLS)
|
||||||
|
{
|
||||||
|
setSymbol(RiuQwtSymbol::SYMBOL_XCROSS);
|
||||||
|
setLineStyle(RiuQwtPlotCurve::STYLE_NONE);
|
||||||
|
}
|
||||||
|
else if (prefs->defaultSummaryHistoryCurveStyle() == RiaPreferences::SYMBOLS_AND_LINES)
|
||||||
|
{
|
||||||
|
setSymbol(RiuQwtSymbol::SYMBOL_XCROSS);
|
||||||
|
setLineStyle(RiuQwtPlotCurve::STYLE_SOLID);
|
||||||
|
}
|
||||||
|
else if (prefs->defaultSummaryHistoryCurveStyle() == RiaPreferences::LINES)
|
||||||
|
{
|
||||||
|
setSymbol(RiuQwtSymbol::SYMBOL_NONE);
|
||||||
|
setLineStyle(RiuQwtPlotCurve::STYLE_SOLID);
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user