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);
|
||||
|
||||
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", "", "", "", "");
|
||||
m_curveFilters.uiCapability()->setUiTreeHidden(true);
|
||||
@ -398,7 +399,8 @@ void RimSummaryPlot::fieldChangedByUi(const caf::PdmFieldHandle* changedField, c
|
||||
|
||||
uiCapability()->updateUiIconFromToggleField();
|
||||
}
|
||||
else if (changedField == &m_userName)
|
||||
else if (changedField == &m_userName ||
|
||||
changedField == &m_showPlotTitle)
|
||||
{
|
||||
updateViewerWidgetWindowTitle();
|
||||
}
|
||||
@ -586,6 +588,15 @@ void RimSummaryPlot::updateViewerWidgetWindowTitle()
|
||||
if (m_qwtPlot)
|
||||
{
|
||||
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;
|
||||
|
||||
void selectAxisInPropertyEditor(int axis);
|
||||
void selectAxisInPropertyEditor(int axis);
|
||||
|
||||
protected:
|
||||
// Overridden PDM methods
|
||||
virtual caf::PdmFieldHandle* objectToggleField() { return &m_showWindow; }
|
||||
@ -105,7 +106,10 @@ private:
|
||||
|
||||
private:
|
||||
caf::PdmField<bool> m_showWindow;
|
||||
|
||||
caf::PdmField<bool> m_showPlotTitle;
|
||||
caf::PdmField<QString> m_userName;
|
||||
|
||||
caf::PdmChildArrayField<RimSummaryCurve*> m_curves;
|
||||
caf::PdmChildArrayField<RimSummaryCurveFilter*> m_curveFilters;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user