23 #ifndef DOMAIN_DISPLAY_PLOT_H
24 #define DOMAIN_DISPLAY_PLOT_H
30 #include <qwt_painter.h>
31 #include <qwt_plot_canvas.h>
32 #include <qwt_plot_curve.h>
33 #include <qwt_scale_engine.h>
34 #include <qwt_scale_widget.h>
35 #include <qwt_plot_zoomer.h>
36 #include <qwt_plot_panner.h>
37 #include <qwt_plot_magnifier.h>
38 #include <qwt_plot_marker.h>
39 #include <qwt_symbol.h>
42 #if QWT_VERSION >= 0x060000
43 #include <qwt_compat.h>
56 Q_PROPERTY ( QColor line_color1 READ getLineColor1 WRITE setLineColor1 )
57 Q_PROPERTY ( QColor line_color2 READ getLineColor2 WRITE setLineColor2 )
58 Q_PROPERTY ( QColor line_color3 READ getLineColor3 WRITE setLineColor3 )
59 Q_PROPERTY ( QColor line_color4 READ getLineColor4 WRITE setLineColor4 )
60 Q_PROPERTY ( QColor line_color5 READ getLineColor5 WRITE setLineColor5 )
61 Q_PROPERTY ( QColor line_color6 READ getLineColor6 WRITE setLineColor6 )
62 Q_PROPERTY ( QColor line_color7 READ getLineColor7 WRITE setLineColor7 )
63 Q_PROPERTY ( QColor line_color8 READ getLineColor8 WRITE setLineColor8 )
64 Q_PROPERTY ( QColor line_color9 READ getLineColor9 WRITE setLineColor9 )
66 Q_PROPERTY (
int line_width1 READ getLineWidth1 WRITE setLineWidth1 )
67 Q_PROPERTY (
int line_width2 READ getLineWidth2 WRITE setLineWidth2 )
68 Q_PROPERTY (
int line_width3 READ getLineWidth3 WRITE setLineWidth3 )
69 Q_PROPERTY (
int line_width4 READ getLineWidth4 WRITE setLineWidth4 )
70 Q_PROPERTY (
int line_width5 READ getLineWidth5 WRITE setLineWidth5 )
71 Q_PROPERTY (
int line_width6 READ getLineWidth6 WRITE setLineWidth6 )
72 Q_PROPERTY (
int line_width7 READ getLineWidth7 WRITE setLineWidth7 )
73 Q_PROPERTY (
int line_width8 READ getLineWidth8 WRITE setLineWidth8 )
74 Q_PROPERTY (
int line_width9 READ getLineWidth9 WRITE setLineWidth9 )
76 Q_PROPERTY ( Qt::PenStyle line_style1 READ getLineStyle1 WRITE setLineStyle1 )
77 Q_PROPERTY ( Qt::PenStyle line_style2 READ getLineStyle2 WRITE setLineStyle2 )
78 Q_PROPERTY ( Qt::PenStyle line_style3 READ getLineStyle3 WRITE setLineStyle3 )
79 Q_PROPERTY ( Qt::PenStyle line_style4 READ getLineStyle4 WRITE setLineStyle4 )
80 Q_PROPERTY ( Qt::PenStyle line_style5 READ getLineStyle5 WRITE setLineStyle5 )
81 Q_PROPERTY ( Qt::PenStyle line_style6 READ getLineStyle6 WRITE setLineStyle6 )
82 Q_PROPERTY ( Qt::PenStyle line_style7 READ getLineStyle7 WRITE setLineStyle7 )
83 Q_PROPERTY ( Qt::PenStyle line_style8 READ getLineStyle8 WRITE setLineStyle8 )
84 Q_PROPERTY ( Qt::PenStyle line_style9 READ getLineStyle9 WRITE setLineStyle9 )
88 Q_ENUMS ( QwtSymbolStyle )
89 Q_PROPERTY ( QwtSymbolStyle line_marker1 READ getLineMarker1 WRITE setLineMarker1 )
90 Q_PROPERTY ( QwtSymbolStyle line_marker2 READ getLineMarker2 WRITE setLineMarker2 )
91 Q_PROPERTY ( QwtSymbolStyle line_marker3 READ getLineMarker3 WRITE setLineMarker3 )
92 Q_PROPERTY ( QwtSymbolStyle line_marker4 READ getLineMarker4 WRITE setLineMarker4 )
93 Q_PROPERTY ( QwtSymbolStyle line_marker5 READ getLineMarker5 WRITE setLineMarker5 )
94 Q_PROPERTY ( QwtSymbolStyle line_marker6 READ getLineMarker6 WRITE setLineMarker6 )
95 Q_PROPERTY ( QwtSymbolStyle line_marker7 READ getLineMarker7 WRITE setLineMarker7 )
96 Q_PROPERTY ( QwtSymbolStyle line_marker8 READ getLineMarker8 WRITE setLineMarker8 )
97 Q_PROPERTY ( QwtSymbolStyle line_marker9 READ getLineMarker9 WRITE setLineMarker9 )
99 Q_PROPERTY (
int marker_alpha1 READ getMarkerAlpha1 WRITE setMarkerAlpha1 )
100 Q_PROPERTY (
int marker_alpha2 READ getMarkerAlpha2 WRITE setMarkerAlpha2 )
101 Q_PROPERTY (
int marker_alpha3 READ getMarkerAlpha3 WRITE setMarkerAlpha3 )
102 Q_PROPERTY (
int marker_alpha4 READ getMarkerAlpha4 WRITE setMarkerAlpha4 )
103 Q_PROPERTY (
int marker_alpha5 READ getMarkerAlpha5 WRITE setMarkerAlpha5 )
104 Q_PROPERTY (
int marker_alpha6 READ getMarkerAlpha6 WRITE setMarkerAlpha6 )
105 Q_PROPERTY (
int marker_alpha7 READ getMarkerAlpha7 WRITE setMarkerAlpha7 )
106 Q_PROPERTY (
int marker_alpha8 READ getMarkerAlpha8 WRITE setMarkerAlpha8 )
107 Q_PROPERTY (
int marker_alpha9 READ getMarkerAlpha9 WRITE setMarkerAlpha9 )
109 Q_PROPERTY ( QColor zoomer_color READ getZoomerColor WRITE setZoomerColor )
110 Q_PROPERTY ( QColor palette_color READ getPaletteColor WRITE setPaletteColor )
111 Q_PROPERTY (
int yaxis_label_font_size READ getYaxisLabelFontSize WRITE setYaxisLabelFontSize )
112 Q_PROPERTY (
int xaxis_label_font_size READ getXaxisLabelFontSize WRITE setXaxisLabelFontSize )
113 Q_PROPERTY (
int axes_label_font_size READ getAxesLabelFontSize WRITE setAxesLabelFontSize )
119 virtual
void replot() = 0;
121 const QColor getLineColor1 () const;
122 const QColor getLineColor2 () const;
123 const QColor getLineColor3 () const;
124 const QColor getLineColor4 () const;
125 const QColor getLineColor5 () const;
126 const QColor getLineColor6 () const;
127 const QColor getLineColor7 () const;
128 const QColor getLineColor8 () const;
129 const QColor getLineColor9 () const;
131 int getLineWidth1 () const;
132 int getLineWidth2 () const;
133 int getLineWidth3 () const;
134 int getLineWidth4 () const;
135 int getLineWidth5 () const;
136 int getLineWidth6 () const;
137 int getLineWidth7 () const;
138 int getLineWidth8 () const;
139 int getLineWidth9 () const;
141 const Qt::PenStyle getLineStyle1 () const;
142 const Qt::PenStyle getLineStyle2 () const;
143 const Qt::PenStyle getLineStyle3 () const;
144 const Qt::PenStyle getLineStyle4 () const;
145 const Qt::PenStyle getLineStyle5 () const;
146 const Qt::PenStyle getLineStyle6 () const;
147 const Qt::PenStyle getLineStyle7 () const;
148 const Qt::PenStyle getLineStyle8 () const;
149 const Qt::PenStyle getLineStyle9 () const;
151 const QwtSymbol::Style getLineMarker1 () const;
152 const QwtSymbol::Style getLineMarker2 () const;
153 const QwtSymbol::Style getLineMarker3 () const;
154 const QwtSymbol::Style getLineMarker4 () const;
155 const QwtSymbol::Style getLineMarker5 () const;
156 const QwtSymbol::Style getLineMarker6 () const;
157 const QwtSymbol::Style getLineMarker7 () const;
158 const QwtSymbol::Style getLineMarker8 () const;
159 const QwtSymbol::Style getLineMarker9 () const;
161 int getMarkerAlpha1 () const;
162 int getMarkerAlpha2 () const;
163 int getMarkerAlpha3 () const;
164 int getMarkerAlpha4 () const;
165 int getMarkerAlpha5 () const;
166 int getMarkerAlpha6 () const;
167 int getMarkerAlpha7 () const;
168 int getMarkerAlpha8 () const;
169 int getMarkerAlpha9 () const;
171 QColor getZoomerColor() const;
172 QColor getPaletteColor() const;
173 int getAxisLabelFontSize(
int axisId) const;
174 int getYaxisLabelFontSize() const;
175 int getXaxisLabelFontSize() const;
176 int getAxesLabelFontSize() const;
183 virtual
void setYaxis(
double min,
double max);
184 virtual
void setXaxis(
double min,
double max);
185 virtual
void setLineLabel(
int which, QString label);
186 virtual QString getLineLabel(
int which);
187 virtual
void setLineColor(
int which, QColor color);
188 virtual QColor getLineColor(
int which) const;
189 virtual
void setLineWidth(
int which,
int width);
190 virtual
int getLineWidth(
int which) const;
191 virtual
void setLineStyle(
int which, Qt::PenStyle style);
192 virtual const Qt::PenStyle getLineStyle(
int which) const;
193 virtual
void setLineMarker(
int which, QwtSymbol::Style marker);
194 virtual const QwtSymbol::Style getLineMarker(
int which) const;
195 virtual
void setMarkerAlpha(
int which,
int alpha);
196 virtual
int getMarkerAlpha(
int which) const;
200 void setLineColor1 (QColor);
201 void setLineColor2 (QColor);
202 void setLineColor3 (QColor);
203 void setLineColor4 (QColor);
204 void setLineColor5 (QColor);
205 void setLineColor6 (QColor);
206 void setLineColor7 (QColor);
207 void setLineColor8 (QColor);
208 void setLineColor9 (QColor);
210 void setLineWidth1 (
int);
211 void setLineWidth2 (
int);
212 void setLineWidth3 (
int);
213 void setLineWidth4 (
int);
214 void setLineWidth5 (
int);
215 void setLineWidth6 (
int);
216 void setLineWidth7 (
int);
217 void setLineWidth8 (
int);
218 void setLineWidth9 (
int);
220 void setLineStyle1 (Qt::PenStyle);
221 void setLineStyle2 (Qt::PenStyle);
222 void setLineStyle3 (Qt::PenStyle);
223 void setLineStyle4 (Qt::PenStyle);
224 void setLineStyle5 (Qt::PenStyle);
225 void setLineStyle6 (Qt::PenStyle);
226 void setLineStyle7 (Qt::PenStyle);
227 void setLineStyle8 (Qt::PenStyle);
228 void setLineStyle9 (Qt::PenStyle);
230 void setLineMarker1 (QwtSymbol::Style);
231 void setLineMarker2 (QwtSymbol::Style);
232 void setLineMarker3 (QwtSymbol::Style);
233 void setLineMarker4 (QwtSymbol::Style);
234 void setLineMarker5 (QwtSymbol::Style);
235 void setLineMarker6 (QwtSymbol::Style);
236 void setLineMarker7 (QwtSymbol::Style);
237 void setLineMarker8 (QwtSymbol::Style);
238 void setLineMarker9 (QwtSymbol::Style);
240 void setMarkerAlpha1 (
int);
241 void setMarkerAlpha2 (
int);
242 void setMarkerAlpha3 (
int);
243 void setMarkerAlpha4 (
int);
244 void setMarkerAlpha5 (
int);
245 void setMarkerAlpha6 (
int);
246 void setMarkerAlpha7 (
int);
247 void setMarkerAlpha8 (
int);
248 void setMarkerAlpha9 (
int);
250 void setZoomerColor(QColor c);
251 void setPaletteColor(QColor c);
252 void setAxisLabelFontSize(
int axisId,
int fs);
253 void setYaxisLabelFontSize(
int fs);
254 void setXaxisLabelFontSize(
int fs);
255 void setAxesLabelFontSize(
int fs);
257 void setStop(
bool on);
259 void resizeSlot(QSize *s);
264 void onPickerPointSelected(const QwtDoublePoint & p);
265 void onPickerPointSelected6(const QPointF & p);
268 void plotPointSelected(const QPointF p);
271 virtual
void legendEntryChecked(QwtPlotItem *plotItem,
bool on);
272 virtual
void legendEntryChecked(const QVariant &plotItem,
bool on,
int index);
276 std::vector<QwtPlotCurve*> d_plot_curve;
278 QwtPlotPanner* d_panner;
279 QwtPlotZoomer* d_zoomer;
282 QwtPlotMagnifier *d_magnifier;
288 QList<QColor> d_trace_colors;
290 bool d_autoscale_state;
QWidget base plot to build QTGUI plotting tools.
Definition: DisplayPlot.h:53
QList< QColor > QColorList
Definition: DisplayPlot.h:46
float min(float a, float b)
QwtSymbol::Style QwtSymbolStyle
Definition: DisplayPlot.h:86
signed __int64 int64_t
Definition: stdint.h:89