src/ldHeader.h

Thu, 06 Nov 2014 15:49:09 +0200

author
Teemu Piippo <crimsondusk64@gmail.com>
date
Thu, 06 Nov 2014 15:49:09 +0200
changeset 918
c2577ca1b676
parent 900
680009bac81f
permissions
-rw-r--r--

- closed old head

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

mercurial