summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTomi Korpipää <tomi.korpipaa@digia.com>2013-05-30 06:28:55 +0300
committerTomi Korpipää <tomi.korpipaa@digia.com>2013-05-30 07:48:16 +0300
commit2973f99565bf469a8fb3cb799d35e930aedc5f4f (patch)
treeb583e0b2bee334a34f7cad7a726e03a291e671ff /src
parent715fce1f5b14eb2d837f8bb8efe21530c183e79a (diff)
Preliminary qtquick2 support structure added
Change-Id: I0b4f273d1c85d1fdb0509acf2a6fda81a591052c Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/datavis3dqml2/datavis3dqml2.pro35
-rw-r--r--src/datavis3dqml2/datavis3dqml2_plugin.cpp53
-rw-r--r--src/datavis3dqml2/datavis3dqml2_plugin.h57
-rw-r--r--src/datavis3dqml2/datavisview.cpp57
-rw-r--r--src/datavis3dqml2/datavisview.h60
-rw-r--r--src/datavis3dqml2/qmldir3
-rw-r--r--src/src.pro3
7 files changed, 267 insertions, 1 deletions
diff --git a/src/datavis3dqml2/datavis3dqml2.pro b/src/datavis3dqml2/datavis3dqml2.pro
new file mode 100644
index 00000000..3964f099
--- /dev/null
+++ b/src/datavis3dqml2/datavis3dqml2.pro
@@ -0,0 +1,35 @@
+TEMPLATE = lib
+TARGET = datavis3dqml2
+QT += qml quick
+CONFIG += qt plugin
+
+TARGET = $$qtLibraryTarget($$TARGET)
+uri = com.digia.QtDataVis3D
+
+# Input
+SOURCES += \
+ datavis3dqml2_plugin.cpp \
+ datavisview.cpp
+
+HEADERS += \
+ datavis3dqml2_plugin.h \
+ datavisview.h
+
+OTHER_FILES = qmldir
+
+!equals(_PRO_FILE_PWD_, $$OUT_PWD) {
+ copy_qmldir.target = $$OUT_PWD/qmldir
+ copy_qmldir.depends = $$_PRO_FILE_PWD_/qmldir
+ copy_qmldir.commands = $(COPY_FILE) \"$$replace(copy_qmldir.depends, /, $$QMAKE_DIR_SEP)\" \"$$replace(copy_qmldir.target, /, $$QMAKE_DIR_SEP)\"
+ QMAKE_EXTRA_TARGETS += copy_qmldir
+ PRE_TARGETDEPS += $$copy_qmldir.target
+}
+
+qmldir.files = qmldir
+unix {
+ installPath = $$[QT_INSTALL_QML]/$$replace(uri, \\., /)
+ qmldir.path = $$installPath
+ target.path = $$installPath
+ INSTALLS += target qmldir
+}
+
diff --git a/src/datavis3dqml2/datavis3dqml2_plugin.cpp b/src/datavis3dqml2/datavis3dqml2_plugin.cpp
new file mode 100644
index 00000000..9f40b5f7
--- /dev/null
+++ b/src/datavis3dqml2/datavis3dqml2_plugin.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the QtDataVis3D module.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** 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 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, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "datavis3dqml2_plugin.h"
+#include "datavisview.h"
+
+#include <qqml.h>
+
+void Datavis3dqml2Plugin::registerTypes(const char *uri)
+{
+ // @uri com.digia.QtDataVis3D
+ qmlRegisterType<DataVisView>(uri, 1, 0, "DataVisView");
+}
+
+
diff --git a/src/datavis3dqml2/datavis3dqml2_plugin.h b/src/datavis3dqml2/datavis3dqml2_plugin.h
new file mode 100644
index 00000000..2447660f
--- /dev/null
+++ b/src/datavis3dqml2/datavis3dqml2_plugin.h
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the QtDataVis3D module.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** 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 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, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DATAVIS3DQML2_PLUGIN_H
+#define DATAVIS3DQML2_PLUGIN_H
+
+#include <QQmlExtensionPlugin>
+
+class Datavis3dqml2Plugin : public QQmlExtensionPlugin
+{
+ Q_OBJECT
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
+
+public:
+ void registerTypes(const char *uri);
+};
+
+#endif // DATAVIS3DQML2_PLUGIN_H
+
diff --git a/src/datavis3dqml2/datavisview.cpp b/src/datavis3dqml2/datavisview.cpp
new file mode 100644
index 00000000..6f720db7
--- /dev/null
+++ b/src/datavis3dqml2/datavisview.cpp
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the QtDataVis3D module.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** 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 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, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "datavisview.h"
+
+DataVisView::DataVisView(QQuickItem *parent):
+ QQuickItem(parent)
+{
+ // By default, QQuickItem does not draw anything. If you subclass
+ // QQuickItem to create a visual item, you will need to uncomment the
+ // following line and re-implement updatePaintNode()
+
+ // setFlag(ItemHasContents, true);
+}
+
+DataVisView::~DataVisView()
+{
+}
+
diff --git a/src/datavis3dqml2/datavisview.h b/src/datavis3dqml2/datavisview.h
new file mode 100644
index 00000000..bd740e1b
--- /dev/null
+++ b/src/datavis3dqml2/datavisview.h
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the QtDataVis3D module.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** 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 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, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DATAVISVIEW_H
+#define DATAVISVIEW_H
+
+#include <QQuickItem>
+
+class DataVisView : public QQuickItem
+{
+ Q_OBJECT
+ Q_DISABLE_COPY(DataVisView)
+
+public:
+ DataVisView(QQuickItem *parent = 0);
+ ~DataVisView();
+};
+
+QML_DECLARE_TYPE(DataVisView)
+
+#endif // DATAVISVIEW_H
+
diff --git a/src/datavis3dqml2/qmldir b/src/datavis3dqml2/qmldir
new file mode 100644
index 00000000..876138db
--- /dev/null
+++ b/src/datavis3dqml2/qmldir
@@ -0,0 +1,3 @@
+module com.digia.QtDataVis3D
+plugin datavis3dqml2
+
diff --git a/src/src.pro b/src/src.pro
index b9b7be46..d25722eb 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -1,2 +1,3 @@
TEMPLATE = subdirs
-SUBDIRS += datavis3d
+SUBDIRS += datavis3d \
+ datavis3dqml2