src/ldDocument.h

branch
experimental
changeset 916
bf08a6b42102
parent 890
903ec1e46298
equal deleted inserted replaced
912:3feb4d20092d 916:bf08a6b42102
25 25
26 class History; 26 class History;
27 class OpenProgressDialog; 27 class OpenProgressDialog;
28 struct LDGLData; 28 struct LDGLData;
29 class GLCompiler; 29 class GLCompiler;
30 class LDHeader;
30 31
31 namespace LDPaths 32 namespace LDPaths
32 { 33 {
33 void initPaths(); 34 void initPaths();
34 bool tryConfigure (QString path); 35 bool tryConfigure (QString path);
60 // The default name is a placeholder, initially suggested name for a file. The 61 // The default name is a placeholder, initially suggested name for a file. The
61 // primitive generator uses this to give initial names to primitives. 62 // primitive generator uses this to give initial names to primitives.
62 // 63 //
63 class LDDocument : public QObject 64 class LDDocument : public QObject
64 { 65 {
65 public:
66 PROPERTY (public, QString, name, setName, STOCK_WRITE) 66 PROPERTY (public, QString, name, setName, STOCK_WRITE)
67 PROPERTY (private, LDObjectList, objects, setObjects, STOCK_WRITE) 67 PROPERTY (private, LDObjectList, objects, setObjects, STOCK_WRITE)
68 PROPERTY (private, LDObjectList, cache, setCache, STOCK_WRITE) 68 PROPERTY (private, LDObjectList, cache, setCache, STOCK_WRITE)
69 PROPERTY (private, History*, history, setHistory, STOCK_WRITE) 69 PROPERTY (private, History*, history, setHistory, STOCK_WRITE)
70 PROPERTY (public, QString, fullPath, setFullPath, STOCK_WRITE) 70 PROPERTY (public, QString, fullPath, setFullPath, STOCK_WRITE)
73 PROPERTY (public, long, savePosition, setSavePosition, STOCK_WRITE) 73 PROPERTY (public, long, savePosition, setSavePosition, STOCK_WRITE)
74 PROPERTY (public, int, tabIndex, setTabIndex, STOCK_WRITE) 74 PROPERTY (public, int, tabIndex, setTabIndex, STOCK_WRITE)
75 PROPERTY (public, QList<LDPolygon>, polygonData, setPolygonData, STOCK_WRITE) 75 PROPERTY (public, QList<LDPolygon>, polygonData, setPolygonData, STOCK_WRITE)
76 PROPERTY (private, LDDocumentFlags, flags, setFlags, STOCK_WRITE) 76 PROPERTY (private, LDDocumentFlags, flags, setFlags, STOCK_WRITE)
77 PROPERTY (private, LDDocumentWeakPtr, self, setSelf, STOCK_WRITE) 77 PROPERTY (private, LDDocumentWeakPtr, self, setSelf, STOCK_WRITE)
78 78 PROPERTY (private, LDHeader*, header, setHeader, STOCK_WRITE)
79 QMap<LDObjectPtr, QVector<Vertex>> m_objectVertices;
80 QVector<Vertex> m_vertices;
81 bool m_verticesOutdated;
82 bool m_needVertexMerge;
83 79
84 public: 80 public:
85 LDDocument(LDDocumentPtr* selfptr); 81 LDDocument(LDDocumentPtr* selfptr);
86 ~LDDocument(); 82 ~LDDocument();
87 83
168 164
169 friend class LDObject; 165 friend class LDObject;
170 friend class GLRenderer; 166 friend class GLRenderer;
171 167
172 private: 168 private:
169 QMap<LDObjectPtr, QVector<Vertex>> m_objectVertices;
170 QVector<Vertex> m_vertices;
171 bool m_verticesOutdated;
172 bool m_needVertexMerge;
173 LDObjectList m_sel; 173 LDObjectList m_sel;
174 LDGLData* m_gldata; 174 LDGLData* m_gldata;
175 175
176 // If set to true, next polygon inline of this document discards the 176 // If set to true, next polygon inline of this document discards the
177 // stored polygon data and re-builds it. 177 // stored polygon data and re-builds it.

mercurial