ResInsight/ApplicationLibCode/UserInterface/RiuWellAllocationPlot.h

72 lines
2.0 KiB
C
Raw Normal View History

/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2017 Statoil ASA
2019-09-13 09:51:21 -05:00
//
// 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.
2019-09-13 09:51:21 -05:00
//
// 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.
2019-09-13 09:51:21 -05:00
//
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#pragma once
#include "cafPdmPointer.h"
#include <QFrame>
2019-09-13 09:51:21 -05:00
#include <QPointer>
#include "RiuInterfaceToViewWindow.h"
class RimWellAllocationPlot;
class RiuNightchartsWidget;
class QLabel;
2019-09-13 09:51:21 -05:00
namespace cvf
{
class Color3f;
}
//==================================================================================================
//
//
//
//==================================================================================================
class RiuWellAllocationPlot : public QFrame, public RiuInterfaceToViewWindow
{
Q_OBJECT;
2019-09-13 09:51:21 -05:00
public:
2019-09-13 09:51:21 -05:00
RiuWellAllocationPlot( RimWellAllocationPlot* plotDefinition, QWidget* parent = nullptr );
~RiuWellAllocationPlot() override;
2019-09-13 09:51:21 -05:00
RimWellAllocationPlot* ownerPlotDefinition();
RimViewWindow* ownerViewWindow() const override;
2019-09-13 09:51:21 -05:00
void showTitle( const QString& title );
void hideTitle();
void showLegend( bool doShow );
void addLegendItem( const QString& name, const cvf::Color3f& color, float value );
void clearLegend();
protected:
2019-09-13 09:51:21 -05:00
QSize sizeHint() const override;
QSize minimumSizeHint() const override;
private:
2019-09-13 09:51:21 -05:00
void setDefaults();
private:
caf::PdmPointer<RimWellAllocationPlot> m_plotDefinition;
2019-09-13 09:51:21 -05:00
QPointer<RiuNightchartsWidget> m_legendWidget;
QPointer<QLabel> m_titleLabel;
};