Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
qwt
src
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
35
class
QWT_EXPORT
QwtLegendData
36
{
37
public
:
39
enum
Mode
40
{
42
ReadOnly
,
43
45
Clickable
,
46
48
Checkable
49
};
50
52
enum
Role
53
{
54
// The value is a Mode
55
ModeRole
,
56
57
// The value is a title
58
TitleRole
,
59
60
// The value is an icon
61
IconRole
,
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
QwtLegendData::ModeRole
Definition:
qwt_legend_data.h:55
values
std::vector< double > values
QWT_EXPORT
#define QWT_EXPORT
Definition:
qwt_global.h:38
setValue
TFSIMD_FORCE_INLINE void setValue(const tfScalar &x, const tfScalar &y, const tfScalar &z)
QwtLegendData::IconRole
Definition:
qwt_legend_data.h:61
QwtLegendData::ReadOnly
The legend item is not interactive, like a label.
Definition:
qwt_legend_data.h:42
QwtLegendData::Clickable
The legend item is clickable, like a push button.
Definition:
qwt_legend_data.h:45
QwtLegendData::d_map
QMap< int, QVariant > d_map
Definition:
qwt_legend_data.h:84
qwt_global.h
value
T value
QwtText
A class representing a text.
Definition:
qwt_text.h:51
QwtLegendData::Role
Role
Identifier how to interprete a QVariant.
Definition:
qwt_legend_data.h:52
QwtGraphic
A paint device for scalable graphics.
Definition:
qwt_graphic.h:74
QwtLegendData::TitleRole
Definition:
qwt_legend_data.h:58
qwt_text.h
QwtLegendData::Mode
Mode
Mode defining how a legend entry interacts.
Definition:
qwt_legend_data.h:39
qwt_graphic.h
QwtLegendData
Attributes of an entry on a legend.
Definition:
qwt_legend_data.h:35
plotjuggler
Author(s): Davide Faconti
autogenerated on Sat Jul 6 2019 03:44:17