Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
3rdparty
qwt
src
qwt_plot_vectorfield.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_VECTOR_FIELD_H
11
#define QWT_PLOT_VECTOR_FIELD_H
12
13
#include "
qwt_global.h
"
14
#include "
qwt_plot_seriesitem.h
"
15
16
class
QwtVectorFieldSymbol
;
17
class
QwtColorMap
;
18
class
QPen;
19
class
QBrush;
20
21
class
QWT_EXPORT
QwtPlotVectorField
:
22
public
QwtPlotSeriesItem
,
public
QwtSeriesStore
<QwtVectorFieldSample>
23
{
24
public
:
25
enum
IndicatorOrigin
26
{
27
OriginHead
,
28
OriginTail
,
29
OriginCenter
30
};
31
36
enum
PaintAttribute
37
{
38
FilterVectors = 0x01,
39
LimitLength = 0x02
40
};
41
43
typedef
QFlags<PaintAttribute>
PaintAttributes
;
44
45
enum
MagnitudeMode
46
{
47
MagnitudeAsColor = 0x01,
48
MagnitudeAsLength = 0x02
49
};
50
52
typedef
QFlags<MagnitudeMode>
MagnitudeModes
;
53
54
explicit
QwtPlotVectorField
(
const
QString &title = QString() );
55
explicit
QwtPlotVectorField
(
const
QwtText
&title );
56
57
virtual
~
QwtPlotVectorField
();
58
59
void
setPaintAttribute(
PaintAttribute
,
bool
on =
true
);
60
bool
testPaintAttribute(
PaintAttribute
)
const
;
61
62
void
setMagnitudeMode(
MagnitudeMode
,
bool
on =
true
);
63
bool
testMagnitudeMode(
MagnitudeMode
)
const
;
64
65
MagnitudeModes magnitudeModes()
const
;
66
void
setMagnitudeModes( MagnitudeModes );
67
68
void
setSymbol(
QwtVectorFieldSymbol
* );
69
const
QwtVectorFieldSymbol
* symbol()
const
;
70
71
void
setPen(
const
QPen & );
72
QPen pen()
const
;
73
74
void
setBrush(
const
QBrush & );
75
QBrush brush()
const
;
76
77
void
setRasterSize(
const
QSizeF& );
78
QSizeF rasterSize()
const
;
79
80
void
setIndicatorOrigin(
IndicatorOrigin
);
81
IndicatorOrigin
indicatorOrigin()
const
;
82
83
void
setSamples(
const
QVector<QwtVectorFieldSample>
& );
84
void
setSamples(
QwtVectorFieldData
* );
85
86
void
setColorMap(
QwtColorMap
* );
87
const
QwtColorMap
*colorMap()
const
;
88
void
setMagnitudeRange(
const
QwtInterval
& magnitudeRange);
89
90
virtual
double
arrowLength(
double
magnitude )
const
;
91
92
virtual
QRectF
boundingRect
() const
QWT_OVERRIDE
;
93
94
virtual
void
drawSeries( QPainter *,
95
const
QwtScaleMap
&xMap, const
QwtScaleMap
&yMap,
96
const QRectF &canvasRect,
int
from,
int
to ) const
QWT_OVERRIDE
;
97
98
virtual
int
rtti() const QWT_OVERRIDE;
99
100
virtual
QwtGraphic
legendIcon(
101
int
index, const QSizeF & ) const QWT_OVERRIDE;
102
103
void
setMagnitudeScaleFactor(
double
factor );
104
double
magnitudeScaleFactor() const;
105
106
protected:
107
virtual
void
drawSymbols( QPainter *,
108
const
QwtScaleMap
&xMap, const
QwtScaleMap
&yMap,
109
const QRectF &canvasRect,
int
from,
int
to ) const;
110
111
virtual
void
drawSymbol( QPainter *,
112
double
x,
double
y,
double
vx,
double
vy ) const;
113
114
virtual
void
dataChanged() QWT_OVERRIDE;
115
116
private:
117
void
init();
118
119
class
PrivateData
;
120
PrivateData *d_data;
121
};
122
123
Q_DECLARE_OPERATORS_FOR_FLAGS(
QwtPlotVectorField
::PaintAttributes )
124
Q_DECLARE_OPERATORS_FOR_FLAGS(
QwtPlotVectorField
::MagnitudeModes )
125
126
#endif
QwtInterval
A class representing an interval.
Definition:
qwt_interval.h:22
QWT_EXPORT
#define QWT_EXPORT
Definition:
qwt_global.h:38
QVector< QwtVectorFieldSample >
qwt_plot_seriesitem.h
QwtPlotVectorField::IndicatorOrigin
IndicatorOrigin
Definition:
qwt_plot_vectorfield.h:25
QwtPlotVectorField::PrivateData
Definition:
qwt_plot_vectorfield.cpp:239
QwtPlotVectorField::MagnitudeMode
MagnitudeMode
Definition:
qwt_plot_vectorfield.h:45
qwt_global.h
QwtSeriesStore
Class storing a QwtSeriesData object.
Definition:
qwt_series_store.h:66
QwtVectorFieldSymbol
Definition:
qwt_vectorfield_symbol.h:32
QwtText
A class representing a text.
Definition:
qwt_text.h:51
QwtColorMap
QwtColorMap is used to map values into colors.
Definition:
qwt_color_map.h:34
QwtPlotVectorField::PaintAttributes
QFlags< PaintAttribute > PaintAttributes
Paint attributes.
Definition:
qwt_plot_vectorfield.h:43
QwtGraphic
A paint device for scalable graphics.
Definition:
qwt_graphic.h:75
QwtScaleMap
A scale map.
Definition:
qwt_scale_map.h:26
QwtPlotVectorField::OriginHead
Definition:
qwt_plot_vectorfield.h:27
QwtPlotVectorField
Definition:
qwt_plot_vectorfield.h:21
QwtPlotVectorField::PaintAttribute
PaintAttribute
Definition:
qwt_plot_vectorfield.h:36
QwtPlotSeriesItem
Base class for plot items representing a series of samples.
Definition:
qwt_plot_seriesitem.h:24
QwtPlotVectorField::MagnitudeModes
QFlags< MagnitudeMode > MagnitudeModes
Paint attributes.
Definition:
qwt_plot_vectorfield.h:52
QwtVectorFieldData
Definition:
qwt_series_data.h:248
QwtPlotVectorField::OriginTail
Definition:
qwt_plot_vectorfield.h:28
QWT_OVERRIDE
#define QWT_OVERRIDE
Definition:
qwt_global.h:53
QwtPlotSeriesItem::boundingRect
virtual QRectF boundingRect() const QWT_OVERRIDE
Definition:
qwt_plot_seriesitem.cpp:97
plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Dec 6 2020 03:48:10