#862 Added scale picker to select axis

This commit is contained in:
Magne Sjaastad
2016-10-14 15:06:21 +02:00
parent 71f1966c1c
commit d5213b2a43
7 changed files with 158 additions and 0 deletions

View File

@@ -142,6 +142,26 @@ bool RimSummaryPlot::isLogarithmicScaleEnabled(RimDefines::PlotAxis plotAxis) co
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSummaryPlot::selectAxisInPropertyEditor(int axis)
{
RiuMainPlotWindow* plotwindow = RiaApplication::instance()->getOrCreateAndShowMainPlotWindow();
if (axis == QwtPlot::yLeft)
{
plotwindow->selectAsCurrentItem(m_leftYAxisProperties);
}
else if (axis == QwtPlot::yRight)
{
plotwindow->selectAsCurrentItem(m_rightYAxisProperties);
}
else if (axis == QwtPlot::xBottom)
{
plotwindow->selectAsCurrentItem(this);
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@@ -79,6 +79,7 @@ public:
bool isLogarithmicScaleEnabled(RimDefines::PlotAxis plotAxis) const;
void selectAxisInPropertyEditor(int axis);
protected:
// Overridden PDM methods
virtual caf::PdmFieldHandle* objectToggleField() { return &m_showWindow; }