diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-04-07 22:14:23 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-04-14 08:24:04 +0200 |
commit | 0e69349f6f8e9445877ea5b2105973115ad79cf7 (patch) | |
tree | 90f7a68a57be20ac3fbf1ecd06c25808c4a999b2 /examples/corelib/threads/mandelbrot/mandelbrotwidget.h | |
parent | 2df3d8ed415d01b169071e01b775d920292df555 (diff) |
Brush up the mandelbrot example
The example refines the image by running a number of passes
with increasing number of iterations, which is not really
visible to the user. Set an informational text string on
the generated image which provides this information
along with the elapsed time.
The idea is to do the same to the corresponding
Qt for Python example to have some sort of speed comparison
for number crunching.
Add a command line option for the number of passes.
Make the window a bit larger to accommodate the
information.
Change-Id: I2afc1009ab53b580123d82a6aa645d9ffaa63ea2
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'examples/corelib/threads/mandelbrot/mandelbrotwidget.h')
-rw-r--r-- | examples/corelib/threads/mandelbrot/mandelbrotwidget.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/corelib/threads/mandelbrot/mandelbrotwidget.h b/examples/corelib/threads/mandelbrot/mandelbrotwidget.h index cb40962535..956ffc10a8 100644 --- a/examples/corelib/threads/mandelbrot/mandelbrotwidget.h +++ b/examples/corelib/threads/mandelbrot/mandelbrotwidget.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2021 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the examples of the Qt Toolkit. @@ -86,6 +86,8 @@ private: QPixmap pixmap; QPoint pixmapOffset; QPoint lastDragPos; + QString help; + QString info; double centerX; double centerY; double pixmapScale; |