]> git.mar77i.info Git - bigintmandel/blob - mandellabel.h
make zoom_factor part of MandelSettings
[bigintmandel] / mandellabel.h
1
2 /*
3 * mandellabel.h
4 *
5 * This file is covered by the LICENSE file in the root of this project.
6 */
7
8 #ifndef MANDELLABEL_H
9 #define MANDELLABEL_H
10
11 #include <QLabel>
12
13 #include "bigintmandelwidget.h"
14 #include "mandel.h"
15
16 class MandelLabel : public QLabel {
17 Q_OBJECT
18
19 const MandelSettings * const settings;
20 int draw_progress;
21 QPoint zoom_rect_center;
22
23 protected:
24 void paintEvent(QPaintEvent *event);
25 void leaveEvent(QEvent *event);
26 void mouseMoveEvent(QMouseEvent *event);
27
28 public:
29 explicit MandelLabel(BigintMandelWidget *parent = nullptr);
30 inline int get_draw_progress() { return draw_progress; }
31 inline void set_draw_progress(int draw_progress) {
32 if (draw_progress == this->draw_progress)
33 return;
34 if (draw_progress == -1 || draw_progress > this->draw_progress)
35 this->draw_progress = draw_progress;
36 }
37 };
38
39 #endif // MANDELLABEL_H