2019-03-04 15:35:48 +01:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
|
|
|
|
// Copyright (C) 2019- Equinor ASA
|
|
|
|
|
//
|
|
|
|
|
// ResInsight is free software: you can redistribute it and/or modify
|
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
// (at your option) any later version.
|
|
|
|
|
//
|
|
|
|
|
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
|
//
|
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
|
|
|
|
// for more details.
|
|
|
|
|
//
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "RiuInterfaceToViewWindow.h"
|
2019-03-19 15:19:34 +01:00
|
|
|
#include "RiuPlotAnnotationTool.h"
|
2019-10-11 15:54:19 +02:00
|
|
|
#include "RiuQwtPlotWidget.h"
|
2019-03-04 15:35:48 +01:00
|
|
|
|
|
|
|
|
#include "cafPdmPointer.h"
|
|
|
|
|
|
|
|
|
|
#include <QPointer>
|
|
|
|
|
|
2019-03-19 15:19:34 +01:00
|
|
|
#include <memory>
|
|
|
|
|
|
2020-01-16 12:32:40 +01:00
|
|
|
class RimGridCrossPlot;
|
2019-03-29 13:17:39 +01:00
|
|
|
class RimGridCrossPlotDataSet;
|
2020-12-07 16:47:34 +01:00
|
|
|
class RimPlotAxisPropertiesInterface;
|
2019-11-15 10:12:19 +01:00
|
|
|
class RimPlot;
|
2019-03-04 15:35:48 +01:00
|
|
|
class RiuCvfOverlayItemWidget;
|
2019-03-25 14:47:55 +01:00
|
|
|
class RiuDraggableOverlayFrame;
|
2019-03-12 16:05:58 +01:00
|
|
|
class RiuPlotAnnotationTool;
|
2019-10-11 15:54:19 +02:00
|
|
|
class RiuQwtPlotZoomer;
|
2019-03-04 15:35:48 +01:00
|
|
|
|
2019-03-07 19:00:38 +01:00
|
|
|
namespace caf
|
|
|
|
|
{
|
|
|
|
|
class TitledOverlayFrame;
|
|
|
|
|
}
|
2019-03-26 11:33:55 +01:00
|
|
|
|
2019-03-04 15:35:48 +01:00
|
|
|
//==================================================================================================
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
//==================================================================================================
|
2020-01-16 12:32:40 +01:00
|
|
|
class RiuGridCrossQwtPlot : public RiuQwtPlotWidget
|
2019-03-04 15:35:48 +01:00
|
|
|
{
|
|
|
|
|
Q_OBJECT;
|
|
|
|
|
|
|
|
|
|
public:
|
2020-01-16 12:32:40 +01:00
|
|
|
RiuGridCrossQwtPlot( RimGridCrossPlot* crossPlot, QWidget* parent = nullptr );
|
2021-04-15 02:14:51 +00:00
|
|
|
~RiuGridCrossQwtPlot() override;
|
2019-11-03 10:53:32 +01:00
|
|
|
|
|
|
|
|
RiuGridCrossQwtPlot( const RiuGridCrossQwtPlot& ) = delete;
|
|
|
|
|
|
2020-12-07 16:47:34 +01:00
|
|
|
void updateAnnotationObjects( RimPlotAxisPropertiesInterface* axisProperties );
|
2019-03-12 16:05:58 +01:00
|
|
|
|
2019-10-25 15:24:53 +02:00
|
|
|
void setLegendFontSize( int fontSize );
|
2019-10-31 13:48:40 +01:00
|
|
|
void setInternalQwtLegendVisible( bool visible );
|
2019-10-25 15:24:53 +02:00
|
|
|
|
2019-03-04 15:35:48 +01:00
|
|
|
protected:
|
2019-09-06 10:40:57 +02:00
|
|
|
bool curveText( const QwtPlotCurve* curve, QString* curveTitle, QString* xParamName, QString* yParamName ) const;
|
2019-11-05 08:27:35 +01:00
|
|
|
bool isZoomerActive() const override;
|
|
|
|
|
void endZoomOperations() override;
|
2019-09-06 10:40:57 +02:00
|
|
|
|
2019-10-11 15:54:19 +02:00
|
|
|
private slots:
|
|
|
|
|
void onZoomedSlot();
|
2020-05-05 12:43:44 +02:00
|
|
|
void onPlotItemSelected( QwtPlotItem* selectedItem, bool toggleItem, int sampleIndex );
|
2019-10-11 15:54:19 +02:00
|
|
|
|
2019-03-04 15:35:48 +01:00
|
|
|
private:
|
2019-03-25 14:47:55 +01:00
|
|
|
std::unique_ptr<RiuPlotAnnotationTool> m_annotationTool;
|
2019-03-26 11:33:55 +01:00
|
|
|
QwtPlotMarker* m_selectedPointMarker;
|
2019-10-11 15:54:19 +02:00
|
|
|
|
|
|
|
|
QPointer<RiuQwtPlotZoomer> m_zoomerLeft;
|
|
|
|
|
QPointer<RiuQwtPlotZoomer> m_zoomerRight;
|
2019-03-04 15:35:48 +01:00
|
|
|
};
|