///////////////////////////////////////////////////////////////////////////////// // // Copyright (C) 2025- Equinor ASA // // ResInsight is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY // WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. // // See the GNU General Public License at // for more details. // ///////////////////////////////////////////////////////////////////////////////// #pragma once #include "RimCurveAppearanceDefines.h" #include "RimEnsembleCurveSetColorManager.h" #include "RiuPlotCurveSymbol.h" #include "RiuQwtPlotCurveDefines.h" #include "cafPdmObject.h" #include "cvfColor3.h" class RimRegularLegendConfig; class RimSummaryEnsemble; class RimSummaryCase; //================================================================================================== /// /// //================================================================================================== class RimCurveSetAppearance : public caf::PdmObject { CAF_PDM_HEADER_INIT; public: using ColorMode = RimEnsembleCurveSetColorManager::ColorMode; using ColorModeEnum = RimEnsembleCurveSetColorManager::ColorModeEnum; using LineStyle = caf::AppEnum; using PointSymbol = caf::AppEnum; caf::Signal<> appearanceChanged; public: RimCurveSetAppearance(); void setMainEnsembleColor( const cvf::Color3f& color ); void setEnsemble( RimSummaryEnsemble* ensemble ); void setShowLineStyleAndSymbols( bool showCustomAppearance ); cvf::Color3f curveColor( const RimSummaryEnsemble* ensemble, const RimSummaryCase* summaryCase ) const; cvf::Color3f statisticsCurveColor() const; void setColorMode( ColorModeEnum colorMode ); void setEnsembleParameter( const QString& ensembleParameter ); RimRegularLegendConfig* legendConfig() const; private: void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override; void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override; void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override; QList calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) override; void updateRealizationColor(); void updateEnsembleParameterLegend( RimRegularLegendConfig* legendConfig ) const; private: caf::PdmField m_colorMode; caf::PdmField m_mainEnsembleColor; caf::PdmField m_colorForRealizations; caf::PdmField m_colorTransparency; caf::PdmField m_ensembleParameter; caf::PdmField> m_ensembleParameterSorting; caf::PdmField> m_useCustomAppearance; caf::PdmField m_lineStyle; caf::PdmField m_pointSymbol; caf::PdmField m_symbolSize; caf::PdmField> m_statisticsUseCustomAppearance; caf::PdmField m_statisticsLineStyle; caf::PdmField m_statisticsPointSymbol; caf::PdmField m_statisticsSymbolSize; caf::PdmPtrField m_ensemble; caf::PdmChildField m_ensembleLegendConfig; bool m_showLineStyleAndSymbols = false; };