qwt_legend.h
Go to the documentation of this file.
1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
2  * Qwt Widget Library
3  * Copyright (C) 1997 Josef Wilgen
4  * Copyright (C) 2002 Uwe Rathmann
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the Qwt License, Version 1.0
8  *****************************************************************************/
9 
10 #ifndef QWT_LEGEND_H
11 #define QWT_LEGEND_H
12 
13 #include "qwt_global.h"
14 #include "qwt_abstract_legend.h"
15 #include <qvariant.h>
16 
17 class QScrollBar;
18 
30 {
31  Q_OBJECT
32 
33 public:
34  explicit QwtLegend( QWidget *parent = NULL );
35  virtual ~QwtLegend();
36 
37  void setMaxColumns( uint numColums );
38  uint maxColumns() const;
39 
40  void setDefaultItemMode( QwtLegendData::Mode );
41  QwtLegendData::Mode defaultItemMode() const;
42 
43  QWidget *contentsWidget();
44  const QWidget *contentsWidget() const;
45 
46  QWidget *legendWidget( const QVariant & ) const;
47  QList<QWidget *> legendWidgets( const QVariant & ) const;
48 
49  QVariant itemInfo( const QWidget * ) const;
50 
51  virtual bool eventFilter( QObject *, QEvent * );
52 
53  virtual QSize sizeHint() const;
54  virtual int heightForWidth( int w ) const;
55 
56  QScrollBar *horizontalScrollBar() const;
57  QScrollBar *verticalScrollBar() const;
58 
59  virtual void renderLegend( QPainter *,
60  const QRectF &, bool fillBackground ) const;
61 
62  virtual void renderItem( QPainter *,
63  const QWidget *, const QRectF &, bool fillBackground ) const;
64 
65  virtual bool isEmpty() const;
66  virtual int scrollExtent( Qt::Orientation ) const;
67 
68 Q_SIGNALS:
81  void clicked( const QVariant &itemInfo, int index );
82 
96  void checked( const QVariant &itemInfo, bool on, int index );
97 
98 public Q_SLOTS:
99  virtual void updateLegend( const QVariant &,
100  const QList<QwtLegendData> & );
101 
102 protected Q_SLOTS:
103  void itemClicked();
104  void itemChecked( bool );
105 
106 protected:
107  virtual QWidget *createWidget( const QwtLegendData & ) const;
108  virtual void updateWidget( QWidget *widget, const QwtLegendData &data );
109 
110 private:
111  void updateTabOrder();
112 
113  class PrivateData;
115 };
116 
117 #endif
#define QWT_EXPORT
Definition: qwt_global.h:38
virtual bool isEmpty() const =0
virtual void updateLegend(const QVariant &itemInfo, const QList< QwtLegendData > &data)=0
Update the entries for a plot item.
PrivateData * d_data
Definition: qwt_legend.h:113
virtual void renderLegend(QPainter *painter, const QRectF &rect, bool fillBackground) const =0
TFSIMD_FORCE_INLINE const tfScalar & w() const
Abstract base class for legend widgets.
The legend widget.
Definition: qwt_legend.h:29
empty_struct data[sizeof(T)/sizeof(empty_struct)]
Mode
Mode defining how a legend entry interacts.
virtual int scrollExtent(Qt::Orientation) const
Attributes of an entry on a legend.


plotjuggler
Author(s): Davide Faconti
autogenerated on Sat Jul 6 2019 03:44:17