mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3277 Implement stepping for Common Data Source and rename Plot Source Stepping for summary plots.
* The name for the UI groups is now "Data Source" for both types of data source stepping.
This commit is contained in:
@@ -399,8 +399,13 @@ void RiuSummaryQwtPlot::setCommonPlotBehaviour(QwtPlot* plot)
|
||||
plot->setAxisTitle(QwtPlot::yLeft, axisTitle);
|
||||
plot->setAxisTitle(QwtPlot::yRight, axisTitle);
|
||||
|
||||
// Enable mousetracking and event filter
|
||||
// Set a focus policy to allow it taking key press events.
|
||||
// This is not strictly necessary since this widget inherit QwtPlot
|
||||
// which already has a focus policy.
|
||||
// However, for completeness we still do it here.
|
||||
plot->setFocusPolicy(Qt::WheelFocus);
|
||||
|
||||
// Enable mousetracking and event filter
|
||||
plot->canvas()->setMouseTracking(true);
|
||||
plot->canvas()->installEventFilter(plot);
|
||||
plot->plotLayout()->setAlignCanvasToScales(true);
|
||||
|
||||
@@ -73,6 +73,7 @@ RiuWellLogPlot::RiuWellLogPlot(RimWellLogPlot* plotDefinition, QWidget* parent)
|
||||
|
||||
this->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
|
||||
|
||||
setFocusPolicy(Qt::StrongFocus);
|
||||
connect(m_scrollBar, SIGNAL(valueChanged(int)), this, SLOT(slotSetMinDepth(int)));
|
||||
}
|
||||
|
||||
@@ -233,6 +234,14 @@ QSize RiuWellLogPlot::sizeHint() const
|
||||
return QSize(1, 1);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuWellLogPlot::keyPressEvent(QKeyEvent* keyEvent)
|
||||
{
|
||||
m_plotDefinition->handleKeyPressEvent(keyEvent);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -70,6 +70,9 @@ protected:
|
||||
virtual void contextMenuEvent(QContextMenuEvent *) override;
|
||||
virtual QSize sizeHint() const override;
|
||||
|
||||
|
||||
virtual void keyPressEvent(QKeyEvent* keyEvent) override;
|
||||
|
||||
private:
|
||||
void updateScrollBar(double minDepth, double maxDepth);
|
||||
std::map<int, int> calculateTrackWidthsToMatchFrame(int frameWidth) const;
|
||||
|
||||
Reference in New Issue
Block a user