QWT API (中文) 7.0.1
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
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
带标题的自动缩放坐标轴
Definition qwt3d_axis.h:26
平面颜色图例
Definition qwt3d_colorlegend.h:25
可绘制对象的抽象基类
Definition qwt3d_drawable.h:21
Qt 字符串或输出设备依赖的字符串
Definition qwt3d_label.h:27
非可视化刻度类,封装刻度线生成
Definition qwt3d_scale.h:31
由两个三元组张成的平行六面体
Definition qwt3d_types.h:382
二元组 [x,y]
Definition qwt3d_types.h:213