QWT API (中文) 7.3.0
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
qwt3d_coordsys.h
1#ifndef QWT3D_COORDSYS_H
2#define QWT3D_COORDSYS_H
3
4#include "qwt3d_axis.h"
5#include "qwt3d_colorlegend.h"
6
7namespace Qwt3D
8{
9
13class QWT3D_EXPORT CoordinateSystem : public Drawable
14{
15 QWT_DECLARE_PRIVATE(CoordinateSystem)
16
17public:
18 explicit CoordinateSystem(Qwt3D::Triple blb = Qwt3D::Triple(0, 0, 0),
19 Qwt3D::Triple ftr = Qwt3D::Triple(0, 0, 0),
20 Qwt3D::COORDSTYLE = Qwt3D::BOX);
21 ~CoordinateSystem() override;
22
23 void init(Qwt3D::Triple beg = Qwt3D::Triple(0, 0, 0), Qwt3D::Triple end = Qwt3D::Triple(0, 0, 0));
24 // Set style for the coordinate system (NOCOORD, FRAME or BOX)
25 void setStyle(Qwt3D::COORDSTYLE s,
26 Qwt3D::AXIS frame_1 = Qwt3D::X1,
27 Qwt3D::AXIS frame_2 = Qwt3D::Y1,
28 Qwt3D::AXIS frame_3 = Qwt3D::Z1);
29 // Return style of the coordinate system
30 Qwt3D::COORDSTYLE style() const;
31 // first == front_left_bottom, second == back_right_top
32 void setPosition(Qwt3D::Triple first, Qwt3D::Triple second);
33
34 // Set common color for all axes
35 void setAxesColor(Qwt3D::RGBA val);
36 // Set common font for all axis numberings
37 void setNumberFont(QString const& family, int pointSize, int weight = QFont::Normal, bool italic = false);
38 // Set common font for all axis numberings
39 void setNumberFont(QFont const& font);
40 // Set common color for all axis numberings
41 void setNumberColor(Qwt3D::RGBA val);
42 // Sets an linear axis with real number items
43 void setStandardScale();
44
45 // Fine tunes distance between axis numbering and axis body
46 void adjustNumbers(int val);
47 // Fine tunes distance between axis label and axis body
48 void adjustLabels(int val);
49
50 // Sets color for the grid lines
51 void setGridLinesColor(Qwt3D::RGBA val);
52
53 // Set common font for all axis labels
54 void setLabelFont(QString const& family, int pointSize, int weight = QFont::Normal, bool italic = false);
55 // Set common font for all axis labels
56 void setLabelFont(QFont const& font);
57 // Set common color for all axis labels
58 void setLabelColor(Qwt3D::RGBA val);
59
60 // Set line width for tic marks and axes
61 void setLineWidth(double val, double majfac = 0.9, double minfac = 0.5);
62 // Set length for tic marks
63 void setTicLength(double major, double minor);
64
65 // Switch autoscaling of axes
66 void setAutoScale(bool val = true);
67
68 Qwt3D::Triple first() const;
69 Qwt3D::Triple second() const;
70
71 void setAutoDecoration(bool val = true);
72 bool autoDecoration() const;
73
74 // Draw smooth axes
75 void setLineSmooth(bool val = true);
76 // Smooth axes enabled?
77 bool lineSmooth() const;
78
79 void draw() override;
80
81 // Defines whether a grid between the major and/or minor tics should be drawn
82 void setGridLines(bool majors, bool minors, int sides = Qwt3D::NOSIDEGRID);
83 // Returns grids switched on
84 int grids() const;
85
86 // The vector of all 12 axes - use them to set axis properties individually
87 std::vector< Axis > axes;
88
89private:
90 void destroy();
91 void chooseAxes();
92 void autoDecorateExposedAxis(Axis& ax, bool left);
93 void drawMajorGridLines();
94 void drawMinorGridLines();
95 void drawMajorGridLines(Qwt3D::Axis&, Qwt3D::Axis&);
96 void drawMinorGridLines(Qwt3D::Axis&, Qwt3D::Axis&);
97 void recalculateAxesTics();
98};
99
100} // ns
101
102#endif
Autoscalable axis with caption
Definition qwt3d_axis.h:20
A coordinate system with different styles (BOX, FRAME)
Definition qwt3d_coordsys.h:14
Abstract base class for Drawables
Definition qwt3d_drawable.h:15
Red-Green-Blue-Alpha value
Definition qwt3d_types.h:364
Triple [x,y,z]
Definition qwt3d_types.h:170