diff -r 3dbdc243f053 -r d355d4c52d51 src/document.h --- 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 editModel(); void applyToVertices(VertexMap::ApplyFunction fn) const; - void handleKeyPress(QKeyEvent* event); - void adjustGridToView(); - const glm::mat4& currentGrid() const; const Model& getModel() const; const QSet 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& 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 tools; - BaseTool* selectedTool = nullptr; - QMap toolActions; + std::vector toolActions; + class ObjectEditor* objectEditor; /** * @brief History information of edits to this model */