51 // The default name is a placeholder, initially suggested name for a file. The |
51 // The default name is a placeholder, initially suggested name for a file. The |
52 // primitive generator uses this to give initial names to primitives. |
52 // primitive generator uses this to give initial names to primitives. |
53 // ============================================================================= |
53 // ============================================================================= |
54 class LDFile : public QObject |
54 class LDFile : public QObject |
55 { Q_OBJECT |
55 { Q_OBJECT |
56 PROPERTY (private, QList<LDObject*>, Objects, NO_OPS, NO_CB) |
56 PROPERTY (private, QList<LDObject*>, Objects, NO_OPS, STOCK_WRITE) |
57 PROPERTY (private, History*, History, NO_OPS, NO_CB) |
57 PROPERTY (private, History*, History, NO_OPS, STOCK_WRITE) |
58 PROPERTY (private, QList<LDObject*>, Vertices, NO_OPS, NO_CB) |
58 PROPERTY (private, QList<LDObject*>, Vertices, NO_OPS, STOCK_WRITE) |
59 PROPERTY (public, str, Name, STR_OPS, NO_CB) |
59 PROPERTY (public, str, Name, STR_OPS, STOCK_WRITE) |
60 PROPERTY (public, str, DefaultName, STR_OPS, NO_CB) |
60 PROPERTY (public, str, DefaultName, STR_OPS, STOCK_WRITE) |
61 PROPERTY (public, bool, Implicit, BOOL_OPS, NO_CB) |
61 PROPERTY (public, bool, Implicit, BOOL_OPS, STOCK_WRITE) |
62 PROPERTY (public, QList<LDObject*>, Cache, NO_OPS, NO_CB) |
62 PROPERTY (public, QList<LDObject*>, Cache, NO_OPS, STOCK_WRITE) |
63 PROPERTY (public, long, SavePosition, NUM_OPS, NO_CB) |
63 PROPERTY (public, long, SavePosition, NUM_OPS, STOCK_WRITE) |
64 PROPERTY (public, QListWidgetItem*, ListItem, NO_OPS, NO_CB) |
64 PROPERTY (public, QListWidgetItem*, ListItem, NO_OPS, STOCK_WRITE) |
65 |
65 |
66 public: |
66 public: |
67 LDFile(); |
67 LDFile(); |
68 ~LDFile(); |
68 ~LDFile(); |
69 |
69 |
179 // separate class so as to be able to do the work progressively through the |
179 // separate class so as to be able to do the work progressively through the |
180 // event loop, allowing the program to maintain responsivity during loading. |
180 // event loop, allowing the program to maintain responsivity during loading. |
181 // ============================================================================= |
181 // ============================================================================= |
182 class FileLoader : public QObject |
182 class FileLoader : public QObject |
183 { Q_OBJECT |
183 { Q_OBJECT |
184 PROPERTY (private, QList<LDObject*>, Objects, NO_OPS, NO_CB) |
184 PROPERTY (private, QList<LDObject*>, Objects, NO_OPS, STOCK_WRITE) |
185 PROPERTY (private, bool, Done, BOOL_OPS, NO_CB) |
185 PROPERTY (private, bool, Done, BOOL_OPS, STOCK_WRITE) |
186 PROPERTY (private, int, Progress, NUM_OPS, NO_CB) |
186 PROPERTY (private, int, Progress, NUM_OPS, STOCK_WRITE) |
187 PROPERTY (private, bool, Aborted, BOOL_OPS, NO_CB) |
187 PROPERTY (private, bool, Aborted, BOOL_OPS, STOCK_WRITE) |
188 PROPERTY (public, QStringList, Lines, NO_OPS, NO_CB) |
188 PROPERTY (public, QStringList, Lines, NO_OPS, STOCK_WRITE) |
189 PROPERTY (public, int*, Warnings, NO_OPS, NO_CB) |
189 PROPERTY (public, int*, Warnings, NO_OPS, STOCK_WRITE) |
190 PROPERTY (public, bool, OnForeground, BOOL_OPS, NO_CB) |
190 PROPERTY (public, bool, OnForeground, BOOL_OPS, STOCK_WRITE) |
191 |
191 |
192 public slots: |
192 public slots: |
193 void start(); |
193 void start(); |
194 void abort(); |
194 void abort(); |
195 |
195 |