summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorTadao Tanikawa <tanikawa.tadao@jp.panasonic.com>2018-01-03 02:39:23 +0900
committerTadao Tanikawa <tanikawa.tadao@jp.panasonic.com>2018-01-03 03:18:29 +0900
commit7cd388558f49166b7df2811fdf649e93230017b5 (patch)
tree9fb17056c416f7b960fe68375af589634c6427fb /examples
parent8655fb6da62f8617b946e7c933ea151b43de2234 (diff)
Initial import of QtAGLExtraseel_5.0.0eel/5.0.05.0.0
Qt AGLExtras module provides a set of easy to create AGL Qt application. It uses the AGL HMI and application framework, therefore the application can be easily integrated to AGL HomeScreen/WindowManager on AGL Demo Platform. Change-Id: I38a47aefcda8ee4ded759d56c5149ebbe22f94a9 Signed-off-by: Tadao Tanikawa <tanikawa.tadao@jp.panasonic.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/aglextras/aglextras.pro3
-rw-r--r--examples/aglextras/helloworld/helloworld.pro10
-rw-r--r--examples/aglextras/helloworld/main.cpp28
-rw-r--r--examples/aglextras/helloworld/qml/helloworld/main.qml15
-rw-r--r--examples/aglextras/helloworld/resources.qrc5
-rw-r--r--examples/examples.pro2
6 files changed, 63 insertions, 0 deletions
diff --git a/examples/aglextras/aglextras.pro b/examples/aglextras/aglextras.pro
new file mode 100644
index 0000000..309f27f
--- /dev/null
+++ b/examples/aglextras/aglextras.pro
@@ -0,0 +1,3 @@
+TEMPLATE = subdirs
+SUBDIRS += \
+ helloworld
diff --git a/examples/aglextras/helloworld/helloworld.pro b/examples/aglextras/helloworld/helloworld.pro
new file mode 100644
index 0000000..6db8e40
--- /dev/null
+++ b/examples/aglextras/helloworld/helloworld.pro
@@ -0,0 +1,10 @@
+QT += aglextras qml quick
+
+SOURCES += \
+ main.cpp
+
+RESOURCES += \
+ resources.qrc
+
+target.path = $$[QT_INSTALL_EXAMPLES]/aglextras/helloworld
+INSTALLS += target
diff --git a/examples/aglextras/helloworld/main.cpp b/examples/aglextras/helloworld/main.cpp
new file mode 100644
index 0000000..08b2e97
--- /dev/null
+++ b/examples/aglextras/helloworld/main.cpp
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2017 The Qt Company Ltd.
+ * Copyright (c) 2017 Panasonic Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <QtAGLExtras/AGLApplication>
+#include <QtCore/QUrlQuery>
+
+int main(int argc, char *argv[])
+{
+ AGLApplication app(argc, argv);
+ app.setApplicationName("HelloWorld");
+ app.setupApplicationRole("Settings");
+ app.load(QUrl(QStringLiteral("qrc:/helloworld.qml")));
+ return app.exec();
+}
diff --git a/examples/aglextras/helloworld/qml/helloworld/main.qml b/examples/aglextras/helloworld/qml/helloworld/main.qml
new file mode 100644
index 0000000..f0c5be1
--- /dev/null
+++ b/examples/aglextras/helloworld/qml/helloworld/main.qml
@@ -0,0 +1,15 @@
+import QtQuick 2.0
+
+Rectangle {
+ id: page
+ width: 320; height: 480
+ color: "lightgray"
+
+ Text {
+ id: helloText
+ text: "Hello world!"
+ y: 30
+ anchors.horizontalCenter: page.horizontalCenter
+ font.pointSize: 24; font.bold: true
+ }
+}
diff --git a/examples/aglextras/helloworld/resources.qrc b/examples/aglextras/helloworld/resources.qrc
new file mode 100644
index 0000000..8a1a2e2
--- /dev/null
+++ b/examples/aglextras/helloworld/resources.qrc
@@ -0,0 +1,5 @@
+<RCC>
+ <qresource prefix="/">
+ <file>qml/helloworld/main.qml</file>
+ </qresource>
+</RCC>
diff --git a/examples/examples.pro b/examples/examples.pro
new file mode 100644
index 0000000..02d0ae0
--- /dev/null
+++ b/examples/examples.pro
@@ -0,0 +1,2 @@
+TEMPLATE = subdirs
+SUBDIRS += aglextras