// menubar.h #ifndef MENUBAR_H #define MENUBAR_H #include #include "bigintmandelwidget.h" class MenuBar : public QMenuBar { Q_OBJECT QMenu *file_menu; QAction *reset_action, *load_action, *save_action; QAction *export_action, *exit_action; QMenu *zoom_factor_menu; QAction *two_action, *four_action, *eight_action, *sixteen_action; int zoom_factor; inline void check_action() { two_action->setChecked(zoom_factor == 2); four_action->setChecked(zoom_factor == 4); eight_action->setChecked(zoom_factor == 8); sixteen_action->setChecked(zoom_factor == 16); } public: explicit MenuBar(BigintMandelWidget *parent); inline int get_zoom_factor() const { return zoom_factor; } public Q_SLOTS: void change_zoom_factor(); }; #endif // MENUBAR_H