QWT API (English) 7.0.1
Qt Widget Library for Technical Applications - English API Documentation
Loading...
Searching...
No Matches
qwt3d_colorlegend.h
1#ifndef __PLANE_H__
2#define __PLANE_H__
3
4#include "qwt3d_global.h"
5#include "qwt3d_drawable.h"
6#include "qwt3d_axis.h"
7#include "qwt3d_color.h"
8
9namespace Qwt3D {
10
24class QWT3D_EXPORT ColorLegend : public Drawable
25{
26
27public:
28 // Possible anchor points for caption and axis
29 enum SCALEPOSITION {
30 Top,
31 Bottom,
32 Left,
33 Right
34 };
35
36 // Orientation of the legend
37 enum ORIENTATION {
38 BottomTop,
39 LeftRight
40 };
41
42 // Standard constructor
44
45 // Draws the object - called by updateGL()
46 void draw();
47
48 // Sets the relative position of the legend inside widget
49 void setRelPosition(Qwt3D::Tuple relMin,
50 Qwt3D::Tuple relMax);
51 // Sets legend orientation and scale position
52 void setOrientation(ORIENTATION, SCALEPOSITION);
53 // Sets the limit of the scale
54 void setLimits(double start, double stop);
55 // Sets scale major tics
56 void setMajors(int);
57 // Sets scale minor tics
58 void setMinors(int);
59 // Sets whether a scale will be drawn
60 void drawScale(bool val) { showaxis_ = val; }
61 // Sets whether the scale will have scale numbers
62 void drawNumbers(bool val)
63 {
64 axis_.setNumbers(val);
65 }
66 // Sets whether the axis is autoscaled or not
67 void setAutoScale(bool val);
68 // Sets another scale
69 void setScale(Qwt3D::Scale *scale);
70 // Sets one of the predefined scale types
71 void setScale(Qwt3D::SCALETYPE);
72
73 // Sets the legends caption string
74 void setTitleString(QString const &s);
75
76 // Sets the legends caption font
77 void setTitleFont(QString const &family, int pointSize, int weight = QFont::Normal,
78 bool italic = false);
79
80 // The color vector
81 Qwt3D::ColorVector colors;
82
83private:
84 Qwt3D::Label caption_;
85 Qwt3D::ParallelEpiped geometry() const { return pe_; }
86 void setGeometryInternal();
87
89 Qwt3D::Tuple relMin_, relMax_;
90 Qwt3D::Axis axis_;
91 SCALEPOSITION axisposition_;
92 ORIENTATION orientation_;
93
94 bool showaxis_;
95};
96
97} // ns
98
99#endif
Autoscalable axis with caption.
Definition qwt3d_axis.h:26
A flat color legend.
Definition qwt3d_colorlegend.h:25
Abstract base class for Drawables .
Definition qwt3d_drawable.h:21
A Qt string or an output device dependent string.
Definition qwt3d_label.h:27
Non-visual scale class encapsulating tic generation.
Definition qwt3d_scale.h:31
Parallelepiped spanned by 2 Triples.
Definition qwt3d_types.h:382
Tuple [x,y].
Definition qwt3d_types.h:213