summaryrefslogtreecommitdiff
path: root/src/mainwindow.h
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2018-12-27 11:05:52 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2018-12-27 11:05:52 +0100
commitf4729babb394fbd41b55fba5c53bfc6afe1cda09 (patch)
tree492f7696ed5d36d238ddd14048800ff919930fad /src/mainwindow.h
parentcf19a88c5a37fead401df39849ad7ba56aaa851d (diff)
Add file menu with load/save etc.
Diffstat (limited to 'src/mainwindow.h')
-rw-r--r--src/mainwindow.h21
1 files changed, 21 insertions, 0 deletions
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;