QWT API (English) 7.3.0
Qt Widget Library for Technical Applications - English API Documentation
Loading...
Searching...
No Matches
qwt3d_waterfall.h
1#ifndef QWT3D_WATERFALL_H
2#define QWT3D_WATERFALL_H
3
4#include "qwt3d_plotitem.h"
5#include "qwt3d_types.h"
6#include "qwt3d_color.h"
7
8#include <QVector>
9
41class QWT3D_EXPORT Qwt3DWaterfall : public Qwt3DPlotItem
42{
43 QWT_DECLARE_PRIVATE(Qwt3DWaterfall)
44
45public:
54
57 {
60 Solid
61 };
62
65 {
67 NewestBehind
68 };
69
71 ~Qwt3DWaterfall() override;
72
73 // ---- Data / sliding window ----
74
76 int traceCapacity() const;
78 void setTraceCapacity(int count);
80 int traceCount() const;
82 int samplesPerTrace() const;
83
85 void pushTrace(const double* values, int count);
87 void pushTrace(const QVector<double>& values);
89 void clear();
90
92 void setBinValues(const QVector<double>& x);
94 QVector<double> binValues() const;
95
97 DepthOrder depthOrder() const;
99 void setDepthOrder(DepthOrder order);
100
101 // ---- Style ----
102
104 PlotStyle plotStyle() const;
106 void setPlotStyle(PlotStyle style);
108 ColorMode colorMode() const;
110 void setColorMode(ColorMode mode);
111
113 void setColor(RGBA color);
115 RGBA color() const;
116
118 void setDataColor(Qwt3DColor* color);
120 const Qwt3DColor* dataColor() const;
122 void invalidateColors();
123
126 void setColorRange(double min, double max);
128 void resetColorRange();
130 bool hasFixedColorRange() const;
131
134 double baseline() const;
136 void setBaseline(double value);
138 void resetBaseline();
139
141 double opacity() const;
143 void setOpacity(double alpha);
144
146 RGBA outlineColor() const;
148 void setOutlineColor(RGBA color);
150 double outlineWidth() const;
152 void setOutlineWidth(double width);
153
154 // ---- Qwt3DPlotItem interface ----
155
156 int rtti() const override;
157 void draw() override;
158 ParallelEpiped hull() const override;
159 void populateLegendColors(ColorVector& colors) const override;
160
161private:
162 void buildVBO();
163 void buildOutlineVBO();
164 void buildTubeVBO();
165 void pushColorRange() const;
166 void ensureDataColor();
167};
168
169#endif // QWT3D_WATERFALL_H
Definition qwt_clipper.h:41
Abstract base class for color functors.
Definition qwt3d_color.h:25
Base class for all 3D plot items.
Definition qwt3d_plotitem.h:55
virtual ParallelEpiped hull() const =0
Get the bounding hull of the item in 3D space.
virtual int rtti() const
Runtime type information.
Definition qwt3d_plotitem.cpp:192
virtual void draw()=0
Draw the item using the current GL context.
virtual void populateLegendColors(ColorVector &colors) const
Populate the legend color vector from the item's color functor.
Definition qwt3d_plotitem.cpp:181
3D waterfall plot item with a built-in sliding window
Definition qwt3d_waterfall.h:42
ColorMode
Where the per-vertex color comes from.
Definition qwt3d_waterfall.h:57
@ ByDepth
Colormap over the trace position in the window (default)
Definition qwt3d_waterfall.h:58
@ ByAmplitude
Colormap over the sample value.
Definition qwt3d_waterfall.h:59
int traceCapacity() const
Returns the number of visible traces (window size)
PlotStyle
Geometry style of a trace.
Definition qwt3d_waterfall.h:48
@ Ribbon
Filled curtain from the baseline up to the trace (default)
Definition qwt3d_waterfall.h:49
@ RibbonMesh
Ribbon plus a line outline drawn on top.
Definition qwt3d_waterfall.h:50
@ Wireframe
Line outline only (no fill)
Definition qwt3d_waterfall.h:51
DepthOrder
Depth direction of the sliding window.
Definition qwt3d_waterfall.h:65
@ NewestInFront
The newest trace sits at the largest y (default)
Definition qwt3d_waterfall.h:66
Parallelepiped spanned by 2 Triples.
Definition qwt3d_types.h:334
Red-Green-Blue-Alpha value.
Definition qwt3d_types.h:395