mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#862 Added scale picker to select axis
This commit is contained in:
@@ -19,9 +19,12 @@
|
||||
#include "RiuSummaryQwtPlot.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
|
||||
#include "RimSummaryCurve.h"
|
||||
#include "RimSummaryPlot.h"
|
||||
|
||||
#include "RiuMainPlotWindow.h"
|
||||
#include "RiuQwtScalePicker.h"
|
||||
|
||||
#include "qwt_date_scale_draw.h"
|
||||
#include "qwt_date_scale_engine.h"
|
||||
@@ -69,6 +72,9 @@ RiuSummaryQwtPlot::RiuSummaryQwtPlot(RimSummaryPlot* plotDefinition, QWidget* pa
|
||||
m_zoomerRight = new QwtPlotZoomer(canvas());
|
||||
m_zoomerRight->setAxis(xTop, yRight);
|
||||
m_zoomerRight->setTrackerMode(QwtPicker::AlwaysOff);
|
||||
|
||||
RiuQwtScalePicker* scalePicker = new RiuQwtScalePicker(this);
|
||||
connect(scalePicker, SIGNAL(clicked(int, double)), this, SLOT(onAxisClicked(int, double)));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -296,3 +302,13 @@ void RiuSummaryQwtPlot::onZoomedSlot()
|
||||
|
||||
m_plotDefinition->updateZoomFromQwt();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuSummaryQwtPlot::onAxisClicked(int axis, double value)
|
||||
{
|
||||
if (!m_plotDefinition) return;
|
||||
|
||||
m_plotDefinition->selectAxisInPropertyEditor(axis);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user