]> git.mar77i.info Git - bigintmandel/blob - bigintmandelwidget.h
break out draw_progress to mandellabel
[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 inline const QSize get_ideal_size() const {
32 return scroll_area->size().shrunkBy(scroll_area->contentsMargins());
33 }
34
35 public:
36 explicit BigintMandelWidget(QWidget *parent = nullptr);
37 ~BigintMandelWidget();
38 void mousePressEvent(QMouseEvent *event);
39 inline const MandelSettings *get_settings() const {
40 return &settings;
41 }
42
43 public Q_SLOTS:
44 void reset();
45 void export_img();
46 void exec_settings_widget();
47 void settings_widget_accepted();
48 void finished_cell(int num);
49 void finished();
50 void load_data();
51 void save_data();
52 void update();
53 };
54
55 #endif // BIGINTMANDELWIDGET_H