3rdparty
qwt
src
qwt_legend_data.h
Go to the documentation of this file.
1
/******************************************************************************
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
36
class
QWT_EXPORT
QwtLegendData
37
{
38
public
:
40
enum
Mode
41
{
43
ReadOnly
,
44
46
Clickable
,
47
49
Checkable
50
};
51
53
enum
Role
54
{
55
// The value is a Mode
56
ModeRole
,
57
58
// The value is a title
59
TitleRole
,
60
61
// The value is an icon
62
IconRole
,
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
:
85
QMap< int, QVariant >
m_map
;
86
};
87
88
#endif
QwtLegendData
Attributes of an entry on a legend.
Definition:
qwt_legend_data.h:36
QwtLegendData::Mode
Mode
Mode defining how a legend entry interacts.
Definition:
qwt_legend_data.h:40
QwtGraphic
A paint device for scalable graphics.
Definition:
qwt_graphic.h:75
qwt_global.h
QwtLegendData::TitleRole
@ TitleRole
Definition:
qwt_legend_data.h:59
QMap< int, QVariant >
QwtText
A class representing a text.
Definition:
qwt_text.h:51
QwtLegendData::Clickable
@ Clickable
The legend item is clickable, like a push button.
Definition:
qwt_legend_data.h:46
QWT_EXPORT
#define QWT_EXPORT
Definition:
qwt_global.h:38
QwtLegendData::Role
Role
Identifier how to interpret a QVariant.
Definition:
qwt_legend_data.h:53
QwtLegendData::ModeRole
@ ModeRole
Definition:
qwt_legend_data.h:56
QwtLegendData::ReadOnly
@ ReadOnly
The legend item is not interactive, like a label.
Definition:
qwt_legend_data.h:43
QwtLegendData::m_map
QMap< int, QVariant > m_map
Definition:
qwt_legend_data.h:85
QwtLegendData::IconRole
@ IconRole
Definition:
qwt_legend_data.h:62
QwtAxis::isValid
bool isValid(int axisPos)
Definition:
qwt_axis.h:45
plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:45