qwt_legend_data.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_DATA_H
11 #define QWT_LEGEND_DATA_H
12 
13 #include "qwt_global.h"
14 
15 #include <qvariant.h>
16 #include <qmap.h>
17 
18 class QwtText;
19 class QwtGraphic;
20 
37 {
38 public:
40  enum Mode
41  {
44 
47 
49  Checkable
50  };
51 
53  enum Role
54  {
55  // The value is a Mode
57 
58  // The value is a title
60 
61  // The value is an icon
63 
64  // Values < UserRole are reserved for internal use
65  UserRole = 32
66  };
67 
68  QwtLegendData();
69  ~QwtLegendData();
70 
71  void setValues( const QMap<int, QVariant> & );
72  const QMap<int, QVariant> &values() const;
73 
74  void setValue( int role, const QVariant & );
75  QVariant value( int role ) const;
76 
77  bool hasRole( int role ) const;
78  bool isValid() const;
79 
80  QwtGraphic icon() const;
81  QwtText title() const;
82  Mode mode() const;
83 
84 private:
86 };
87 
88 #endif
enum MQTTPropertyCodes value
#define QWT_EXPORT
Definition: qwt_global.h:38
The legend item is not interactive, like a label.
The legend item is clickable, like a push button.
QMap< int, QVariant > d_map
A class representing a text.
Definition: qwt_text.h:51
Role
Identifier how to interprete a QVariant.
A paint device for scalable graphics.
Definition: qwt_graphic.h:75
Mode
Mode defining how a legend entry interacts.
Attributes of an entry on a legend.


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