]> git.mar77i.info Git - bigintmandel/blob - bigintmandelwidget.h
make zoom_factor part of MandelSettings
[bigintmandel] / bigintmandelwidget.h
1
2 // bigintmandelwidget.h
3
4 #ifndef BIGINTMANDELWIDGET_H
5 #define BIGINTMANDELWIDGET_H
6
7 #include <QFutureWatcher>
8 #include <QMenuBar>
9 #include <QScrollArea>
10 #include <QStatusBar>
11 #include <QWidget>
12
13 #include "mandel.h"
14 #include "settingswidget.h"
15
16 class MenuBar;
17 class MandelLabel;
18
19 class BigintMandelWidget : public QWidget {
20 Q_OBJECT
21
22 QFutureWatcher<MandelResultCell> *fw;
23 MandelSettings settings;
24 MenuBar *menu_bar;
25 QScrollArea *scroll_area;
26 MandelLabel *mandel_label;
27 QStatusBar *status_bar;
28 SettingsWidget *settings_widget;
29
30 void update_status_bar();
31 void start();
32 inline const QSize get_ideal_size() const {
33 return scroll_area->size().shrunkBy(scroll_area->contentsMargins());
34 }
35
36 protected:
37 void mousePressEvent(QMouseEvent *event);
38
39 public:
40 explicit BigintMandelWidget(QWidget *parent = nullptr);
41 ~BigintMandelWidget();
42 inline const MandelSettings *get_settings() const {
43 return &settings;
44 }
45 inline const MenuBar *get_menu_bar() const {
46 return menu_bar;
47 }
48
49 public Q_SLOTS:
50 void reset();
51 void export_img();
52 void exec_settings_widget();
53 void settings_widget_accepted();
54 void finished_cell(int num);
55 void finished();
56 void load_data();
57 void save_data();
58 void update();
59 };
60
61 #endif // BIGINTMANDELWIDGET_H