summaryrefslogtreecommitdiffstats
path: root/examples/threads/mandelbrot
diff options
context:
space:
mode:
Diffstat (limited to 'examples/threads/mandelbrot')
-rw-r--r--examples/threads/mandelbrot/main.cpp4
-rw-r--r--examples/threads/mandelbrot/mandelbrot.pro4
-rw-r--r--examples/threads/mandelbrot/mandelbrotwidget.cpp16
-rw-r--r--examples/threads/mandelbrot/mandelbrotwidget.h26
4 files changed, 1 insertions, 49 deletions
diff --git a/examples/threads/mandelbrot/main.cpp b/examples/threads/mandelbrot/main.cpp
index 5211c2051c..610534d4a3 100644
--- a/examples/threads/mandelbrot/main.cpp
+++ b/examples/threads/mandelbrot/main.cpp
@@ -47,11 +47,7 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
MandelbrotWidget widget;
-#if defined(Q_WS_S60)
- widget.showMaximized();
-#else
widget.show();
-#endif
return app.exec();
}
//! [0]
diff --git a/examples/threads/mandelbrot/mandelbrot.pro b/examples/threads/mandelbrot/mandelbrot.pro
index 0e053af072..dc2ab6973b 100644
--- a/examples/threads/mandelbrot/mandelbrot.pro
+++ b/examples/threads/mandelbrot/mandelbrot.pro
@@ -4,7 +4,7 @@ SOURCES = main.cpp \
mandelbrotwidget.cpp \
renderthread.cpp
-unix:!mac:!symbian:!vxworks:!integrity:LIBS += -lm
+unix:!mac:!vxworks:!integrity:LIBS += -lm
# install
target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/threads/mandelbrot
@@ -12,6 +12,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS mandelbrot.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/threads/mandelbrot
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
diff --git a/examples/threads/mandelbrot/mandelbrotwidget.cpp b/examples/threads/mandelbrot/mandelbrotwidget.cpp
index 7cee70f547..0db19a71c6 100644
--- a/examples/threads/mandelbrot/mandelbrotwidget.cpp
+++ b/examples/threads/mandelbrot/mandelbrotwidget.cpp
@@ -74,20 +74,6 @@ MandelbrotWidget::MandelbrotWidget(QWidget *parent)
#endif
resize(550, 400);
-#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
- ZoomButton *zoomIn = new ZoomButton(tr("Zoom In"), ZoomInFactor, this);
- ZoomButton *zoomOut = new ZoomButton(tr("Zoom Out"), ZoomOutFactor, this);
-
- QGridLayout *layout = new QGridLayout(this);
- layout->addWidget(zoomIn, 0, 1);
- layout->addWidget(zoomOut, 1, 1);
- layout->setColumnStretch(0, 10);
- layout->setRowStretch(2, 10);
- setLayout(layout);
-
- connect(zoomIn, SIGNAL(zoom(double)), this, SLOT(zoom(double)));
- connect(zoomOut, SIGNAL(zoom(double)), this, SLOT(zoom(double)));
-#endif
}
//! [1]
@@ -129,7 +115,6 @@ void MandelbrotWidget::paintEvent(QPaintEvent * /* event */)
}
//! [8] //! [9]
-#if !defined(Q_WS_S60) && !defined(Q_WS_MAEMO_5) && !defined(Q_WS_SIMULATOR)
QString text = tr("Use mouse wheel or the '+' and '-' keys to zoom. "
"Press and hold left mouse button to scroll.");
QFontMetrics metrics = painter.fontMetrics();
@@ -142,7 +127,6 @@ void MandelbrotWidget::paintEvent(QPaintEvent * /* event */)
painter.setPen(Qt::white);
painter.drawText((width() - textWidth) / 2,
metrics.leading() + metrics.ascent(), text);
-#endif
}
//! [9]
diff --git a/examples/threads/mandelbrot/mandelbrotwidget.h b/examples/threads/mandelbrot/mandelbrotwidget.h
index 53bbeb6469..ead394cc6a 100644
--- a/examples/threads/mandelbrot/mandelbrotwidget.h
+++ b/examples/threads/mandelbrot/mandelbrotwidget.h
@@ -45,32 +45,6 @@
#include <QWidget>
#include "renderthread.h"
-#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
-#include <QPushButton>
-
-class ZoomButton : public QPushButton
-{
- Q_OBJECT
-public:
- ZoomButton(const QString &text, double zoomFactor, QWidget *parent = NULL)
- : QPushButton(text, parent), m_ZoomFactor(zoomFactor)
- {
- connect(this, SIGNAL(clicked()), this, SLOT(handleClick()));
- }
-
-signals:
- void zoom(double zoomFactor);
-
-private slots:
- void handleClick()
- {
- emit zoom(m_ZoomFactor);
- }
-
-private:
- const double m_ZoomFactor;
-};
-#endif
//! [0]
class MandelbrotWidget : public QWidget