src/document.h

changeset 191
d355d4c52d51
parent 188
64ea7282611e
child 197
0e729e681a2c
--- a/src/document.h	Wed May 25 13:49:45 2022 +0300
+++ b/src/document.h	Wed May 25 17:24:51 2022 +0300
@@ -25,11 +25,6 @@
 #include "vertexmap.h"
 #include "edithistory.h"
 
-namespace Ui
-{
-	class Document;
-}
-
 class Document : public QWidget
 {
 	Q_OBJECT
@@ -42,35 +37,25 @@
 	~Document() override;
 	QByteArray saveSplitterState() const;
 	void restoreSplitterState(const QByteArray& state);
-	void setRenderPreferences(const gl::RenderPreferences& newPreferences);
-	void setCanvasOverpaintCallback(Canvas::OverpaintCallback fn);
 	std::unique_ptr<ModelEditor> editModel();
 	void applyToVertices(VertexMap::ApplyFunction fn) const;
-	void handleKeyPress(QKeyEvent* event);
-	void adjustGridToView();
-	const glm::mat4& currentGrid() const;
 	const Model& getModel() const;
 	const QSet<ldraw::id_t> selectedObjects() const;
 	const ldraw::ColorTable& colorTable;
+	Canvas* const canvas;
+	Q_SLOT void editingModeTriggered();
 Q_SIGNALS:
 	void newStatusText(const QString& newStatusText);
 	void splitterChanged();
-	void mouseClick(Document* document, Canvas* canvas, QMouseEvent* event);
-	void mouseMove(Document* document, Canvas* canvas, QMouseEvent* event);
 private:
-	void selectionChanged(const QSet<ldraw::id_t>& newSelection);
 	void initializeTools();
-	Q_SLOT void toolActionTriggered();
-	void selectTool(class BaseTool* tool);
 	Model* model;
 	DocumentManager* const documents;
 	VertexMap vertexMap;
-	Canvas* renderer;
-	Ui::Document& ui;
+	class Ui_Document& ui;
 	QToolBar* toolsBar;
-	QVector<class BaseTool*> tools;
-	BaseTool* selectedTool = nullptr;
-	QMap<BaseTool*, QAction*> toolActions;
+	std::vector<QAction*> toolActions;
+	class ObjectEditor* objectEditor;
 	/**
 	 * @brief History information of edits to this model
 	 */

mercurial