mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-26 23:20:29 -05:00
CorrelationReportPlot: Refinements, fixes, and simplifications
- Use RimViewWindow in RiuCorrelationReportPlotWidget constructor - Update default dock layout to match desired screenshot - Generalize context menu selection fixer to use caf::PdmObject - Simplify code, fix event filter lifetime, plot titles, and disable summary plot zoom RiuSummaryQwtPlot: Add missing override keyword to setZoomEnabled
This commit is contained in:
1 parent
3fa91d2d6b
commit
c49b6986c0
9 files changed
+79
-35
No files matched your search
@@ -53,6 +53,7 @@ public:
|
||||
virtual RiuPlotWidget* plotWidget() const = 0;
|
||||
|
||||
virtual void enableCurvePointTracking( bool enable ) {};
|
||||
virtual void setZoomEnabled( bool enable ) {};
|
||||
|
||||
public slots:
|
||||
void showContextMenu( QPoint );
|
||||
|
||||
@@ -295,6 +295,21 @@ void RiuSummaryQwtPlot::enableCurvePointTracking( bool enable )
|
||||
m_curvePointTracker->setEnabled( enable );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuSummaryQwtPlot::setZoomEnabled( bool enable )
|
||||
{
|
||||
if ( m_plotZoomer ) m_plotZoomer->setEnabled( enable );
|
||||
if ( m_wheelZoomer && m_plotWidget && m_plotWidget->qwtPlot() )
|
||||
{
|
||||
if ( enable )
|
||||
m_plotWidget->qwtPlot()->canvas()->installEventFilter( m_wheelZoomer );
|
||||
else
|
||||
m_plotWidget->qwtPlot()->canvas()->removeEventFilter( m_wheelZoomer );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -61,6 +61,7 @@ public:
|
||||
RiuPlotWidget* plotWidget() const override;
|
||||
|
||||
void enableCurvePointTracking( bool enable ) override;
|
||||
void setZoomEnabled( bool enable ) override;
|
||||
|
||||
protected:
|
||||
void setDefaults();
|
||||
|
||||
Reference in new issue
Block a user