Files
ResInsight/ApplicationCode/UserInterface/RiuSummaryQwtPlot.h
Gaute Lindkvist 4c026952a1 #4134 #4124 Refactor RiuSummaryQwtPlot on top of a base RiuQwtPlot class and use this for Cross Plots
* Get a lot of functionality included: zoom, panning, etc.
2019-02-26 11:44:26 +01:00

66 lines
2.0 KiB
C++

/////////////////////////////////////////////////////////////////////////////////
//
// 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"
#include "RiuQwtPlot.h"
#include "cafPdmPointer.h"
#include "qwt_plot.h"
#include <QPointer>
class QwtInterval;
class QwtPlotZoomer;
class RimGridCrossPlot;
class RimSummaryPlot;
class RimEnsembleCurveSet;
class RiuCvfOverlayItemWidget;
//==================================================================================================
//
//
//
//==================================================================================================
class RiuSummaryQwtPlot : public RiuQwtPlot
{
Q_OBJECT;
public:
RiuSummaryQwtPlot(RimViewWindow* ownerViewWindow, QWidget* parent = nullptr);
void useDateBasedTimeAxis();
void useTimeBasedTimeAxis();
void addOrUpdateEnsembleCurveSetLegend(RimEnsembleCurveSet* curveSetToShowLegendFor);
void removeEnsembleCurveSetLegend(RimEnsembleCurveSet* curveSetToShowLegendFor);
protected:
void keyPressEvent(QKeyEvent*) override;
void contextMenuEvent(QContextMenuEvent*) override;
void setDefaults();
void updateLayout() override;
private:
void updateEnsembleLegendLayout();
std::map<caf::PdmPointer<RimEnsembleCurveSet>, QPointer<RiuCvfOverlayItemWidget>> m_ensembleLegendWidgets;
};