-
Notifications
You must be signed in to change notification settings - Fork 0
/
sector.cpp
235 lines (185 loc) · 4.44 KB
/
sector.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
#include "sector.h"
Sector::Sector() {
// TODO Auto-generated constructor stub
//X,Y坐标
xloc = 0;
yloc = 0;
//宽、高
width = 0;
height=0;
//起始角度、跨度
startAngle = 30;
endAngle = 150;
spanAngle = 120;
//圆弧上刻度线 旋转的刻度
rotateAngle = 1;
//刻度进制 即多少个小刻度组成一个大刻度
numSystem = 30;
//圆弧上刻度的个数,刻度线的宽度
arcCalNum = 120;
arcCalWidth = 5;
//半径上刻度的个数,刻度线的宽度
radCalNum = 3;
radCalWidth = 5;//直接绘制的圆弧 故此变量未使用
//value
//圆弧刻度上标定的起始刻度的值、每个刻度代表的值,每隔几个刻度标定一次值
arcStartVal = 0;
arcValPerScale = 1;
arcSpaceScale = 10;//暂未使用
//圆弧刻度上标定的起始刻度的值、每个刻度代表的值,每隔几个刻度标定一次值
radStartVal = 0;
radValPerScale = 1;
radSpaceScale = 10;//暂未使用
//扇形边框颜色
rgb_Red = 255;
rgb_Blue = 255;
rgb_Green = 255;
}
Sector::~Sector() {
// TODO Auto-generated destructor stub
}
int Sector::getArcCalNum() const {
return arcCalNum;
}
void Sector::setArcCalNum(int arcCalNum) {
this->arcCalNum = arcCalNum;
}
int Sector::getArcCalWidth() const {
return arcCalWidth;
}
void Sector::setArcCalWidth(int arcCalWidth) {
this->arcCalWidth = arcCalWidth;
}
int Sector::getArcSpaceScale() const {
return arcSpaceScale;
}
void Sector::setArcSpaceScale(int arcSpaceScale) {
this->arcSpaceScale = arcSpaceScale;
}
int Sector::getArcStartVal() const {
return arcStartVal;
}
void Sector::setArcStartVal(int arcStartVal) {
this->arcStartVal = arcStartVal;
}
int Sector::getArcValPerScale() const {
return arcValPerScale;
}
void Sector::setArcValPerScale(int arcValPerScale) {
this->arcValPerScale = arcValPerScale;
}
int Sector::getEndAngle() const {
return endAngle;
}
void Sector::setEndAngle(int endAngle) {
this->endAngle = endAngle;
}
int Sector::getHeight() const {
return height;
}
void Sector::setHeight(int height) {
this->height = height;
}
int Sector::getRadCalNum() const {
return radCalNum;
}
void Sector::setRadCalNum(int radCalNum) {
this->radCalNum = radCalNum;
}
int Sector::getRadCalWidth() const {
return radCalWidth;
}
void Sector::setRadCalWidth(int radCalWidth) {
this->radCalWidth = radCalWidth;
}
int Sector::getRadSpaceScale() const {
return radSpaceScale;
}
void Sector::setRadSpaceScale(int radSpaceScale) {
this->radSpaceScale = radSpaceScale;
}
int Sector::getRadStartVal() const {
return radStartVal;
}
void Sector::setRadStartVal(int radStartVal) {
this->radStartVal = radStartVal;
}
int Sector::getRadValPerScale() const {
return radValPerScale;
}
void Sector::setRadValPerScale(int radValPerScale) {
this->radValPerScale = radValPerScale;
}
int Sector::getRgbBlue() const {
return rgb_Blue;
}
void Sector::setRgbBlue(int rgbBlue) {
rgb_Blue = rgbBlue;
}
int Sector::getRgbGreen() const {
return rgb_Green;
}
void Sector::setRgbGreen(int rgbGreen) {
rgb_Green = rgbGreen;
}
int Sector::getRgbRed() const {
return rgb_Red;
}
void Sector::setRgbRed(int rgbRed) {
rgb_Red = rgbRed;
}
int Sector::getStartAngle() const {
return startAngle;
}
void Sector::setStartAngle(int startAngle) {
this->startAngle = startAngle;
}
int Sector::getWidth() const {
return width;
}
void Sector::setWidth(int width) {
this->width = width;
}
int Sector::getXloc() const {
return xloc;
}
void Sector::setXloc(int xloc) {
this->xloc = xloc;
}
int Sector::getYloc() const {
return yloc;
}
void Sector::setYloc(int yloc) {
this->yloc = yloc;
}
int Sector::getSpanAngle() const {
return spanAngle;
}
void Sector::setSpanAngle(int spanAngle) {
this->spanAngle = spanAngle;
}
int Sector::getRotateAngle() const {
return rotateAngle;
}
void Sector::setRotateAngle(int rotateAngle) {
this->rotateAngle = rotateAngle;
}
int Sector::getNumSystem() const {
return numSystem;
}
void Sector::setNumSystem(int numSystem) {
this->numSystem = numSystem;
}
QPoint Sector::getCenter() const{
return center ;
}
void Sector:: setCenter(QPoint center){
this->center = center;
}
QPoint Sector::calculateCenter(){
QPoint p ;
p.setX(xloc + width / 2);
p.setY(yloc + height / 2);
this->setCenter(p);
return center;
}