]> git.mar77i.info Git - bigintmandel/blob - mandellabel.h
break out draw_progress to mandellabel
[bigintmandel] / mandellabel.h
1
2 // mandellabel.h
3
4 #ifndef MANDELLABEL_H
5 #define MANDELLABEL_H
6
7 #include <QLabel>
8
9 #include "bigintmandelwidget.h"
10 #include "mandel.h"
11
12 class MandelLabel : public QLabel {
13 const MandelSettings *settings;
14 int draw_progress;
15
16 public:
17 explicit MandelLabel(BigintMandelWidget *parent = nullptr);
18 void paintEvent(QPaintEvent *event);
19 inline int get_draw_progress() { return draw_progress; }
20 inline void set_draw_progress(int draw_progress) {
21 if (draw_progress == this->draw_progress)
22 return;
23 if (draw_progress == -1 || draw_progress > this->draw_progress)
24 this->draw_progress = draw_progress;
25 }
26 };
27
28 #endif // MANDELLABEL_H