src/primitives.h

changeset 606
3dd6f343ec06
parent 604
01bdac75994a
child 611
6679e47b019f
equal deleted inserted replaced
605:2983f7c7e7c9 606:3dd6f343ec06
27 class LDDocument; 27 class LDDocument;
28 class Ui_MakePrimUI; 28 class Ui_MakePrimUI;
29 class PrimitiveCategory; 29 class PrimitiveCategory;
30 struct Primitive 30 struct Primitive
31 { 31 {
32 str name, title; 32 QString name, title;
33 PrimitiveCategory* cat; 33 PrimitiveCategory* cat;
34 }; 34 };
35 35
36 class PrimitiveCategory : public QObject 36 class PrimitiveCategory : public QObject
37 { 37 {
38 Q_OBJECT 38 Q_OBJECT
39 PROPERTY (public, str, Name, STR_OPS, STOCK_WRITE) 39 PROPERTY (public, QString, Name, STR_OPS, STOCK_WRITE)
40 40
41 public: 41 public:
42 enum ERegexType 42 enum ERegexType
43 { 43 {
44 EFilenameRegex, 44 EFilenameRegex,
52 }; 52 };
53 53
54 QList<RegexEntry> regexes; 54 QList<RegexEntry> regexes;
55 QList<Primitive> prims; 55 QList<Primitive> prims;
56 56
57 explicit PrimitiveCategory (str name, QObject* parent = 0); 57 explicit PrimitiveCategory (QString name, QObject* parent = 0);
58 bool isValidToInclude(); 58 bool isValidToInclude();
59 59
60 static void loadCategories(); 60 static void loadCategories();
61 static void populateCategories(); 61 static void populateCategories();
62 }; 62 };
127 127
128 // Gets a primitive by the given specs. If the primitive cannot be found, it will 128 // Gets a primitive by the given specs. If the primitive cannot be found, it will
129 // be automatically generated. 129 // be automatically generated.
130 LDDocument* getPrimitive (PrimitiveType type, int segs, int divs, int num); 130 LDDocument* getPrimitive (PrimitiveType type, int segs, int divs, int num);
131 131
132 str radialFileName (PrimitiveType type, int segs, int divs, int num); 132 QString radialFileName (PrimitiveType type, int segs, int divs, int num);
133 133
134 #endif // LDFORGE_PRIMITIVES_H 134 #endif // LDFORGE_PRIMITIVES_H

mercurial