qwt_legend_label.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_LABEL_H
11 #define QWT_LEGEND_LABEL_H
12 
13 #include "qwt_global.h"
14 #include "qwt_text_label.h"
15 #include "qwt_legend_data.h"
16 
17 class QwtText;
18 
23 {
24  Q_OBJECT
25 public:
26  explicit QwtLegendLabel( QWidget *parent = 0 );
27  virtual ~QwtLegendLabel();
28 
29  void setData( const QwtLegendData & );
30  const QwtLegendData &data() const;
31 
32  void setItemMode( QwtLegendData::Mode );
33  QwtLegendData::Mode itemMode() const;
34 
35  void setSpacing( int spacing );
36  int spacing() const;
37 
38  virtual void setText( const QwtText & ) QWT_OVERRIDE;
39 
40  void setIcon( const QPixmap & );
41  QPixmap icon() const;
42 
43  virtual QSize sizeHint() const QWT_OVERRIDE;
44 
45  bool isChecked() const;
46 
47 public Q_SLOTS:
48  void setChecked( bool on );
49 
50 Q_SIGNALS:
52  void clicked();
53 
55  void pressed();
56 
58  void released();
59 
61  void checked( bool );
62 
63 protected:
64  void setDown( bool );
65  bool isDown() const;
66 
67  virtual void paintEvent( QPaintEvent * ) QWT_OVERRIDE;
68  virtual void mousePressEvent( QMouseEvent * ) QWT_OVERRIDE;
69  virtual void mouseReleaseEvent( QMouseEvent * ) QWT_OVERRIDE;
70  virtual void keyPressEvent( QKeyEvent * ) QWT_OVERRIDE;
71  virtual void keyReleaseEvent( QKeyEvent * ) QWT_OVERRIDE;
72 
73 private:
74  class PrivateData;
76 };
77 
78 #endif
A widget representing something on a QwtLegend.
A Widget which displays a QwtText.
#define QWT_EXPORT
Definition: qwt_global.h:38
A class representing a text.
Definition: qwt_text.h:51
dictionary data
Definition: mqtt_test.py:22
PrivateData * d_data
Mode
Mode defining how a legend entry interacts.
virtual QSize sizeHint() const QWT_OVERRIDE
Return a size hint.
Attributes of an entry on a legend.
virtual void paintEvent(QPaintEvent *) QWT_OVERRIDE
#define QWT_OVERRIDE
Definition: qwt_global.h:53
void setText(const QString &, QwtText::TextFormat textFormat=QwtText::AutoText)


plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Dec 6 2020 03:48:10