新增qwt源码版本
This commit is contained in:
42
qwtdemo/examples/stockchart/legend.h
Normal file
42
qwtdemo/examples/stockchart/legend.h
Normal file
@@ -0,0 +1,42 @@
|
||||
#ifndef _LEGEND_H_
|
||||
#define _LEGEND_H_
|
||||
|
||||
#include <qwt_abstract_legend.h>
|
||||
|
||||
class LegendTreeView;
|
||||
class QStandardItem;
|
||||
class QModelIndex;
|
||||
class QwtPlotItem;
|
||||
|
||||
class Legend : public QwtAbstractLegend
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit Legend( QWidget *parent = NULL );
|
||||
virtual ~Legend();
|
||||
|
||||
virtual void renderLegend( QPainter *,
|
||||
const QRectF &, bool fillBackground ) const;
|
||||
|
||||
virtual bool isEmpty() const;
|
||||
|
||||
virtual int scrollExtent( Qt::Orientation ) const;
|
||||
|
||||
Q_SIGNALS:
|
||||
void checked( QwtPlotItem *plotItem, bool on, int index );
|
||||
|
||||
public Q_SLOTS:
|
||||
virtual void updateLegend( const QVariant &,
|
||||
const QList<QwtLegendData> & );
|
||||
|
||||
private Q_SLOTS:
|
||||
void handleClick( const QModelIndex & );
|
||||
|
||||
private:
|
||||
void updateItem( QStandardItem *, const QwtLegendData & );
|
||||
|
||||
LegendTreeView *d_treeView;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user