]> git.mar77i.info Git - bigintmandel/blob - menubar.h
split out menubar
[bigintmandel] / menubar.h
1 // menubar.h
2
3 #ifndef MENUBAR_H
4 #define MENUBAR_H
5
6 #include <QMenuBar>
7
8 #include "bigintmandelwidget.h"
9
10 class MenuBar : public QMenuBar {
11 Q_OBJECT
12
13 QMenu *file_menu;
14 QAction *reset_action, *load_action, *save_action;
15 QAction *export_action, *exit_action;
16 QMenu *zoom_factor_menu;
17 QAction *two_action, *four_action, *eight_action, *sixteen_action;
18 int zoom_factor;
19
20 inline void check_action() {
21 two_action->setChecked(zoom_factor == 2);
22 four_action->setChecked(zoom_factor == 4);
23 eight_action->setChecked(zoom_factor == 8);
24 sixteen_action->setChecked(zoom_factor == 16);
25 }
26
27 public:
28 MenuBar(BigintMandelWidget *parent);
29 inline int get_zoom_factor() const { return zoom_factor; }
30 public Q_SLOTS:
31 void change_zoom_factor();
32 };
33
34 #endif // MENUBAR_H