QWT API (English)
7.0.1
Qt Widget Library for Technical Applications - English API Documentation
Loading...
Searching...
No Matches
src
plot
qwt_legend_data.h
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
* Modified by ChenZongYan in 2024 <czy.t@163.com>
10
* Summary of major modifications (see ChangeLog.md for full history):
11
* 1. CMake build system & C++11 throughout.
12
* 2. Core panner/ zoomer refactored:
13
* - QwtPanner → QwtCachePanner (pixmap-cache version)
14
* - New real-time QwtPlotPanner derived from QwtPicker.
15
* 3. Zoomer supports multi-axis.
16
* 4. Parasite-plot framework:
17
* - QwtFigure, QwtPlotParasiteLayout, QwtPlotTransparentCanvas,
18
* - QwtPlotScaleEventDispatcher, built-in pan/zoom on axis.
19
* 5. New picker: QwtPlotSeriesDataPicker (works with date axis).
20
* 6. Raster & color-map extensions:
21
* - QwtGridRasterData (2-D table + interpolation)
22
* - QwtLinearColorMap::stopColors(), stopPos() API rename.
23
* 7. Bar-chart: expose pen/brush control.
24
* 8. Amalgamated build: single QwtPlot.h / QwtPlot.cpp pair in src-amalgamate.
25
*****************************************************************************/
26
27
#ifndef QWT_LEGEND_DATA_H
28
#define QWT_LEGEND_DATA_H
29
30
#include "qwt_global.h"
31
32
#include <qvariant.h>
33
#include <qmap.h>
34
35
class
QwtText
;
36
class
QwtGraphic
;
37
59
class
QWT_EXPORT
QwtLegendData
60
{
61
public
:
70
enum
Mode
71
{
80
ReadOnly
,
81
90
Clickable
,
91
100
Checkable
101
};
102
111
enum
Role
112
{
121
ModeRole
,
122
131
TitleRole
,
132
141
IconRole
,
142
151
UserRole = 32
152
};
153
154
// Constructor
155
QwtLegendData
();
156
// Destructor
157
~QwtLegendData
();
158
159
// Set all values
160
void
setValues(
const
QMap< int, QVariant >
& );
161
// Return all values
162
const
QMap< int, QVariant >
& values()
const
;
163
164
// Set a value for a specific role
165
void
setValue(
int
role,
const
QVariant& );
166
// Return the value for a specific role
167
QVariant value(
int
role )
const
;
168
169
// Check if a value exists for a specific role
170
bool
hasRole(
int
role )
const
;
171
// Check if the legend data is valid
172
bool
isValid()
const
;
173
174
// Return the icon
175
QwtGraphic
icon()
const
;
176
// Return the title
177
QwtText
title()
const
;
178
// Return the mode
179
Mode mode()
const
;
180
181
private
:
182
QMap< int, QVariant >
m_map;
183
};
184
185
#endif
QMap< int, QVariant >
QwtGraphic
A paint device for scalable graphics.
Definition
qwt_graphic.h:128
QwtLegendData
Attributes of an entry on a legend.
Definition
qwt_legend_data.h:60
QwtLegendData::Role
Role
Identifier how to interpret a QVariant .
Definition
qwt_legend_data.h:112
QwtLegendData::ModeRole
@ ModeRole
The value is a Mode .
Definition
qwt_legend_data.h:121
QwtLegendData::TitleRole
@ TitleRole
The value is a title .
Definition
qwt_legend_data.h:131
QwtLegendData::IconRole
@ IconRole
The value is an icon .
Definition
qwt_legend_data.h:141
QwtLegendData::Mode
Mode
Mode defining how a legend entry interacts .
Definition
qwt_legend_data.h:71
QwtLegendData::Clickable
@ Clickable
The legend item is clickable, like a push button .
Definition
qwt_legend_data.h:90
QwtLegendData::ReadOnly
@ ReadOnly
The legend item is not interactive, like a label .
Definition
qwt_legend_data.h:80
QwtText
A class representing a text.
Definition
qwt_text.h:93
Generated by
1.9.8