summaryrefslogtreecommitdiffstats
path: root/examples/corelib/threads/mandelbrot/mandelbrotwidget.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/corelib/threads/mandelbrot/mandelbrotwidget.h')
-rw-r--r--examples/corelib/threads/mandelbrot/mandelbrotwidget.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/examples/corelib/threads/mandelbrot/mandelbrotwidget.h b/examples/corelib/threads/mandelbrot/mandelbrotwidget.h
index 23c3a2bf40..0d0fce56b3 100644
--- a/examples/corelib/threads/mandelbrot/mandelbrotwidget.h
+++ b/examples/corelib/threads/mandelbrot/mandelbrotwidget.h
@@ -4,16 +4,20 @@
#ifndef MANDELBROTWIDGET_H
#define MANDELBROTWIDGET_H
-#include <QGestureEvent>
+#include "renderthread.h"
+
+#include <QCoreApplication>
#include <QPixmap>
#include <QWidget>
-#include "renderthread.h"
+QT_BEGIN_NAMESPACE
+class QGestureEvent;
+QT_END_NAMESPACE
//! [0]
class MandelbrotWidget : public QWidget
{
- Q_OBJECT
+ Q_DECLARE_TR_FUNCTIONS(MandelbrotWidget)
public:
MandelbrotWidget(QWidget *parent = nullptr);
@@ -33,11 +37,9 @@ protected:
bool event(QEvent *event) override;
#endif
-private slots:
+private:
void updatePixmap(const QImage &image, double scaleFactor);
void zoom(double zoomFactor);
-
-private:
void scroll(int deltaX, int deltaY);
#ifndef QT_NO_GESTURES
bool gestureEvent(QGestureEvent *event);