3rdparty
qwt
src
qwt_polar_curve.h
Go to the documentation of this file.
1
/******************************************************************************
2
* QwtPolar Widget Library
3
* Copyright (C) 2008 Uwe Rathmann
4
*
5
* This library is free software; you can redistribute it and/or
6
* modify it under the terms of the Qwt License, Version 1.0
7
*****************************************************************************/
8
9
#ifndef QWT_POLAR_CURVE_H
10
#define QWT_POLAR_CURVE_H
11
12
#include "
qwt_global.h
"
13
#include "
qwt_polar_item.h
"
14
#include "
qwt_point_polar.h
"
15
#include "
qwt_series_data.h
"
16
17
class
QPainter;
18
class
QwtSymbol
;
19
class
QwtCurveFitter
;
20
30
class
QWT_EXPORT
QwtPolarCurve
:
public
QwtPolarItem
31
{
32
public
:
37
enum
CurveStyle
38
{
40
NoCurve
,
41
47
Lines
,
48
50
UserCurve = 100
51
};
52
63
enum
LegendAttribute
64
{
69
LegendShowLine = 0x01,
70
72
LegendShowSymbol = 0x02
73
};
74
75
Q_DECLARE_FLAGS( LegendAttributes, LegendAttribute )
76
77
78
explicit
QwtPolarCurve
();
79
explicit
QwtPolarCurve
(
const
QwtText
& title );
80
explicit
QwtPolarCurve
(
const
QString& title );
81
82
virtual
~
QwtPolarCurve
();
83
84
virtual
int
rtti
() const
QWT_OVERRIDE
;
85
86
void
setLegendAttribute( LegendAttribute,
bool
on = true );
87
bool
testLegendAttribute( LegendAttribute ) const;
88
89
void
setData(
QwtSeriesData
<
QwtPointPolar
>*
data
);
90
const
QwtSeriesData
<
QwtPointPolar
>*
data
() const;
91
92
size_t
dataSize() const;
93
QwtPointPolar
sample(
int
i ) const;
94
95
void
setPen( const QPen& );
96
const QPen& pen() const;
97
98
void
setStyle( CurveStyle style );
99
CurveStyle style() const;
100
101
void
setSymbol(
QwtSymbol
* );
102
const
QwtSymbol
* symbol() const;
103
104
void
setCurveFitter(
QwtCurveFitter
* );
105
QwtCurveFitter
* curveFitter() const;
106
107
virtual
void
draw( QPainter* p,
108
const
QwtScaleMap
& azimuthMap, const
QwtScaleMap
& radialMap,
109
const QPointF& pole,
double
radius,
110
const QRectF& canvasRect ) const
QWT_OVERRIDE
;
111
112
virtual
void
draw( QPainter* p,
113
const
QwtScaleMap
& azimuthMap, const
QwtScaleMap
& radialMap,
114
const QPointF& pole,
int
from,
int
to ) const;
115
116
virtual
QwtInterval
boundingInterval(
int
scaleId ) const
QWT_OVERRIDE
;
117
118
virtual
QwtGraphic
legendIcon(
int
index, const QSizeF& ) const
QWT_OVERRIDE
;
119
120
protected:
121
122
void
init();
123
124
virtual
void
drawCurve( QPainter*,
int
style,
125
const
QwtScaleMap
& azimuthMap, const
QwtScaleMap
& radialMap,
126
const QPointF& pole,
int
from,
int
to ) const;
127
128
virtual
void
drawSymbols( QPainter*, const
QwtSymbol
&,
129
const
QwtScaleMap
& azimuthMap, const
QwtScaleMap
& radialMap,
130
const QPointF& pole,
int
from,
int
to ) const;
131
132
void
drawLines( QPainter*,
133
const
QwtScaleMap
& azimuthMap, const
QwtScaleMap
& radialMap,
134
const QPointF& pole,
int
from,
int
to ) const;
135
136
private:
137
QwtSeriesData
<
QwtPointPolar
>* m_series;
138
139
class
PrivateData
;
140
PrivateData
* m_data;
141
};
142
144
inline const
QwtSeriesData
<
QwtPointPolar
>*
QwtPolarCurve
::
data
()
const
145
{
146
return
m_series;
147
}
148
153
inline
QwtPointPolar
QwtPolarCurve::sample
(
int
i )
const
154
{
155
return
m_series->sample( i );
156
}
157
158
Q_DECLARE_OPERATORS_FOR_FLAGS( QwtPolarCurve::LegendAttributes )
159
160
#endif
QwtPolarCurve::sample
QwtPointPolar sample(int i) const
Definition:
qwt_polar_curve.h:153
QwtPolarCurve::Lines
@ Lines
Definition:
qwt_polar_curve.h:47
QwtGraphic
A paint device for scalable graphics.
Definition:
qwt_graphic.h:75
QwtPolarCurve::LegendAttribute
LegendAttribute
Attributes how to represent the curve on the legend.
Definition:
qwt_polar_curve.h:63
QwtPolarItem::rtti
virtual int rtti() const
Definition:
qwt_polar_item.cpp:112
qwt_global.h
QwtPolarCurve::PrivateData
Definition:
qwt_polar_curve.cpp:40
QwtPointPolar
A point in polar coordinates.
Definition:
qwt_point_polar.h:28
QwtInterval
A class representing an interval.
Definition:
qwt_interval.h:22
QwtText
A class representing a text.
Definition:
qwt_text.h:51
QwtSymbol
A class for drawing symbols.
Definition:
qwt_symbol.h:31
QwtCurveFitter
Abstract base class for a curve fitter.
Definition:
qwt_curve_fitter.h:21
QwtSeriesData
Abstract interface for iterating over samples.
Definition:
qwt_plot_barchart.h:18
QwtPolarCurve::NoCurve
@ NoCurve
Don't draw a curve. Note: This doesn't affect the symbols.
Definition:
qwt_polar_curve.h:40
QwtPolarItem
Base class for items on a polar plot.
Definition:
qwt_polar_item.h:37
qwt_point_polar.h
QwtScaleMap
A scale map.
Definition:
qwt_scale_map.h:26
QwtPolarCurve::CurveStyle
CurveStyle
Definition:
qwt_polar_curve.h:37
QwtPolarCurve
An item, that represents a series of points.
Definition:
qwt_polar_curve.h:30
QWT_OVERRIDE
#define QWT_OVERRIDE
Definition:
qwt_global.h:53
QWT_EXPORT
#define QWT_EXPORT
Definition:
qwt_global.h:38
mqtt_test.data
dictionary data
Definition:
mqtt_test.py:22
qwt_polar_item.h
qwt_series_data.h
plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:46