diagrams-fable-qt/src/app/MainWindow.h
Ilya Ashikhmin 730d0fa7a7 feat(app): add --simulate flag for headless demo captures
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 23:38:07 +02:00

53 lines
1.1 KiB
C++

#pragma once
#include "SettingsDialog.h"
#include <QMainWindow>
#include <QUndoStack>
namespace diag {
class DiagramScene;
class GridView;
class NetworkModel;
class NodePalette;
class PropertyPanel;
class MainWindow : public QMainWindow {
Q_OBJECT
public:
explicit MainWindow(QWidget* parent = nullptr);
DiagramScene* scene() const { return m_scene; }
NetworkModel* model() const { return m_model; }
void loadSample();
void setSimulationRunning(bool running);
protected:
void closeEvent(QCloseEvent* event) override;
private:
void buildActions();
void applySettings(const EditorSettings& settings);
void newDocument();
void openDocument();
void saveDocument();
void saveDocumentAs();
bool maybeSave();
void runSimulation(bool enabled);
void showSettings();
NetworkModel* m_model;
QUndoStack* m_undoStack;
DiagramScene* m_scene;
GridView* m_view;
NodePalette* m_palette;
PropertyPanel* m_properties;
EditorSettings m_settings;
QString m_currentFile;
QAction* m_simulateAction = nullptr;
};
} // namespace diag