QCAD
Open Source 2D CAD
Loading...
Searching...
No Matches
RLineweight.h
Go to the documentation of this file.
1
20#ifndef RLINEWEIGHT_H_
21#define RLINEWEIGHT_H_
22
23#include "core_global.h"
24
25#include <QCoreApplication>
26#include <QMetaType>
27#include <QString>
28#include <QIcon>
29#include <QList>
30
31#ifndef RDEFAULT_QSIZE_ICON
32#define RDEFAULT_QSIZE_ICON QSize(32,10)
33#endif
34
40
41 Q_DECLARE_TR_FUNCTIONS(RLineweight)
42
43public:
45 Weight000 = 0,
46 Weight005 = 5,
47 Weight009 = 9,
48 Weight013 = 13,
49 Weight015 = 15,
50 Weight018 = 18,
51 Weight020 = 20,
52 Weight025 = 25,
53 Weight030 = 30,
54 Weight035 = 35,
55 Weight040 = 40,
56 Weight050 = 50,
57 Weight053 = 53,
58 Weight060 = 60,
59 Weight070 = 70,
60 Weight080 = 80,
61 Weight090 = 90,
62 Weight100 = 100,
63 Weight106 = 106,
64 Weight120 = 120,
65 Weight140 = 140,
66 Weight158 = 158,
67 Weight200 = 200,
68 Weight211 = 211,
69 WeightByLayer = -1,
70 WeightByBlock = -2,
71 WeightByLwDefault = -3,
72 WeightInvalid = -4
73 };
74
75public:
77 static QList<QPair<QString, RLineweight::Lineweight> > getList(bool onlyFixed, bool noDefault = false);
78 static QIcon getIcon(RLineweight::Lineweight color, const QSize& size = RDEFAULT_QSIZE_ICON);
79 static QString getName(RLineweight::Lineweight lineweight);
80
81 static RLineweight::Lineweight getClosestMatch(double lw);
82
83private:
84 static void init();
85 static void init(const QString& cn, RLineweight::Lineweight lineweight);
86
87private:
88 static bool isInitialized;
89 static QList<QPair<QString, RLineweight::Lineweight> > list;
90 //static QMap<RLineweight::Lineweight, QIcon> iconMap;
92
93};
94
98typedef QPair<QString, RLineweight::Lineweight> _RPairStringRLineweight;
101
102#endif /* RLINEWEIGHT_H_ */
void init(void basePath)
Definition AddBlockInit.js:2
#define RDEFAULT_QSIZE_ICON
Definition RColor.h:33
QPair< QString, RLineweight::Lineweight > _RPairStringRLineweight
Definition RLineweight.h:98
Q_DECLARE_METATYPE(RMath *)
Definition RDebug.h:38
Definition RLineweight.h:39
Lineweight
Definition RLineweight.h:44
static QMap< QPair< RLineweight::Lineweight, QPair< int, int > >, QIcon > iconMap
Definition RLineweight.h:91
static bool isInitialized
Definition RLineweight.h:88
static QList< QPair< QString, RLineweight::Lineweight > > list
Copyright (c) 2011-2018 by Andrew Mustun.
Definition RLineweight.h:89
#define QCADCORE_EXPORT
Definition core_global.h:10