]> git.mar77i.info Git - bigintmandel/blob - mandellabel.h
make zoom_factor part of MandelSettings
[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 const MenuBar *menu_bar;
15 int draw_progress;
16 QPoint zoom_rect_center;
17
18 protected:
19 void paintEvent(QPaintEvent *event);
20 void leaveEvent(QEvent *event);
21 void mouseMoveEvent(QMouseEvent *event);
22
23 public:
24 explicit MandelLabel(BigintMandelWidget *parent = nullptr);
25 inline int get_draw_progress() { return draw_progress; }
26 inline void set_draw_progress(int draw_progress) {
27 if (draw_progress == this->draw_progress)
28 return;
29 if (draw_progress == -1 || draw_progress > this->draw_progress)
30 this->draw_progress = draw_progress;
31 }
32 };
33
34 #endif // MANDELLABEL_H