src/lddocument.h

changeset 1186
eae8b3bce545
parent 1159
6ad8cdcd88d9
equal deleted inserted replaced
1185:c2e0db52ea07 1186:eae8b3bce545
60 EditHistory* history() const; 60 EditHistory* history() const;
61 void initializeCachedData(); 61 void initializeCachedData();
62 void inlineContents(Model& model, bool deep, bool renderinline); 62 void inlineContents(Model& model, bool deep, bool renderinline);
63 QList<LDPolygon> inlinePolygons(); 63 QList<LDPolygon> inlinePolygons();
64 const QSet<Vertex>& inlineVertices(); 64 const QSet<Vertex>& inlineVertices();
65 void insertObject (int pos, LDObject* obj);
66 bool isFrozen() const; 65 bool isFrozen() const;
67 bool isSafeToClose(); 66 bool isSafeToClose();
68 QString name() const; 67 QString name() const;
69 void objectRemoved(LDObject* object, int index); 68 void objectRemoved(LDObject* object, int index);
70 const QList<LDPolygon>& polygonData() const; 69 const QList<LDPolygon>& polygonData() const;
79 void setFrozen(bool value); 78 void setFrozen(bool value);
80 void setFullPath (QString value); 79 void setFullPath (QString value);
81 void setName (QString value); 80 void setName (QString value);
82 void setSavePosition (long value); 81 void setSavePosition (long value);
83 void setTabIndex (int value); 82 void setTabIndex (int value);
84 bool swapObjects (LDObject* one, LDObject* other);
85 int tabIndex() const; 83 int tabIndex() const;
86 void undo(); 84 void undo();
87 void vertexChanged (const Vertex& a, const Vertex& b); 85 void vertexChanged (const Vertex& a, const Vertex& b);
88 86
89 static QString shortenName (QString a); // Turns a full path into a relative path 87 static QString shortenName (QString a); // Turns a full path into a relative path
90 88
91 public slots: 89 public slots:
92 void objectChanged(QString before, QString after); 90 void objectChanged(QString before, QString after);
93
94 protected:
95 LDObject* withdrawAt(int position);
96 91
97 private: 92 private:
98 QString m_name; 93 QString m_name;
99 QString m_fullPath; 94 QString m_fullPath;
100 QString m_defaultName; 95 QString m_defaultName;
109 QList<LDPolygon> m_polygonData; 104 QList<LDPolygon> m_polygonData;
110 QMap<LDObject*, QSet<Vertex>> m_objectVertices; 105 QMap<LDObject*, QSet<Vertex>> m_objectVertices;
111 QSet<Vertex> m_vertices; 106 QSet<Vertex> m_vertices;
112 QSet<LDObject*> m_selection; 107 QSet<LDObject*> m_selection;
113 DocumentManager* m_manager; 108 DocumentManager* m_manager;
109
110 Q_SLOT void handleNewObject(LDObject* object, int position);
111 Q_SLOT void handleObjectSwap(LDObject* one, LDObject* other);
112 Q_SLOT void handleObjectRemoval(LDObject* object, int position);
114 }; 113 };
115 114
116 // Parses a string line containing an LDraw object and returns the object parsed. 115 // Parses a string line containing an LDraw object and returns the object parsed.
117 LDObject* ParseLine (QString line); 116 LDObject* ParseLine (QString line);

mercurial