summaryrefslogtreecommitdiffstats
path: root/demos/embedded/lightmaps/lightmaps.h
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-04-06 22:41:16 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-04-06 22:41:16 (GMT)
commitf9fce9b432bfcb5c2f48b2b34056a63bd805d8d3 (patch)
tree01cdd02ff5c5c1b2c7dccaabf7addcb940feb7cd /demos/embedded/lightmaps/lightmaps.h
parent3ec5f0c801645cf8beac52f7eab0c97190f9b46d (diff)
parent4409d1b454f02fa1e5e07560a1db6012074172eb (diff)
downloadQt-f9fce9b432bfcb5c2f48b2b34056a63bd805d8d3.zip
Qt-f9fce9b432bfcb5c2f48b2b34056a63bd805d8d3.tar.gz
Qt-f9fce9b432bfcb5c2f48b2b34056a63bd805d8d3.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-doc-staging into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-doc-staging: Fixed the declarative headers and includes within qdoc. Removed invalid public slots section. Minor feature fix led to refactoring for i18n's sake. Fixed string-int concatenation issue. qdoc: Allowed multiple values for certain metadata tags. qdoc: modified \include to take a 2nd arg, snippet id. Doc: Minor fix to title. Doc: Fixed markup. Doc: Added a missing command. Doc: Removed duplicate documentation. Removed some links and prettified others. Doc: Squashed commit of Roland Wolf's threading tutorial.
Diffstat (limited to 'demos/embedded/lightmaps/lightmaps.h')
-rw-r--r--demos/embedded/lightmaps/lightmaps.h88
1 files changed, 88 insertions, 0 deletions
diff --git a/demos/embedded/lightmaps/lightmaps.h b/demos/embedded/lightmaps/lightmaps.h
new file mode 100644
index 0000000..42a80c9
--- /dev/null
+++ b/demos/embedded/lightmaps/lightmaps.h
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef LIGHTMAPS_H
+#define LIGHTMAPS_H
+
+#include <QBasicTimer>
+#include <QWidget>
+
+class SlippyMap;
+
+class LightMaps: public QWidget
+{
+ Q_OBJECT
+
+public:
+ LightMaps(QWidget *parent = 0);
+ void setCenter(qreal lat, qreal lng);
+
+public slots:
+ void toggleNightMode();
+
+protected:
+ void activateZoom();
+ void resizeEvent(QResizeEvent *);
+ void paintEvent(QPaintEvent *event);
+ void timerEvent(QTimerEvent *);
+ void mousePressEvent(QMouseEvent *event);
+ void mouseMoveEvent(QMouseEvent *event);
+ void mouseReleaseEvent(QMouseEvent *);
+ void keyPressEvent(QKeyEvent *event);
+
+private slots:
+ void updateMap(const QRect &r);
+
+private:
+ SlippyMap *m_normalMap;
+ SlippyMap *m_largeMap;
+ bool pressed;
+ bool snapped;
+ QPoint pressPos;
+ QPoint dragPos;
+ QBasicTimer tapTimer;
+ bool zoomed;
+ QPixmap zoomPixmap;
+ QPixmap maskPixmap;
+ bool invert;
+};
+
+#endif \ No newline at end of file