BIMHome v1.0.0
BIMHome接口文档说明
TechDrawConfig.h
浏览该文件的文档.
1/************************************************************************
2* @file
3*
4* @brief
5*
6* @details
7*
8* @author eric
9*
10* @version 版本号 V0.1
11*
12* @date 2024-12-11
13*
14* @license 北京华科软科技有限公司
15*
16*************************************************************************/
17
18#ifndef TECHDRAWCONFIG_H
19#define TECHDRAWCONFIG_H
20#include <QVector>
21#include <QString>
22#include <QCoreApplication>
23#include "BHGlobal.h"
24namespace TechDraw
25{
26 // TechDrawConfig.ini 配置文件路径
27 const QString TechDrawConfigPath = QCoreApplication::applicationDirPath() + QObject::tr("//ConfigFiles//TechDraw//TechDrawConfig.ini");;
28
29 typedef struct GeneralStruct {
34 QString labelFont;
41 if (this != &rhs) {
45 AutoDist = rhs.AutoDist;
46 labelFont = rhs.labelFont;
47 labelSize = rhs.labelSize;
52 }
53 return *this;
54 }
55 }GeneralStruct;
56
57 typedef struct ScaleStruct {
66 if (this != &rhs) {
74 }
75 return *this;
76 }
77 }ScaleStruct;
78
79 typedef struct DimensionStruct{
84 QString formatSpec;
88 if (this != &rhs) {
91 ShowUnits = rhs.ShowUnits;
96 }
97 return *this;
98 }
99 }DimensionStruct;
100
101 typedef struct AnnotationStruct {
116 if (this != &rhs) {
119 LineGroup = rhs.LineGroup;
130 }
131 return *this;
132 }
133 }AnnotationStruct;
134
135 typedef struct ColorStruct {
136 uint32_t NormalColor;
137 uint32_t HiddenColor;
140 uint32_t SelectColor;
141 uint32_t SectionColor;
142 uint32_t Background;
143 uint32_t Hatch;
144 uint32_t DimColor;
145 uint32_t GeomHatch;
146 uint32_t CenterColor;
147 uint32_t VertexColor;
149 uint32_t MarksColor;
150 uint32_t gridColor;
151 uint32_t FaceColor;
152 uint32_t bkgColor;
155 if (this != &rhs) {
163 Hatch = rhs.Hatch;
164 DimColor = rhs.DimColor;
165 GeomHatch = rhs.GeomHatch;
170 gridColor = rhs.gridColor;
171 FaceColor = rhs.FaceColor;
172 ClearFace = rhs.ClearFace;
173 }
174 return *this;
175 }
176 }ColorStruct;
177
178 typedef struct HLRStruct {
183 bool IsoViz;
187 bool IsoHid;
190 if (this != &rhs) {
192 HardViz = rhs.HardViz;
193 SmoothViz = rhs.SmoothViz;
194 SeamViz = rhs.SeamViz;
195 IsoViz = rhs.IsoViz;
196 HardHid = rhs.HardHid;
197 SmoothHid = rhs.SmoothHid;
198 SeamHid = rhs.SeamHid;
199 IsoHid = rhs.IsoHid;
200 IsoCount = rhs.IsoCount;
201 }
202 return *this;
203 }
204 }HLRStruct;
205
206 typedef struct AdvancedStruct {
214 double EdgeFuzz;
215 double MarkFuzz;
220 if (this != &rhs) {
228 EdgeFuzz = rhs.EdgeFuzz;
229 MarkFuzz = rhs.MarkFuzz;
232 MaxSeg = rhs.MaxSeg;
233 }
234 return *this;
235 }
236 }AdvancedStruct;
237
238 class TechDrawExport TechDrawConfig
239 {
240 public:
241 TechDrawConfig(const QString& file);
243
244
245 void parseFile();
246 void saveFile();
248 return mGeneralStruct;
249 }
250 void setGeneralStruct(const GeneralStruct& conf) {
251 mGeneralStruct = conf;
252 }
254 return mScaleStruct;
255 }
256 void setScaleStruct(const ScaleStruct& conf) {
257 mScaleStruct = conf;
258 }
260 return mDimensionStruct;
261 }
263 mDimensionStruct = conf;
264 }
266 return mAnnotationStruct;
267 }
269 mAnnotationStruct = conf;
270 }
272 return mHLRStruct;
273 }
274 void setHLRStruct(const HLRStruct& conf) {
275 mHLRStruct = conf;
276 }
278 return mAdvancedStruct;
279 }
281 mAdvancedStruct = conf;
282 }
284 return mColorStruct;
285 }
286 void setColorStruct(const ColorStruct& conf) {
287 mColorStruct = conf;
288 }
289 private:
290 QString mPath;
291
299 };
300};
301
302#endif // TECHDRAWCONFIG_H
Definition LineGroup.h:26
DimensionStruct mDimensionStruct
Definition TechDrawConfig.h:294
void setAnnotationStruct(const AnnotationStruct &conf)
Definition TechDrawConfig.h:268
ScaleStruct mScaleStruct
Definition TechDrawConfig.h:293
GeneralStruct getGeneralStruct()
Definition TechDrawConfig.h:247
HLRStruct mHLRStruct
Definition TechDrawConfig.h:296
HLRStruct getHLRStruct()
Definition TechDrawConfig.h:271
void setGeneralStruct(const GeneralStruct &conf)
Definition TechDrawConfig.h:250
ColorStruct mColorStruct
Definition TechDrawConfig.h:298
void setDimensionStruct(const DimensionStruct &conf)
Definition TechDrawConfig.h:262
void setAdvancedStruct(const AdvancedStruct &conf)
Definition TechDrawConfig.h:280
QString mPath
Definition TechDrawConfig.h:290
void setHLRStruct(const HLRStruct &conf)
Definition TechDrawConfig.h:274
AnnotationStruct mAnnotationStruct
Definition TechDrawConfig.h:295
TechDrawConfig(const QString &file)
GeneralStruct mGeneralStruct
Definition TechDrawConfig.h:292
ColorStruct getColorStruct()
Definition TechDrawConfig.h:283
void setScaleStruct(const ScaleStruct &conf)
Definition TechDrawConfig.h:256
void setColorStruct(const ColorStruct &conf)
Definition TechDrawConfig.h:286
AdvancedStruct mAdvancedStruct
Definition TechDrawConfig.h:297
DimensionStruct getDimensionStruct()
Definition TechDrawConfig.h:259
AnnotationStruct getAnnotationStruct()
Definition TechDrawConfig.h:265
ScaleStruct getScaleStruct()
Definition TechDrawConfig.h:253
AdvancedStruct getAdvancedStruct()
Definition TechDrawConfig.h:277
Definition TechDrawConfig.h:239
const QString TechDrawConfigPath
Definition TechDrawConfig.h:27
Definition ArrowPropEnum.h:26
bool SectionFuseFirst
Definition TechDrawConfig.h:212
bool debugDetail
Definition TechDrawConfig.h:210
int EdgeCapStyle
Definition TechDrawConfig.h:216
bool ShowLoose2d
Definition TechDrawConfig.h:213
int MaxSeg
Definition TechDrawConfig.h:218
bool debugSection
Definition TechDrawConfig.h:209
int MaxSVGTile
Definition TechDrawConfig.h:217
double MarkFuzz
Definition TechDrawConfig.h:215
AdvancedStruct & operator=(const AdvancedStruct &rhs)
Definition TechDrawConfig.h:219
bool HandleFaces
Definition TechDrawConfig.h:207
bool ShowSectionEdges
Definition TechDrawConfig.h:208
bool allowCrazyEdge
Definition TechDrawConfig.h:211
double EdgeFuzz
Definition TechDrawConfig.h:214
Definition TechDrawConfig.h:206
bool PrintCenterMarks
Definition TechDrawConfig.h:114
bool AutoHorizontal
Definition TechDrawConfig.h:112
AnnotationStruct & operator=(const AnnotationStruct &rhs)
Definition TechDrawConfig.h:115
bool ShowCenterMarks
Definition TechDrawConfig.h:113
bool PyramidOrtho
Definition TechDrawConfig.h:111
int SectionLineStyle
Definition TechDrawConfig.h:103
int CenterLineStyle
Definition TechDrawConfig.h:107
int BalloonShape
Definition TechDrawConfig.h:108
int LineGroup
Definition TechDrawConfig.h:104
int SectionLineStandard
Definition TechDrawConfig.h:102
int MattingStyle
Definition TechDrawConfig.h:105
int HighlightStyle
Definition TechDrawConfig.h:106
double BalloonKink
Definition TechDrawConfig.h:110
int BalloonArrow
Definition TechDrawConfig.h:109
Definition TechDrawConfig.h:101
uint32_t PreSelectColor
Definition TechDrawConfig.h:138
uint32_t CutSurfaceColor
Definition TechDrawConfig.h:139
uint32_t MarksColor
Definition TechDrawConfig.h:149
uint32_t Background
Definition TechDrawConfig.h:142
uint32_t HiddenColor
Definition TechDrawConfig.h:137
uint32_t Hatch
Definition TechDrawConfig.h:143
uint32_t DimColor
Definition TechDrawConfig.h:144
uint32_t SectionColor
Definition TechDrawConfig.h:141
uint32_t bkgColor
Definition TechDrawConfig.h:152
uint32_t CenterColor
Definition TechDrawConfig.h:146
ColorStruct & operator=(const ColorStruct &rhs)
Definition TechDrawConfig.h:154
uint32_t FaceColor
Definition TechDrawConfig.h:151
uint32_t HighlightColor
Definition TechDrawConfig.h:148
uint32_t gridColor
Definition TechDrawConfig.h:150
uint32_t GeomHatch
Definition TechDrawConfig.h:145
uint32_t VertexColor
Definition TechDrawConfig.h:147
uint32_t NormalColor
Definition TechDrawConfig.h:136
uint32_t SelectColor
Definition TechDrawConfig.h:140
bool ClearFace
Definition TechDrawConfig.h:153
Definition TechDrawConfig.h:135
int AltDecimals
Definition TechDrawConfig.h:83
QString formatSpec
Definition TechDrawConfig.h:84
int StandardAndStyle
Definition TechDrawConfig.h:80
double TolSizeAdjust
Definition TechDrawConfig.h:85
QString DiameterSymbol
Definition TechDrawConfig.h:86
bool ShowUnits
Definition TechDrawConfig.h:82
bool UseGlobalDecimals
Definition TechDrawConfig.h:81
DimensionStruct & operator=(const DimensionStruct &rhs)
Definition TechDrawConfig.h:87
Definition TechDrawConfig.h:79
int labelSize
Definition TechDrawConfig.h:35
bool use3DUpdate
Definition TechDrawConfig.h:30
bool KeepPagesUpToDate
Definition TechDrawConfig.h:32
QString labelFont
Definition TechDrawConfig.h:34
bool isShowGrid
Definition TechDrawConfig.h:38
int hiddenLineStyle
Definition TechDrawConfig.h:37
int projectionAngle
Definition TechDrawConfig.h:36
bool AutoDist
Definition TechDrawConfig.h:33
bool allowPageCoverd
Definition TechDrawConfig.h:31
int gridSpacing
Definition TechDrawConfig.h:39
GeneralStruct & operator=(const GeneralStruct &rhs)
Definition TechDrawConfig.h:40
Definition TechDrawConfig.h:29
bool IsoViz
Definition TechDrawConfig.h:183
bool HardHid
Definition TechDrawConfig.h:184
bool SeamViz
Definition TechDrawConfig.h:182
bool IsoHid
Definition TechDrawConfig.h:187
bool SmoothHid
Definition TechDrawConfig.h:185
int IsoCount
Definition TechDrawConfig.h:188
bool SeamHid
Definition TechDrawConfig.h:186
bool SmoothViz
Definition TechDrawConfig.h:181
bool HardViz
Definition TechDrawConfig.h:180
bool UsePolygon
Definition TechDrawConfig.h:179
HLRStruct & operator=(const HLRStruct &rhs)
Definition TechDrawConfig.h:189
Definition TechDrawConfig.h:178
double VertexScale
Definition TechDrawConfig.h:61
double TemplateDotSize
Definition TechDrawConfig.h:63
ScaleStruct & operator=(const ScaleStruct &rhs)
Definition TechDrawConfig.h:65
QString DefaultScaleType
Definition TechDrawConfig.h:59
double SymbolFactor
Definition TechDrawConfig.h:64
double DefaultViewScale
Definition TechDrawConfig.h:60
double PageDefaultScale
Definition TechDrawConfig.h:58
double CenterMarkScale
Definition TechDrawConfig.h:62
Definition TechDrawConfig.h:57