Wed, 22 Oct 2014 20:19:53 +0300
- commit work done on header/body split
#include "main.h" enum LDPartType { PARTTYPE_PART, PARTTYPE_SUBPART, PARTTYPE_PRIMITIVE, PARTTYPE_48_PRIMITIVE, PARTTYPE_SHORTCUT, PARTTYPE_UNOFFICIAL_PART, PARTTYPE_UNOFFICIAL_SUBPART, PARTTYPE_UNOFFICIAL_PRIMITIVE, PARTTYPE_UNOFFICIAL_48_PRIMITIVE, PARTTYPE_UNOFFICIAL_SHORTCUT, PARTTYPE_NUM_TYPES, PARTTYPE_FIRST = PARTTYPE_PART, PARTTYPE_FIRST_UNOFFICIAL = PARTTYPE_UNOFFICIAL_PART }; enum LDHeaderBFC { HEADERBFC_CCW, HEADERBFC_CW, HEADERBFC_NOCERTIFY, }; class LDHistoryEntry { PROPERTY (public, QDate, date, setDate, STOCK_WRITE) PROPERTY (public, QString, username, setUserName, STOCK_WRITE) PROPERTY (public, QString, description, setDescription, STOCK_WRITE) // If true, `username` is actually the real name and is written in curly braces PROPERTY (public, bool, isRealName, setIsRealName, STOCK_WRITE) public: LDHistoryEntry(); QString serialize() const; }; class LDHeader { PROPERTY (public, QString, title, setTitle, STOCK_WRITE) PROPERTY (public, QString, name, setName, STOCK_WRITE) PROPERTY (public, QStringList, help, setHelp, STOCK_WRITE) PROPERTY (public, QString, license, setLicense, STOCK_WRITE) PROPERTY (public, LDHeaderBFC, winding, setWinding, STOCK_WRITE) PROPERTY (public, LDPartType, partType, setPartType, STOCK_WRITE) PROPERTY (public, QString, qualifiers, setQualifiers, STOCK_WRITE) PROPERTY (public, QString, category, setCategory, STOCK_WRITE) PROPERTY (public, QStringList, keywords, setKeywords, STOCK_WRITE) PROPERTY (public, QString, commandLine, setCommandLine, STOCK_WRITE) PROPERTY (public, QStringList, comments, setComments, STOCK_WRITE) PROPERTY (public, QList<LDHistoryEntry>, history, setHistory, STOCK_WRITE) public: LDHeader(); ~LDHeader(); DELETE_COPY (LDHeader) bool isUnofficial() const; void makeUnofficial(); void makeOfficial(); QString serialize() const; };