]> git.mar77i.info Git - bigintmandel/blob - bigintmandelwidget.h
split out menubar
[bigintmandel] / bigintmandelwidget.h
1
2 // bigintmandelwidget.h
3
4 #ifndef BIGINTMANDELWIDGET_H
5 #define BIGINTMANDELWIDGET_H
6
7 #include <QFutureWatcher>
8 #include <QLabel>
9 #include <QMenuBar>
10 #include <QScrollArea>
11 #include <QStatusBar>
12 #include <QWidget>
13
14 #include "mandel.h"
15 #include "settingswidget.h"
16
17 class MenuBar;
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 QLabel *img_label;
27 bool img_dirty;
28 QStatusBar *status_bar;
29 SettingsWidget *settings_widget;
30 int draw_progress;
31
32 inline const QSize get_ideal_size() const {
33 return scroll_area->size().shrunkBy(scroll_area->contentsMargins());
34 }
35
36 public:
37 BigintMandelWidget(QWidget *parent = nullptr);
38 ~BigintMandelWidget();
39 void paintEvent(QPaintEvent *event);
40 void mousePressEvent(QMouseEvent *event);
41 void update_img();
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 };
53
54 #endif // BIGINTMANDELWIDGET_H