mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#842 Added plot title
This commit is contained in:
parent
d5213b2a43
commit
9a7138ddcd
@ -55,6 +55,7 @@ RimSummaryPlot::RimSummaryPlot()
|
|||||||
m_showWindow.uiCapability()->setUiHidden(true);
|
m_showWindow.uiCapability()->setUiHidden(true);
|
||||||
|
|
||||||
CAF_PDM_InitField(&m_userName, "PlotDescription", QString("Summary Plot"), "Name", "", "", "");
|
CAF_PDM_InitField(&m_userName, "PlotDescription", QString("Summary Plot"), "Name", "", "", "");
|
||||||
|
CAF_PDM_InitField(&m_showPlotTitle, "ShowPlotTitle", true, "Show Plot Title", "", "", "");
|
||||||
|
|
||||||
CAF_PDM_InitFieldNoDefault(&m_curveFilters, "SummaryCurveFilters", "", "", "", "");
|
CAF_PDM_InitFieldNoDefault(&m_curveFilters, "SummaryCurveFilters", "", "", "", "");
|
||||||
m_curveFilters.uiCapability()->setUiTreeHidden(true);
|
m_curveFilters.uiCapability()->setUiTreeHidden(true);
|
||||||
@ -398,7 +399,8 @@ void RimSummaryPlot::fieldChangedByUi(const caf::PdmFieldHandle* changedField, c
|
|||||||
|
|
||||||
uiCapability()->updateUiIconFromToggleField();
|
uiCapability()->updateUiIconFromToggleField();
|
||||||
}
|
}
|
||||||
else if (changedField == &m_userName)
|
else if (changedField == &m_userName ||
|
||||||
|
changedField == &m_showPlotTitle)
|
||||||
{
|
{
|
||||||
updateViewerWidgetWindowTitle();
|
updateViewerWidgetWindowTitle();
|
||||||
}
|
}
|
||||||
@ -586,6 +588,15 @@ void RimSummaryPlot::updateViewerWidgetWindowTitle()
|
|||||||
if (m_qwtPlot)
|
if (m_qwtPlot)
|
||||||
{
|
{
|
||||||
m_qwtPlot->setWindowTitle(m_userName);
|
m_qwtPlot->setWindowTitle(m_userName);
|
||||||
|
|
||||||
|
if (m_showPlotTitle)
|
||||||
|
{
|
||||||
|
m_qwtPlot->setTitle(m_userName);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_qwtPlot->setTitle("");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,7 +79,8 @@ public:
|
|||||||
|
|
||||||
bool isLogarithmicScaleEnabled(RimDefines::PlotAxis plotAxis) const;
|
bool isLogarithmicScaleEnabled(RimDefines::PlotAxis plotAxis) const;
|
||||||
|
|
||||||
void selectAxisInPropertyEditor(int axis);
|
void selectAxisInPropertyEditor(int axis);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Overridden PDM methods
|
// Overridden PDM methods
|
||||||
virtual caf::PdmFieldHandle* objectToggleField() { return &m_showWindow; }
|
virtual caf::PdmFieldHandle* objectToggleField() { return &m_showWindow; }
|
||||||
@ -105,7 +106,10 @@ private:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
caf::PdmField<bool> m_showWindow;
|
caf::PdmField<bool> m_showWindow;
|
||||||
|
|
||||||
|
caf::PdmField<bool> m_showPlotTitle;
|
||||||
caf::PdmField<QString> m_userName;
|
caf::PdmField<QString> m_userName;
|
||||||
|
|
||||||
caf::PdmChildArrayField<RimSummaryCurve*> m_curves;
|
caf::PdmChildArrayField<RimSummaryCurve*> m_curves;
|
||||||
caf::PdmChildArrayField<RimSummaryCurveFilter*> m_curveFilters;
|
caf::PdmChildArrayField<RimSummaryCurveFilter*> m_curveFilters;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user