summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@digia.com>2014-01-27 14:33:18 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-03 09:33:21 +0100
commit5c1ab3eb722e226a7266998e4a0f1cadf90e1c5a (patch)
tree9896c810557d796619787ff2249750903227bb7c /examples
parent38753878180acda596664c92b8b45f5cbdec7e48 (diff)
downloadqtconnectivity-5c1ab3eb722e226a7266998e4a0f1cadf90e1c5a.tar.gz
Misc fixes for the new corkboard example
- The example was hooked into the build system. - The display location of notes on the display was optimized to reduce overlapping with the bottom and right corner. - A documentation page was added for the example. - example binary added to git ignore list - Fix license headers Change-Id: Ib18433c2a7dd68a3573c62ff3215fa0e69954f95 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/nfc/corkboard/Mode.qml11
-rw-r--r--examples/nfc/corkboard/corkboards.qml9
-rw-r--r--examples/nfc/corkboard/doc/images/corkboard.pngbin0 -> 639743 bytes
-rw-r--r--examples/nfc/corkboard/doc/src/corkboard.qdoc39
-rw-r--r--examples/nfc/corkboard/main.cpp8
-rw-r--r--examples/nfc/nfc.pro2
6 files changed, 56 insertions, 13 deletions
diff --git a/examples/nfc/corkboard/Mode.qml b/examples/nfc/corkboard/Mode.qml
index ee5e0dce..a3df4448 100644
--- a/examples/nfc/corkboard/Mode.qml
+++ b/examples/nfc/corkboard/Mode.qml
@@ -1,9 +1,10 @@
/****************************************************************************
**
-** Copyright (C) BlackBerry Limited. All rights reserved.
+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2014 BlackBerry Limited. All rights reserved.
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtNfc module of the Qt Toolkit.
+** This file is part of the examples of the QtNfc module.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
@@ -38,7 +39,7 @@
**
****************************************************************************/
-import QtQuick 2.0
+import QtQuick 2.1
Item {
id: page
@@ -73,8 +74,8 @@ Item {
id: stickyPage
z: 2
- x: Math.random() * (listView.width-100) +100
- y: Math.random() * (listView.height-50) +50
+ x: Math.random() * (listView.width-listView.width*0.30) + listView.width*0.10
+ y: Math.random() * (listView.height-listView.height*0.30) + listView.height*0.10
rotation: -listView.horizontalVelocity / 200;
Behavior on rotation {
diff --git a/examples/nfc/corkboard/corkboards.qml b/examples/nfc/corkboard/corkboards.qml
index 80c30154..55c83723 100644
--- a/examples/nfc/corkboard/corkboards.qml
+++ b/examples/nfc/corkboard/corkboards.qml
@@ -1,9 +1,10 @@
/****************************************************************************
**
-** Copyright (C) BlackBerry Limited. All rights reserved.
+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2014 BlackBerry Limited. All rights reserved.
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtNfc module of the Qt Toolkit.
+** This file is part of the examples of the QtNfc module.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
@@ -38,8 +39,8 @@
**
****************************************************************************/
-import QtQuick 2.0
-import QtNfc 5.0
+import QtQuick 2.1
+import QtNfc 5.2
Rectangle {
width: 800; height: 480
diff --git a/examples/nfc/corkboard/doc/images/corkboard.png b/examples/nfc/corkboard/doc/images/corkboard.png
new file mode 100644
index 00000000..3f54ea18
--- /dev/null
+++ b/examples/nfc/corkboard/doc/images/corkboard.png
Binary files differ
diff --git a/examples/nfc/corkboard/doc/src/corkboard.qdoc b/examples/nfc/corkboard/doc/src/corkboard.qdoc
new file mode 100644
index 00000000..4027fc26
--- /dev/null
+++ b/examples/nfc/corkboard/doc/src/corkboard.qdoc
@@ -0,0 +1,39 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the QtNfc module.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\example corkboard
+\title QML CorkBoard Example
+
+The QML CorkBoard example displays the contents of NDEF messages read from an
+NFC Tag. Each newly detected NDEF message is added to the corkboard and can be
+dragged into an arbitrary position on the board. The corkboard has a "Personal"
+and "Work" space. The workspace can be changed by sliding left or right.
+
+\image corkboard.png
+
+*/
diff --git a/examples/nfc/corkboard/main.cpp b/examples/nfc/corkboard/main.cpp
index bf9b1607..044c083f 100644
--- a/examples/nfc/corkboard/main.cpp
+++ b/examples/nfc/corkboard/main.cpp
@@ -1,9 +1,10 @@
/****************************************************************************
**
-** Copyright (C) BlackBerry Limited. All rights reserved.
+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2014 BlackBerry Limited. All rights reserved.
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtNfc module of the Qt Toolkit.
+** This file is part of the examples of the QtNfc module.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
@@ -38,10 +39,9 @@
**
****************************************************************************/
-#include <QtWidgets/QApplication>
+#include <QtGui/QGuiApplication>
#include <QtQml/QQmlEngine>
#include <QtQuick/QQuickView>
-#include <QDebug>
int main(int argc, char *argv[])
{
diff --git a/examples/nfc/nfc.pro b/examples/nfc/nfc.pro
index ddf7456b..e4f7e35b 100644
--- a/examples/nfc/nfc.pro
+++ b/examples/nfc/nfc.pro
@@ -5,3 +5,5 @@ qtHaveModule(widgets) {
ndefeditor \
poster
}
+
+qtHaveModule(quick): SUBDIRS += corkboard