mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-24 22:27:55 -05:00
Introduces common readout settings for summary multi plots
Introduces common readout settings for summary multi plots, allowing users to apply a single readout configuration across multiple plots instead of configuring each individually.
This commit is contained in:
1 parent
a75c10252d
commit
00a58a1fd9
10 files changed
+183
-44
No files matched your search
@@ -96,6 +96,17 @@ void caf::AppEnum<RiaDefines::WindowTileMode>::setUp()
|
||||
setDefault( RiaDefines::WindowTileMode::UNDEFINED );
|
||||
}
|
||||
|
||||
template <>
|
||||
void caf::AppEnum<RiaDefines::ReadOutType>::setUp()
|
||||
{
|
||||
addItem( RiaDefines::ReadOutType::NONE, "NONE", "None" );
|
||||
addItem( RiaDefines::ReadOutType::SNAP_TO_POINT, "SNAP_TO_POINT", "Snap to Closest Curve Point" );
|
||||
addItem( RiaDefines::ReadOutType::TIME_TRACKING, "TIME_TRACKING", "Time Tracking" );
|
||||
addItem( RiaDefines::ReadOutType::TIME_VALUE_TRACKING, "TIME_VALUE_TRACKING", "Time and Value Tracking" );
|
||||
|
||||
setDefault( RiaDefines::ReadOutType::SNAP_TO_POINT );
|
||||
}
|
||||
|
||||
}; // namespace caf
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -88,6 +88,14 @@ enum class TextAlignment
|
||||
CENTER
|
||||
};
|
||||
|
||||
enum class ReadOutType
|
||||
{
|
||||
NONE,
|
||||
SNAP_TO_POINT,
|
||||
TIME_TRACKING,
|
||||
TIME_VALUE_TRACKING
|
||||
};
|
||||
|
||||
// Defines relate to curve and plot template names
|
||||
QString namingVariableCase();
|
||||
QString namingVariableWell();
|
||||
|
||||
@@ -129,6 +129,8 @@ RiaPreferencesSummary::RiaPreferencesSummary()
|
||||
m_selectedDefaultTemplates.uiCapability()->setUiEditorTypeName( caf::PdmUiListEditor::uiEditorTypeName() );
|
||||
m_selectedDefaultTemplates.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
|
||||
|
||||
CAF_PDM_InitField( &m_summaryReadoutMode, "summaryReadoutMode", RiaDefines::ReadOutType::SNAP_TO_POINT, "Default Readout Mode" );
|
||||
|
||||
CAF_PDM_InitField( &m_createEnhancedSummaryDataFile,
|
||||
"createEnhancedSummaryDataFile_v01",
|
||||
false,
|
||||
@@ -310,6 +312,7 @@ void RiaPreferencesSummary::appendItemsToPlottingGroup( caf::PdmUiOrdering& uiOr
|
||||
}
|
||||
|
||||
uiOrdering.add( &m_crossPlotAddressCombinations );
|
||||
uiOrdering.add( &m_summaryReadoutMode );
|
||||
|
||||
auto historyCurveGroup = uiOrdering.addNewGroup( "History Vectors" );
|
||||
|
||||
@@ -584,6 +587,14 @@ RiaDefines::RowCount RiaPreferencesSummary::defaultMultiPlotRowCount() const
|
||||
return m_defaultRowsPerPage();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaDefines::ReadOutType RiaPreferencesSummary::defaultSummaryReadoutMode() const
|
||||
{
|
||||
return m_summaryReadoutMode();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "cafPdmObject.h"
|
||||
|
||||
#include "RiaDefines.h"
|
||||
#include "RiaPlotDefines.h"
|
||||
|
||||
// Include to make Pdm work for cvf::Color
|
||||
#include "cafPdmFieldCvfColor.h"
|
||||
@@ -72,8 +73,9 @@ public:
|
||||
};
|
||||
using DefaultSummaryPlotEnum = caf::AppEnum<DefaultSummaryPlotType>;
|
||||
|
||||
using ColumnCountEnum = caf::AppEnum<RiaDefines::ColumnCount>;
|
||||
using RowCountEnum = caf::AppEnum<RiaDefines::RowCount>;
|
||||
using ColumnCountEnum = caf::AppEnum<RiaDefines::ColumnCount>;
|
||||
using RowCountEnum = caf::AppEnum<RiaDefines::RowCount>;
|
||||
using SummaryReadoutMode = caf::AppEnum<RiaDefines::ReadOutType>;
|
||||
|
||||
public:
|
||||
RiaPreferencesSummary();
|
||||
@@ -117,6 +119,8 @@ public:
|
||||
RiaDefines::ColumnCount defaultMultiPlotColumnCount() const;
|
||||
RiaDefines::RowCount defaultMultiPlotRowCount() const;
|
||||
|
||||
RiaDefines::ReadOutType defaultSummaryReadoutMode() const;
|
||||
|
||||
cvf::Color3f historyCurveContrastColor() const;
|
||||
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override;
|
||||
@@ -141,6 +145,7 @@ private:
|
||||
caf::PdmField<SummaryHistoryCurveStyleModeType> m_defaultSummaryHistoryCurveStyle;
|
||||
caf::PdmField<bool> m_curveColorByPhase;
|
||||
caf::PdmField<bool> m_appendHistoryVectors;
|
||||
caf::PdmField<SummaryReadoutMode> m_summaryReadoutMode;
|
||||
|
||||
caf::PdmField<bool> m_showSummaryTimeAsLongString;
|
||||
caf::PdmField<bool> m_useMultipleThreadsWhenLoadingSummaryCases;
|
||||
|
||||
@@ -155,6 +155,10 @@ RimSummaryMultiPlot::RimSummaryMultiPlot()
|
||||
m_readOutSettings = new RimSummaryPlotReadOut;
|
||||
m_readOutSettings.uiCapability()->setUiTreeChildrenHidden( true );
|
||||
|
||||
CAF_PDM_InitField( &m_goToCommonSettings, "GoToCommonSettings", false, "Go to Common Settings" );
|
||||
caf::PdmUiPushButtonEditor::configureEditorLabelLeft( &m_goToCommonSettings );
|
||||
m_goToCommonSettings.xmlCapability()->disableIO();
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_axisRangeAggregation, "AxisRangeAggregation", "Y Axis Range" );
|
||||
|
||||
CAF_PDM_InitField( &m_hidePlotsWithValuesBelow, "HidePlotsWithValuesBelow", false, "" );
|
||||
@@ -397,7 +401,14 @@ void RimSummaryMultiPlot::defineUiOrdering( QString uiConfigName, caf::PdmUiOrde
|
||||
axesGroup->add( &m_autoAdjustAppearance );
|
||||
|
||||
auto readOutGroup = uiOrdering.addNewGroup( "Mouse Cursor Readout" );
|
||||
m_readOutSettings->uiOrdering( uiConfigName, *readOutGroup );
|
||||
if ( m_readOutSettings == activeReadoutSettings() )
|
||||
{
|
||||
m_readOutSettings->uiOrdering( uiConfigName, *readOutGroup );
|
||||
}
|
||||
else
|
||||
{
|
||||
readOutGroup->add( &m_goToCommonSettings );
|
||||
}
|
||||
|
||||
auto plotVisibilityFilterGroup = uiOrdering.addNewGroup( "Plot Visibility Filter" );
|
||||
plotVisibilityFilterGroup->add( &m_plotFilterYAxisThreshold );
|
||||
@@ -517,6 +528,15 @@ void RimSummaryMultiPlot::fieldChangedByUi( const caf::PdmFieldHandle* changedFi
|
||||
|
||||
m_autoPlotTitle = false;
|
||||
}
|
||||
else if ( changedField == &m_goToCommonSettings )
|
||||
{
|
||||
m_goToCommonSettings = false;
|
||||
|
||||
if ( auto plotCollection = RimMainPlotCollection::current()->summaryMultiPlotCollection() )
|
||||
{
|
||||
RiuPlotMainWindowTools::selectAsCurrentItem( plotCollection );
|
||||
}
|
||||
}
|
||||
|
||||
RimMultiPlot::fieldChangedByUi( changedField, oldValue, newValue );
|
||||
}
|
||||
@@ -539,12 +559,18 @@ void RimSummaryMultiPlot::defineEditorAttribute( const caf::PdmFieldHandle* fiel
|
||||
{
|
||||
if ( &m_hidePlotsWithValuesBelow == field )
|
||||
{
|
||||
auto attrib = dynamic_cast<caf::PdmUiPushButtonEditorAttribute*>( attribute );
|
||||
if ( attrib )
|
||||
if ( auto attrib = dynamic_cast<caf::PdmUiPushButtonEditorAttribute*>( attribute ) )
|
||||
{
|
||||
attrib->m_buttonText = "Apply Filter";
|
||||
}
|
||||
}
|
||||
else if ( field == &m_goToCommonSettings )
|
||||
{
|
||||
if ( auto* pbAttribute = dynamic_cast<caf::PdmUiPushButtonEditorAttribute*>( attribute ) )
|
||||
{
|
||||
pbAttribute->m_buttonText = "Edit";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -1492,7 +1518,7 @@ void RimSummaryMultiPlot::updateReadOutSettings()
|
||||
{
|
||||
for ( auto plot : summaryPlots() )
|
||||
{
|
||||
if ( !m_readOutSettings->enableVerticalLine() )
|
||||
if ( !activeReadoutSettings()->enableVerticalLine() )
|
||||
{
|
||||
if ( auto axisProps = plot->timeAxisProperties() )
|
||||
{
|
||||
@@ -1500,7 +1526,7 @@ void RimSummaryMultiPlot::updateReadOutSettings()
|
||||
}
|
||||
}
|
||||
|
||||
if ( !m_readOutSettings->enableHorizontalLine() )
|
||||
if ( !activeReadoutSettings()->enableHorizontalLine() )
|
||||
{
|
||||
if ( auto axis = plot->axisPropertiesForPlotAxis( RiuPlotAxis::defaultLeft() ) )
|
||||
{
|
||||
@@ -1508,7 +1534,7 @@ void RimSummaryMultiPlot::updateReadOutSettings()
|
||||
}
|
||||
}
|
||||
|
||||
plot->enableCurvePointTracking( m_readOutSettings->enableCurvePointTracking() );
|
||||
plot->enableCurvePointTracking( activeReadoutSettings()->enableCurvePointTracking() );
|
||||
|
||||
plot->updateAndRedrawTimeAnnotations();
|
||||
}
|
||||
@@ -1542,6 +1568,22 @@ std::pair<double, double> RimSummaryMultiPlot::adjustedMinMax( const RimPlotAxis
|
||||
return { adjustedMin, adjustedMax };
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimSummaryPlotReadOut* RimSummaryMultiPlot::activeReadoutSettings() const
|
||||
{
|
||||
if ( auto plotCollection = RimMainPlotCollection::current()->summaryMultiPlotCollection() )
|
||||
{
|
||||
if ( plotCollection->commonReadOutSettings().has_value() )
|
||||
{
|
||||
return plotCollection->commonReadOutSettings().value();
|
||||
}
|
||||
}
|
||||
|
||||
return m_readOutSettings();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -1768,7 +1810,10 @@ void RimSummaryMultiPlot::selectWell( QString wellName )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryMultiPlot::updateReadOutLines( double qwtTimeValue, double yValue )
|
||||
{
|
||||
if ( !m_readOutSettings->enableVerticalLine() && !m_readOutSettings->enableHorizontalLine() ) return;
|
||||
auto readOutSettings = activeReadoutSettings();
|
||||
if ( !readOutSettings ) return;
|
||||
|
||||
if ( !readOutSettings->enableVerticalLine() && !readOutSettings->enableHorizontalLine() ) return;
|
||||
|
||||
const auto timeTValue = RiaTimeTTools::fromDouble( qwtTimeValue );
|
||||
const QString dateFormatString = RiaQDateTimeTools::dateFormatString( RiaPreferences::current()->dateFormat(),
|
||||
@@ -1778,21 +1823,21 @@ void RimSummaryMultiPlot::updateReadOutLines( double qwtTimeValue, double yValue
|
||||
{
|
||||
if ( !plot ) continue;
|
||||
|
||||
if ( m_readOutSettings->enableVerticalLine() && plot->timeAxisProperties() )
|
||||
if ( readOutSettings->enableVerticalLine() && plot->timeAxisProperties() )
|
||||
{
|
||||
plot->timeAxisProperties()->removeAllAnnotations();
|
||||
|
||||
auto lineAppearance = m_readOutSettings->lineAppearance();
|
||||
auto lineAppearance = readOutSettings->lineAppearance();
|
||||
auto anno = RimTimeAxisAnnotation::createTimeAnnotation( timeTValue, lineAppearance->color() );
|
||||
|
||||
Qt::PenStyle style = lineAppearance->isDashed() ? Qt::PenStyle::DashLine : Qt::PenStyle::SolidLine;
|
||||
anno->setPenStyle( style );
|
||||
anno->setAlignment( m_readOutSettings->verticalLineLabelAlignment() );
|
||||
anno->setAlignment( readOutSettings->verticalLineLabelAlignment() );
|
||||
|
||||
plot->timeAxisProperties()->appendAnnotation( anno );
|
||||
}
|
||||
|
||||
if ( m_readOutSettings->enableHorizontalLine() )
|
||||
if ( readOutSettings->enableHorizontalLine() )
|
||||
{
|
||||
std::vector<RimSummaryCurve*> summaryCurves;
|
||||
|
||||
@@ -1836,12 +1881,12 @@ void RimSummaryMultiPlot::updateReadOutLines( double qwtTimeValue, double yValue
|
||||
|
||||
anno->setName( valueText );
|
||||
|
||||
auto lineAppearance = m_readOutSettings->lineAppearance();
|
||||
auto lineAppearance = readOutSettings->lineAppearance();
|
||||
|
||||
Qt::PenStyle style = lineAppearance->isDashed() ? Qt::PenStyle::DashLine : Qt::PenStyle::SolidLine;
|
||||
anno->setPenStyle( style );
|
||||
anno->setColor( lineAppearance->color() );
|
||||
anno->setAlignment( m_readOutSettings->horizontalLineLabelAlignment() );
|
||||
anno->setAlignment( readOutSettings->horizontalLineLabelAlignment() );
|
||||
|
||||
annotationAxis->appendAnnotation( anno );
|
||||
}
|
||||
|
||||
@@ -114,6 +114,7 @@ public:
|
||||
|
||||
void selectWell( QString wellName );
|
||||
|
||||
void updateReadOutSettings();
|
||||
void updateReadOutLines( double qwtTimeValue, double yValue );
|
||||
|
||||
protected:
|
||||
@@ -157,10 +158,10 @@ private:
|
||||
|
||||
void updateReadOnlyState();
|
||||
|
||||
void updateReadOutSettings();
|
||||
|
||||
std::pair<double, double> adjustedMinMax( const RimPlotAxisProperties* axis, double min, double max ) const;
|
||||
|
||||
RimSummaryPlotReadOut* activeReadoutSettings() const;
|
||||
|
||||
private:
|
||||
caf::PdmField<bool> m_autoPlotTitle;
|
||||
caf::PdmField<bool> m_autoSubPlotTitle;
|
||||
@@ -172,6 +173,7 @@ private:
|
||||
caf::PdmField<bool> m_allow3DSelectionLink;
|
||||
|
||||
caf::PdmChildField<RimSummaryPlotReadOut*> m_readOutSettings;
|
||||
caf::PdmField<bool> m_goToCommonSettings;
|
||||
|
||||
caf::PdmField<bool> m_hidePlotsWithValuesBelow;
|
||||
caf::PdmField<double> m_plotFilterYAxisThreshold;
|
||||
|
||||
@@ -20,11 +20,13 @@
|
||||
#include "RimProject.h"
|
||||
#include "RimSummaryMultiPlot.h"
|
||||
#include "RimSummaryPlot.h"
|
||||
#include "RimSummaryPlotReadOut.h"
|
||||
#include "RimTools.h"
|
||||
|
||||
#include "RiuPlotMainWindowTools.h"
|
||||
|
||||
#include "cafPdmFieldReorderCapability.h"
|
||||
#include "cafPdmUiCheckBoxEditor.h"
|
||||
#include "cafPdmUiTreeOrdering.h"
|
||||
|
||||
CAF_PDM_SOURCE_INIT( RimSummaryMultiPlotCollection, "RimSummaryMultiPlotCollection" );
|
||||
@@ -38,6 +40,13 @@ RimSummaryMultiPlotCollection::RimSummaryMultiPlotCollection()
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_summaryMultiPlots, "MultiSummaryPlots", "Summary Plots" );
|
||||
caf::PdmFieldReorderCapability::addToField( &m_summaryMultiPlots );
|
||||
|
||||
CAF_PDM_InitField( &m_useCommonReadoutSettings, "UseCommonReadoutSettings", false, "Use Common Readout Settings" );
|
||||
caf::PdmUiNativeCheckBoxEditor::configureFieldForEditor( &m_useCommonReadoutSettings );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_readoutSettings, "ReadOutSettings", "Read Out Settings" );
|
||||
m_readoutSettings = new RimSummaryPlotReadOut;
|
||||
m_readoutSettings.uiCapability()->setUiTreeChildrenHidden( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -126,6 +135,39 @@ void RimSummaryMultiPlotCollection::onRefreshTree( const caf::SignalEmitter* emi
|
||||
updateConnectedEditors();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryMultiPlotCollection::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue )
|
||||
{
|
||||
if ( changedField == &m_useCommonReadoutSettings )
|
||||
{
|
||||
updateReadOutSettingsInSubPlots();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryMultiPlotCollection::childFieldChangedByUi( const caf::PdmFieldHandle* changedChildField )
|
||||
{
|
||||
if ( changedChildField == &m_readoutSettings )
|
||||
{
|
||||
updateReadOutSettingsInSubPlots();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryMultiPlotCollection::updateReadOutSettingsInSubPlots()
|
||||
{
|
||||
for ( auto plot : m_summaryMultiPlots )
|
||||
{
|
||||
plot->updateReadOutSettings();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -150,6 +192,17 @@ void RimSummaryMultiPlotCollection::onChildrenUpdated( caf::PdmChildArrayFieldHa
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryMultiPlotCollection::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
|
||||
{
|
||||
uiOrdering.add( &m_useCommonReadoutSettings );
|
||||
|
||||
auto readOutGroup = uiOrdering.addNewGroup( "Mouse Cursor Readout" );
|
||||
m_readoutSettings->uiOrdering( uiConfigName, *readOutGroup );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -205,3 +258,15 @@ void RimSummaryMultiPlotCollection::updateSummaryNameHasChanged()
|
||||
|
||||
updateConnectedEditors();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::optional<RimSummaryPlotReadOut*> RimSummaryMultiPlotCollection::commonReadOutSettings() const
|
||||
{
|
||||
if ( m_useCommonReadoutSettings() )
|
||||
{
|
||||
return m_readoutSettings();
|
||||
}
|
||||
return std::nullopt;
|
||||
}
|
||||
@@ -23,9 +23,8 @@
|
||||
#include "cafPdmObject.h"
|
||||
#include "cafPdmUiItem.h"
|
||||
|
||||
#include <QList>
|
||||
|
||||
class RimSummaryMultiPlot;
|
||||
class RimSummaryPlotReadOut;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
@@ -52,14 +51,24 @@ public:
|
||||
|
||||
void updateSummaryNameHasChanged();
|
||||
|
||||
std::optional<RimSummaryPlotReadOut*> commonReadOutSettings() const;
|
||||
|
||||
private:
|
||||
void initAfterRead() override;
|
||||
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
|
||||
void onChildrenUpdated( caf::PdmChildArrayFieldHandle* childArray, std::vector<caf::PdmObjectHandle*>& updatedObjects ) override;
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
|
||||
void onDuplicatePlot( const caf::SignalEmitter* emitter, RimSummaryMultiPlot* plotToDuplicate );
|
||||
void onRefreshTree( const caf::SignalEmitter* emitter, RimSummaryMultiPlot* plotRequesting );
|
||||
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
void childFieldChangedByUi( const caf::PdmFieldHandle* changedChildField ) override;
|
||||
|
||||
void updateReadOutSettingsInSubPlots();
|
||||
|
||||
private:
|
||||
caf::PdmChildArrayField<RimSummaryMultiPlot*> m_summaryMultiPlots;
|
||||
caf::PdmField<bool> m_useCommonReadoutSettings;
|
||||
caf::PdmChildField<RimSummaryPlotReadOut*> m_readoutSettings;
|
||||
};
|
||||
@@ -18,23 +18,14 @@
|
||||
|
||||
#include "RimSummaryPlotReadOut.h"
|
||||
|
||||
#include "RiaPreferencesSummary.h"
|
||||
|
||||
#include "RimAnnotationLineAppearance.h"
|
||||
|
||||
#include "cafPdmUiCheckBoxEditor.h"
|
||||
|
||||
CAF_PDM_SOURCE_INIT( RimSummaryPlotReadOut, "RimSummaryPlotReadOut" );
|
||||
|
||||
template <>
|
||||
void caf::AppEnum<RimSummaryPlotReadOut::ReadOutType>::setUp()
|
||||
{
|
||||
addItem( RimSummaryPlotReadOut::ReadOutType::NONE, "NONE", "None" );
|
||||
addItem( RimSummaryPlotReadOut::ReadOutType::SNAP_TO_POINT, "SNAP_TO_POINT", "Snap to Closest Curve Point" );
|
||||
addItem( RimSummaryPlotReadOut::ReadOutType::TIME_TRACKING, "TIME_TRACKING", "Time Tracking" );
|
||||
addItem( RimSummaryPlotReadOut::ReadOutType::TIME_VALUE_TRACKING, "TIME_VALUE_TRACKING", "Time and Value Tracking" );
|
||||
|
||||
setDefault( RimSummaryPlotReadOut::ReadOutType::SNAP_TO_POINT );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -43,7 +34,7 @@ RimSummaryPlotReadOut::RimSummaryPlotReadOut()
|
||||
CAF_PDM_InitObject( "Summary Plot Read Out", "" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_readOutType, "ReadOutType", "Readout Mode" );
|
||||
m_readOutType = ReadOutType::TIME_VALUE_TRACKING;
|
||||
m_readOutType = RiaPreferencesSummary::current()->defaultSummaryReadoutMode();
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_lineAppearance, "LineAppearance", "" );
|
||||
m_lineAppearance = new RimAnnotationLineAppearance;
|
||||
@@ -62,7 +53,7 @@ RimSummaryPlotReadOut::RimSummaryPlotReadOut()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimSummaryPlotReadOut::enableCurvePointTracking() const
|
||||
{
|
||||
return m_readOutType() == ReadOutType::SNAP_TO_POINT;
|
||||
return m_readOutType() == RiaDefines::ReadOutType::SNAP_TO_POINT;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -70,7 +61,7 @@ bool RimSummaryPlotReadOut::enableCurvePointTracking() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimSummaryPlotReadOut::enableHorizontalLine() const
|
||||
{
|
||||
return m_readOutType() == ReadOutType::TIME_VALUE_TRACKING;
|
||||
return m_readOutType() == RiaDefines::ReadOutType::TIME_VALUE_TRACKING;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -78,7 +69,8 @@ bool RimSummaryPlotReadOut::enableHorizontalLine() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimSummaryPlotReadOut::enableVerticalLine() const
|
||||
{
|
||||
return ( ( m_readOutType() == ReadOutType::TIME_TRACKING ) || ( m_readOutType() == ReadOutType::TIME_VALUE_TRACKING ) );
|
||||
return ( ( m_readOutType() == RiaDefines::ReadOutType::TIME_TRACKING ) ||
|
||||
( m_readOutType() == RiaDefines::ReadOutType::TIME_VALUE_TRACKING ) );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -34,15 +34,6 @@ class RimSummaryPlotReadOut : public caf::PdmObject
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
|
||||
public:
|
||||
enum class ReadOutType
|
||||
{
|
||||
NONE,
|
||||
SNAP_TO_POINT,
|
||||
TIME_TRACKING,
|
||||
TIME_VALUE_TRACKING
|
||||
};
|
||||
|
||||
public:
|
||||
RimSummaryPlotReadOut();
|
||||
|
||||
@@ -57,7 +48,7 @@ private:
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
|
||||
private:
|
||||
caf::PdmField<caf::AppEnum<ReadOutType>> m_readOutType;
|
||||
caf::PdmField<caf::AppEnum<RiaDefines::ReadOutType>> m_readOutType;
|
||||
|
||||
caf::PdmChildField<RimAnnotationLineAppearance*> m_lineAppearance;
|
||||
|
||||
|
||||
Reference in new issue
Block a user