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 #include "qwt_text.h"
15 #include "qwt_graphic.h"
16 #include <qvariant.h>
17 #include <qpixmap.h>
18 #include <qmap.h>
19 
36 {
37 public:
39  enum Mode
40  {
43 
46 
48  Checkable
49  };
50 
52  enum Role
53  {
54  // The value is a Mode
56 
57  // The value is a title
59 
60  // The value is an icon
62 
63  // Values < UserRole are reserved for internal use
64  UserRole = 32
65  };
66 
67  QwtLegendData();
68  ~QwtLegendData();
69 
70  void setValues( const QMap<int, QVariant> & );
71  const QMap<int, QVariant> &values() const;
72 
73  void setValue( int role, const QVariant & );
74  QVariant value( int role ) const;
75 
76  bool hasRole( int role ) const;
77  bool isValid() const;
78 
79  QwtGraphic icon() const;
80  QwtText title() const;
81  Mode mode() const;
82 
83 private:
84  QMap<int, QVariant> d_map;
85 };
86 
87 #endif
std::vector< double > values
#define QWT_EXPORT
Definition: qwt_global.h:38
TFSIMD_FORCE_INLINE void setValue(const tfScalar &x, const tfScalar &y, const tfScalar &z)
The legend item is not interactive, like a label.
The legend item is clickable, like a push button.
QMap< int, QVariant > d_map
T value
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:74
Mode
Mode defining how a legend entry interacts.
Attributes of an entry on a legend.


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