From f4729babb394fbd41b55fba5c53bfc6afe1cda09 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Thu, 27 Dec 2018 11:05:52 +0100 Subject: Add file menu with load/save etc. --- src/mainwindow.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/mainwindow.h') diff --git a/src/mainwindow.h b/src/mainwindow.h index 1138dfb..a2e2271 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -42,10 +42,31 @@ class MainWindow public: MainWindow(QString program); +protected: + void closeEvent(QCloseEvent*); + private slots: + // Menubar + void newFile(); + void loadFile(); + void loadFile(QString filename); + void saveFile(); + void saveFileAs(); + + // Toolbar + void stop(); + void start(); void reset(); + void programChanged(); + private: + bool checkDirty(); + void setWindowEnabled(bool enabled); + void updateWindowTitle(); + + bool dirty{false}; + QAction* act_save; CodeEditor *editor; QFileSystemWatcher watcher; -- cgit v1.2.3