Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
3rdparty
qwt
src
qwt_plot_item.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_PLOT_ITEM_H
11
#define QWT_PLOT_ITEM_H
12
13
#include "
qwt_global.h
"
14
#include <qmetatype.h>
15
16
class
QwtScaleMap
;
17
class
QwtScaleDiv
;
18
class
QwtPlot
;
19
class
QwtText
;
20
class
QwtGraphic
;
21
class
QwtLegendData
;
22
class
QRectF;
23
class
QPainter;
24
class
QString;
25
template
<
typename
T>
class
QList
;
26
65
class
QWT_EXPORT
QwtPlotItem
66
{
67
public
:
74
enum
RttiValues
75
{
77
Rtti_PlotItem = 0,
78
80
Rtti_PlotGrid
,
81
83
Rtti_PlotScale
,
84
86
Rtti_PlotLegend
,
87
89
Rtti_PlotMarker
,
90
92
Rtti_PlotCurve
,
93
95
Rtti_PlotSpectroCurve
,
96
98
Rtti_PlotIntervalCurve
,
99
101
Rtti_PlotHistogram
,
102
104
Rtti_PlotSpectrogram
,
105
107
Rtti_PlotGraphic
,
108
110
Rtti_PlotTradingCurve
,
111
113
Rtti_PlotBarChart
,
114
116
Rtti_PlotMultiBarChart
,
117
119
Rtti_PlotShape
,
120
122
Rtti_PlotTextLabel
,
123
125
Rtti_PlotZone
,
126
128
Rtti_PlotVectorField
,
129
134
Rtti_PlotUserItem = 1000
135
};
136
146
enum
ItemAttribute
147
{
149
Legend = 0x01,
150
156
AutoScale = 0x02,
157
163
Margins = 0x04
164
};
165
167
typedef
QFlags<ItemAttribute>
ItemAttributes
;
168
179
enum
ItemInterest
180
{
185
ScaleInterest = 0x01,
186
197
LegendInterest = 0x02
198
};
199
201
typedef
QFlags<ItemInterest>
ItemInterests
;
202
204
enum
RenderHint
205
{
207
RenderAntialiased = 0x1
208
};
209
211
typedef
QFlags<RenderHint>
RenderHints
;
212
213
explicit
QwtPlotItem
();
214
explicit
QwtPlotItem
(
const
QString &title );
215
explicit
QwtPlotItem
(
const
QwtText
&title );
216
217
virtual
~
QwtPlotItem
();
218
219
void
attach(
QwtPlot
*plot );
220
void
detach();
221
222
QwtPlot
*plot()
const
;
223
224
void
setTitle(
const
QString &title );
225
void
setTitle(
const
QwtText
&title );
226
const
QwtText
&title()
const
;
227
228
virtual
int
rtti()
const
;
229
230
void
setItemAttribute(
ItemAttribute
,
bool
on =
true
);
231
bool
testItemAttribute(
ItemAttribute
)
const
;
232
233
void
setItemInterest(
ItemInterest
,
bool
on =
true
);
234
bool
testItemInterest(
ItemInterest
)
const
;
235
236
void
setRenderHint(
RenderHint
,
bool
on =
true
);
237
bool
testRenderHint(
RenderHint
)
const
;
238
239
void
setRenderThreadCount( uint numThreads );
240
uint renderThreadCount()
const
;
241
242
void
setLegendIconSize(
const
QSize & );
243
QSize legendIconSize()
const
;
244
245
double
z()
const
;
246
void
setZ(
double
z );
247
248
void
show();
249
void
hide();
250
virtual
void
setVisible(
bool
);
251
bool
isVisible ()
const
;
252
253
void
setAxes(
int
xAxis,
int
yAxis );
254
255
void
setXAxis(
int
axis );
256
int
xAxis()
const
;
257
258
void
setYAxis(
int
axis );
259
int
yAxis()
const
;
260
261
virtual
void
itemChanged();
262
virtual
void
legendChanged();
263
272
virtual
void
draw( QPainter *painter,
273
const
QwtScaleMap
&xMap,
const
QwtScaleMap
&yMap,
274
const
QRectF &canvasRect )
const
= 0;
275
276
virtual
QRectF boundingRect()
const
;
277
278
virtual
void
getCanvasMarginHint(
279
const
QwtScaleMap
&xMap,
const
QwtScaleMap
&yMap,
280
const
QRectF &canvasRect,
281
double
&
left
,
double
&
top
,
double
&
right
,
double
&bottom)
const
;
282
283
virtual
void
updateScaleDiv(
284
const
QwtScaleDiv
&,
const
QwtScaleDiv
& );
285
286
virtual
void
updateLegend(
const
QwtPlotItem
*,
287
const
QList<QwtLegendData>
& );
288
289
QRectF scaleRect(
const
QwtScaleMap
&,
const
QwtScaleMap
& )
const
;
290
QRectF paintRect(
const
QwtScaleMap
&,
const
QwtScaleMap
& )
const
;
291
292
virtual
QList<QwtLegendData>
legendData()
const
;
293
294
virtual
QwtGraphic
legendIcon(
int
index,
const
QSizeF & )
const
;
295
296
protected
:
297
QwtGraphic
defaultIcon(
const
QBrush &,
const
QSizeF & )
const
;
298
299
private
:
300
Q_DISABLE_COPY(
QwtPlotItem
)
301
302
class
PrivateData
;
303
PrivateData *d_data;
304
};
305
306
Q_DECLARE_OPERATORS_FOR_FLAGS(
QwtPlotItem
::ItemAttributes )
307
Q_DECLARE_OPERATORS_FOR_FLAGS(
QwtPlotItem
::ItemInterests )
308
Q_DECLARE_OPERATORS_FOR_FLAGS(
QwtPlotItem
::RenderHints )
309
310
Q_DECLARE_METATYPE(
QwtPlotItem
* )
311
312
#endif
QwtPlotItem::Rtti_PlotSpectrogram
For QwtPlotSpectrogram.
Definition:
qwt_plot_item.h:104
QwtPlotItem::Rtti_PlotGraphic
For QwtPlotGraphicItem, QwtPlotSvgItem.
Definition:
qwt_plot_item.h:107
QwtPlotItem::Rtti_PlotScale
For QwtPlotScaleItem.
Definition:
qwt_plot_item.h:83
QwtPlotItem::ItemAttribute
ItemAttribute
Plot Item Attributes.
Definition:
qwt_plot_item.h:146
QwtPlotItem::RenderHints
QFlags< RenderHint > RenderHints
Render hints.
Definition:
qwt_plot_item.h:211
right
lu_byte right
Definition:
lparser.c:1229
QwtPlotItem::Rtti_PlotTradingCurve
For QwtPlotTradingCurve.
Definition:
qwt_plot_item.h:110
QWT_EXPORT
#define QWT_EXPORT
Definition:
qwt_global.h:38
QwtPlotItem::Rtti_PlotSpectroCurve
For QwtPlotSpectroCurve.
Definition:
qwt_plot_item.h:95
left
lu_byte left
Definition:
lparser.c:1228
QwtPlotItem::Rtti_PlotMultiBarChart
For QwtPlotMultiBarChart.
Definition:
qwt_plot_item.h:116
QwtPlotItem::ItemAttributes
QFlags< ItemAttribute > ItemAttributes
Plot Item Attributes.
Definition:
qwt_plot_item.h:167
QwtScaleDiv
A class representing a scale division.
Definition:
qwt_scale_div.h:33
QwtPlot
A 2-D plotting widget.
Definition:
qwt_plot.h:75
QwtPlotItem::Rtti_PlotHistogram
For QwtPlotHistogram.
Definition:
qwt_plot_item.h:101
QwtPlotItem::ItemInterests
QFlags< ItemInterest > ItemInterests
Plot Item Interests.
Definition:
qwt_plot_item.h:201
qwt_global.h
QwtPlotItem::PrivateData
Definition:
qwt_plot_item.cpp:19
QwtPlotItem::RttiValues
RttiValues
Runtime type information.
Definition:
qwt_plot_item.h:74
QwtPlotItem::Rtti_PlotShape
For QwtPlotShapeItem.
Definition:
qwt_plot_item.h:119
QwtPlotItem::Rtti_PlotLegend
For QwtPlotLegendItem.
Definition:
qwt_plot_item.h:86
QwtText
A class representing a text.
Definition:
qwt_text.h:51
QwtPlotItem::Rtti_PlotZone
For QwtPlotZoneItem.
Definition:
qwt_plot_item.h:125
QwtGraphic
A paint device for scalable graphics.
Definition:
qwt_graphic.h:75
QwtPlotItem::RenderHint
RenderHint
Render hints.
Definition:
qwt_plot_item.h:204
QwtPlotItem::Rtti_PlotIntervalCurve
For QwtPlotIntervalCurve.
Definition:
qwt_plot_item.h:98
QwtScaleMap
A scale map.
Definition:
qwt_scale_map.h:26
sol::stack::top
int top(lua_State *L)
Definition:
sol.hpp:10543
QwtPlotItem::Rtti_PlotTextLabel
For QwtPlotTextLabel.
Definition:
qwt_plot_item.h:122
QwtPlotItem::Rtti_PlotMarker
For QwtPlotMarker.
Definition:
qwt_plot_item.h:89
QwtPlotItem::Rtti_PlotVectorField
For QwtPlotVectorField.
Definition:
qwt_plot_item.h:128
QwtPlotItem
Base class for items on the plot canvas.
Definition:
qwt_plot_item.h:65
QwtPlotItem::Rtti_PlotGrid
For QwtPlotGrid.
Definition:
qwt_plot_item.h:80
QwtPlotItem::ItemInterest
ItemInterest
Plot Item Interests.
Definition:
qwt_plot_item.h:179
QwtLegendData
Attributes of an entry on a legend.
Definition:
qwt_legend_data.h:36
QList
Definition:
qwt_abstract_legend.h:17
QwtPlotItem::Rtti_PlotBarChart
For QwtPlotBarChart.
Definition:
qwt_plot_item.h:113
QwtPlotItem::Rtti_PlotCurve
For QwtPlotCurve.
Definition:
qwt_plot_item.h:92
plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Dec 6 2020 03:48:10