57 EditHistory* history() const; |
56 EditHistory* history() const; |
58 void initializeCachedData(); |
57 void initializeCachedData(); |
59 void inlineContents(Model& model, bool deep, bool renderinline); |
58 void inlineContents(Model& model, bool deep, bool renderinline); |
60 QList<LDPolygon> inlinePolygons(); |
59 QList<LDPolygon> inlinePolygons(); |
61 const QSet<Vertex>& inlineVertices(); |
60 const QSet<Vertex>& inlineVertices(); |
62 void insertObject (int pos, LDObject* obj); |
|
63 bool isFrozen() const; |
61 bool isFrozen() const; |
64 bool isSafeToClose(); |
62 bool isSafeToClose(); |
65 QString name() const; |
63 QString name() const; |
66 void objectRemoved(LDObject* object, int index); |
64 void objectRemoved(LDObject* object, int index); |
67 const QList<LDPolygon>& polygonData() const; |
65 const QList<LDPolygon>& polygonData() const; |
103 int m_triangleCount; |
98 int m_triangleCount; |
104 QList<LDPolygon> m_polygonData; |
99 QList<LDPolygon> m_polygonData; |
105 QMap<LDObject*, QSet<Vertex>> m_objectVertices; |
100 QMap<LDObject*, QSet<Vertex>> m_objectVertices; |
106 QSet<Vertex> m_vertices; |
101 QSet<Vertex> m_vertices; |
107 DocumentManager* m_manager; |
102 DocumentManager* m_manager; |
|
103 |
|
104 template<typename T, typename... Args> |
|
105 void addToHistory(Args&&... args) |
|
106 { |
|
107 m_history->add<T>(args...); |
|
108 } |
|
109 |
|
110 private slots: |
|
111 void objectChanged(const LDObjectState &before, const LDObjectState &after); |
|
112 void handleNewObject(const QModelIndex& index); |
|
113 void handleImminentObjectRemoval(const QModelIndex& index); |
108 }; |
114 }; |
109 |
115 |
110 // Parses a string line containing an LDraw object and returns the object parsed. |
116 // Parses a string line containing an LDraw object and returns the object parsed. |
111 LDObject* ParseLine (QString line); |
117 LDObject* ParseLine (QString line); |