|
1 #include "main.h" |
|
2 |
|
3 enum LDPartType |
|
4 { |
|
5 PARTTYPE_PART, |
|
6 PARTTYPE_SUBPART, |
|
7 PARTTYPE_PRIMITIVE, |
|
8 PARTTYPE_48_PRIMITIVE, |
|
9 PARTTYPE_SHORTCUT, |
|
10 PARTTYPE_UNOFFICIAL_PART, |
|
11 PARTTYPE_UNOFFICIAL_SUBPART, |
|
12 PARTTYPE_UNOFFICIAL_PRIMITIVE, |
|
13 PARTTYPE_UNOFFICIAL_48_PRIMITIVE, |
|
14 PARTTYPE_UNOFFICIAL_SHORTCUT, |
|
15 |
|
16 PARTTYPE_NUM_TYPES, |
|
17 PARTTYPE_FIRST = PARTTYPE_PART, |
|
18 PARTTYPE_FIRST_UNOFFICIAL = PARTTYPE_UNOFFICIAL_PART |
|
19 }; |
|
20 |
|
21 enum LDHeaderBFC |
|
22 { |
|
23 HEADERBFC_CCW, |
|
24 HEADERBFC_CW, |
|
25 HEADERBFC_NOCERTIFY, |
|
26 }; |
|
27 |
|
28 class LDHistoryEntry |
|
29 { |
|
30 PROPERTY (public, QDate, date, setDate, STOCK_WRITE) |
|
31 PROPERTY (public, QString, username, setUserName, STOCK_WRITE) |
|
32 PROPERTY (public, QString, description, setDescription, STOCK_WRITE) |
|
33 |
|
34 // If true, `username` is actually the real name and is written in curly braces |
|
35 PROPERTY (public, bool, isRealName, setIsRealName, STOCK_WRITE) |
|
36 |
|
37 public: |
|
38 LDHistoryEntry(); |
|
39 QString serialize() const; |
|
40 }; |
|
41 |
|
42 class LDHeader |
|
43 { |
|
44 PROPERTY (public, QString, title, setTitle, STOCK_WRITE) |
|
45 PROPERTY (public, QString, name, setName, STOCK_WRITE) |
|
46 PROPERTY (public, QStringList, help, setHelp, STOCK_WRITE) |
|
47 PROPERTY (public, QString, license, setLicense, STOCK_WRITE) |
|
48 PROPERTY (public, LDHeaderBFC, winding, setWinding, STOCK_WRITE) |
|
49 PROPERTY (public, LDPartType, partType, setPartType, STOCK_WRITE) |
|
50 PROPERTY (public, QString, qualifiers, setQualifiers, STOCK_WRITE) |
|
51 PROPERTY (public, QString, category, setCategory, STOCK_WRITE) |
|
52 PROPERTY (public, QStringList, keywords, setKeywords, STOCK_WRITE) |
|
53 PROPERTY (public, QString, commandLine, setCommandLine, STOCK_WRITE) |
|
54 PROPERTY (public, QStringList, comments, setComments, STOCK_WRITE) |
|
55 PROPERTY (public, QList<LDHistoryEntry>, history, setHistory, STOCK_WRITE) |
|
56 |
|
57 public: |
|
58 LDHeader(); |
|
59 ~LDHeader(); |
|
60 |
|
61 DELETE_COPY (LDHeader) |
|
62 |
|
63 bool isUnofficial() const; |
|
64 void makeUnofficial(); |
|
65 void makeOfficial(); |
|
66 QString serialize() const; |
|
67 }; |