2019-10-09 02:21:28 -05: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
|
|
|
|
|
2019-10-11 08:54:19 -05:00
|
|
|
#include "qwt_legend.h"
|
2019-10-09 02:21:28 -05:00
|
|
|
|
2019-10-11 08:54:19 -05:00
|
|
|
class RiuQwtPlotLegend : public QwtLegend
|
2019-10-09 02:21:28 -05:00
|
|
|
{
|
2019-10-11 08:54:19 -05:00
|
|
|
Q_OBJECT
|
2019-10-09 02:21:28 -05:00
|
|
|
public:
|
2019-10-11 08:54:19 -05:00
|
|
|
RiuQwtPlotLegend( QWidget* parent = nullptr );
|
2020-09-14 14:47:48 -05:00
|
|
|
void resizeEvent( QResizeEvent* event ) override;
|
2019-11-28 11:23:15 -06:00
|
|
|
QSize sizeHint() const override;
|
|
|
|
public slots:
|
|
|
|
void updateLegend( const QVariant&, const QList<QwtLegendData>& ) override;
|
2022-03-23 07:07:08 -05:00
|
|
|
void updateLegend( const QList<QwtLegendData>& );
|
2019-11-28 11:23:15 -06:00
|
|
|
|
|
|
|
signals:
|
|
|
|
void legendUpdated();
|
2019-10-09 02:21:28 -05:00
|
|
|
|
2022-03-23 07:07:08 -05:00
|
|
|
private:
|
|
|
|
void deleteAll();
|
2019-10-09 02:21:28 -05:00
|
|
|
};
|