#ifndef APPLICATIONCONTROLLER_H #define APPLICATIONCONTROLLER_H #include #include "ViewportWidget.h" // For SketchPlane enum class Document; class MainWindow; class SketchFeature; class ApplicationController : public QObject { Q_OBJECT public: explicit ApplicationController(QObject *parent = nullptr); ~ApplicationController(); void setMainWindow(MainWindow* mainWindow); Document* document() const; SketchFeature* activeSketch() const; public slots: void newDocument(); bool openDocument(); bool saveDocument(); bool saveDocumentAs(); void beginSketchCreation(); void endSketch(); signals: void sketchModeStarted(ViewportWidget::SketchPlane plane); void sketchModeEnded(); void currentFileChanged(const QString& path); private: ApplicationController(const ApplicationController&) = delete; ApplicationController& operator=(const ApplicationController&) = delete; void setCurrentFile(const QString& fileName); Document* m_document; QString m_currentFile; MainWindow* m_mainWindow = nullptr; SketchFeature* m_activeSketch = nullptr; }; #endif // APPLICATIONCONTROLLER_H