63 PROPERTY (private, QList<LDDocumentPointer*>, References, LIST_OPS, STOCK_WRITE) |
64 PROPERTY (private, QList<LDDocumentPointer*>, References, LIST_OPS, STOCK_WRITE) |
64 PROPERTY (public, QString, Name, STR_OPS, STOCK_WRITE) |
65 PROPERTY (public, QString, Name, STR_OPS, STOCK_WRITE) |
65 PROPERTY (public, QString, FullPath, STR_OPS, STOCK_WRITE) |
66 PROPERTY (public, QString, FullPath, STR_OPS, STOCK_WRITE) |
66 PROPERTY (public, QString, DefaultName, STR_OPS, STOCK_WRITE) |
67 PROPERTY (public, QString, DefaultName, STR_OPS, STOCK_WRITE) |
67 PROPERTY (public, bool, Implicit, BOOL_OPS, STOCK_WRITE) |
68 PROPERTY (public, bool, Implicit, BOOL_OPS, STOCK_WRITE) |
68 PROPERTY (public, LDObjectList, Cache, LIST_OPS, STOCK_WRITE) |
69 PROPERTY (public, QList<LDPolygon>, PolygonData, NO_OPS, STOCK_WRITE) |
69 PROPERTY (public, long, SavePosition, NUM_OPS, STOCK_WRITE) |
70 PROPERTY (public, long, SavePosition, NUM_OPS, STOCK_WRITE) |
70 PROPERTY (public, QListWidgetItem*, ListItem, NO_OPS, STOCK_WRITE) |
71 PROPERTY (public, QListWidgetItem*, ListItem, NO_OPS, STOCK_WRITE) |
71 |
72 |
72 public: |
73 public: |
73 LDDocument(); |
74 LDDocument(); |
78 void clearSelection(); |
79 void clearSelection(); |
79 void forgetObject (LDObject* obj); // Deletes the given object from the object chain. |
80 void forgetObject (LDObject* obj); // Deletes the given object from the object chain. |
80 QString getDisplayName(); |
81 QString getDisplayName(); |
81 const LDObjectList& getSelection() const; |
82 const LDObjectList& getSelection() const; |
82 bool hasUnsavedChanges() const; // Does this Document.have unsaved changes? |
83 bool hasUnsavedChanges() const; // Does this Document.have unsaved changes? |
83 LDObjectList inlineContents (LDSubfile::InlineFlags flags); |
84 void initializeGLData(); |
|
85 LDObjectList inlineContents (bool deep, bool renderinline); |
84 void insertObj (int pos, LDObject* obj); |
86 void insertObj (int pos, LDObject* obj); |
85 int getObjectCount() const; |
87 int getObjectCount() const; |
86 LDObject* getObject (int pos) const; |
88 LDObject* getObject (int pos) const; |
87 bool save (QString path = ""); // Saves this file to disk. |
89 bool save (QString path = ""); // Saves this file to disk. |
88 void swapObjects (LDObject* one, LDObject* other); |
90 void swapObjects (LDObject* one, LDObject* other); |
89 bool isSafeToClose(); // Perform safety checks. Do this before closing any files! |
91 bool isSafeToClose(); // Perform safety checks. Do this before closing any files! |
90 void setObject (int idx, LDObject* obj); |
92 void setObject (int idx, LDObject* obj); |
91 void addReference (LDDocumentPointer* ptr); |
93 void addReference (LDDocumentPointer* ptr); |
92 void removeReference (LDDocumentPointer* ptr); |
94 void removeReference (LDDocumentPointer* ptr); |
|
95 QList<LDPolygon> inlinePolygons(); |
93 |
96 |
94 inline LDDocument& operator<< (LDObject* obj) |
97 inline LDDocument& operator<< (LDObject* obj) |
95 { |
98 { |
96 addObject (obj); |
99 addObject (obj); |
97 return *this; |
100 return *this; |