QWT API (中文) 7.3.0
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
qwt3d_colorlegend.h
1#ifndef QWT3D_COLORLEGEND_H
2#define QWT3D_COLORLEGEND_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{
11
17class QWT3D_EXPORT ColorLegend : public Drawable
18{
19 QWT_DECLARE_PRIVATE(ColorLegend)
20
21public:
22 // Possible anchor points for caption and axis
23 enum SCALEPOSITION
24 {
25 Top,
26 Bottom,
27 Left,
28 Right
29 };
30
31 // Orientation of the legend
32 enum ORIENTATION
33 {
34 BottomTop,
35 LeftRight
36 };
37
38 // Standard constructor
40 ~ColorLegend() override;
41
42 // Draws the object - called by updateGL()
43 virtual void draw() override;
44
45 // Sets the relative position of the legend inside widget
46 void setRelPosition(Qwt3D::Tuple relMin, Qwt3D::Tuple relMax);
47 // Sets legend orientation and scale position
48 void setOrientation(ORIENTATION, SCALEPOSITION);
49 // Sets the limit of the scale
50 void setLimits(double start, double stop);
51 // Sets scale major tics
52 void setMajors(int);
53 // Sets scale minor tics
54 void setMinors(int);
55 // Sets whether a scale will be drawn
56 void drawScale(bool val);
57 // Sets whether the scale will have scale numbers
58 void drawNumbers(bool val);
59 // Sets whether the axis is autoscaled or not
60 void setAutoScale(bool val);
61 // Sets another scale
62 void setScale(Qwt3D::Scale* scale);
63 // Sets one of the predefined scale types
64 void setScale(Qwt3D::SCALETYPE);
65
66 // Sets the legends caption string
67 void setTitleString(QString const& s);
68
69 // Sets the legends caption font
70 void setTitleFont(QString const& family, int pointSize, int weight = QFont::Normal, bool italic = false);
71
72 // The color vector
73 Qwt3D::ColorVector colors;
74
75private:
76 Qwt3D::ParallelEpiped geometry() const;
77 void setGeometryInternal();
78};
79
80} // ns
81
82#endif
A flat color legend
Definition qwt3d_colorlegend.h:18
Abstract base class for Drawables
Definition qwt3d_drawable.h:15
Non-visual scale class encapsulating tic generation
Definition qwt3d_scale.h:22
Parallelepiped spanned by 2 Triples
Definition qwt3d_types.h:303
Tuple [x,y]
Definition qwt3d_types.h:151