summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com>2018-12-03 12:50:55 +0800
committerwang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com>2018-12-03 12:52:47 +0800
commit5e11084733c184b0505a4f4816e69b0dd363b653 (patch)
treedd267644470ecfc8676ab31baae315fc7a3c8fb8
parent5ba4327b148f81852c6e2a53bc51ab07b238602e (diff)
change qml folder to
-rw-r--r--sample/app/main.cpp7
-rw-r--r--sample/app/main.qml55
-rw-r--r--sample/package/package.pro6
-rw-r--r--sample/qml/images/answer.png (renamed from sample/package/qml/images/answer.png)bin2688 -> 2688 bytes
-rw-r--r--sample/qml/images/disable.png (renamed from sample/package/qml/images/disable.png)bin2714 -> 2714 bytes
-rw-r--r--sample/qml/images/heart_1079x400.png (renamed from sample/package/qml/images/heart_1079x400.png)bin20429 -> 20429 bytes
-rw-r--r--sample/qml/images/images.qrc (renamed from sample/package/qml/images/images.qrc)0
-rw-r--r--sample/qml/images/oval_1079x400.png (renamed from sample/package/qml/images/oval_1079x400.png)bin18800 -> 18800 bytes
-rw-r--r--sample/qml/images/reject.png (renamed from sample/package/qml/images/reject.png)bin4820 -> 4820 bytes
-rw-r--r--sample/qml/msg.qml (renamed from sample/package/qml/msg.qml)0
-rw-r--r--sample/qml/phone.qml (renamed from sample/package/qml/phone.qml)0
-rw-r--r--sample/qml/system.qml (renamed from sample/package/qml/system.qml)0
-rw-r--r--sample/qml/vics.qml (renamed from sample/package/qml/vics.qml)0
-rw-r--r--sample/readme.md14
14 files changed, 9 insertions, 73 deletions
diff --git a/sample/app/main.cpp b/sample/app/main.cpp
index 69642dc..399a5c9 100644
--- a/sample/app/main.cpp
+++ b/sample/app/main.cpp
@@ -21,7 +21,6 @@
#include <QtQml/QQmlApplicationEngine>
#include <QtQuickControls2/QQuickStyle>
#include <QtQuick/QQuickWindow>
-#include <QtCore/QDir>
#include "eventhandler.h"
@@ -57,18 +56,12 @@ int main(int argc, char *argv[])
EventHandler *eventHandler = new EventHandler();
eventHandler->init(port, secret.toStdString().c_str());
engine.rootContext()->setContextProperty("eventHandler", eventHandler);
- QString qmldir = QCoreApplication::applicationDirPath();
- qmldir.replace(QString("bin"), QString("qml"));
- qmldir.append('/');
- qDebug() << "####qmldir=" << qmldir;
- engine.rootContext()->setContextProperty("qmldir", qmldir);
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
if (engine.rootObjects().isEmpty()) {
HMI_DEBUG(APP_ID, "Fatal Error, rootObject is empty!");
return -1;
}
- qDebug() << "####" << QDir::currentPath() << QCoreApplication::applicationDirPath();
QObject *root = engine.rootObjects().first();
QQuickWindow *window = qobject_cast<QQuickWindow *>(root);
diff --git a/sample/app/main.qml b/sample/app/main.qml
index 94de871..5a70102 100644
--- a/sample/app/main.qml
+++ b/sample/app/main.qml
@@ -12,8 +12,7 @@ ApplicationWindow {
height: 1487
property string onsId: qsTr("onscreenapp")
-// property string pri_path: qsTr("/home/0/app-data/OnScreen/qml/")
- property string pri_path: qmldir
+ property string pri_path: qsTr("/home/0/app-data/OnScreen/onstestapp/")
property string filepath: pri_path + qsTr("vics.qml")
property string msgdata: ""
property string postmsg: ""
@@ -109,56 +108,6 @@ ApplicationWindow {
ColumnLayout {
spacing: 20
RowLayout {
- id: line1
- height: 80
- Label {
- id: guitype
- anchors.left: parent.left
- anchors.leftMargin: 10
- text: 'gui_type'
- font.pixelSize: 20
- color: '#00ADDC'
- }
-
- Label {
- text: qsTr("application")
- font.pixelSize: 20
- color: '#00ADDC'
- anchors.left: guitype.right
- anchors.leftMargin: 20
- }
- }
- RowLayout {
- id: line2
- spacing: 20
- Label {
- id: qmlpath
- anchors.left: parent.left
- anchors.leftMargin: 30
- text: qsTr("file")
- font.pixelSize: 20
- font.italic: true
- color: '#00ADDC'
- }
-
- TextInput {
- id: fpath
- text: filepath
- font.pixelSize: 20
- font.italic: true
- anchors.left: qmlpath.right
- anchors.leftMargin: 20
- color: '#00ADDC'
- cursorVisible: true
- inputMethodHints: Qt.ImhNone
- onFocusChanged: {
- console.log("filepath")
- if(fpath.focus)
- vkb.visible = true
- }
- }
- }
- RowLayout {
id: line3
spacing: 20
Label {
@@ -330,7 +279,7 @@ ApplicationWindow {
}
function postMessage() {
- postmsg = "{\"gui\": \"application\", \"file\": \"" + filepath + "\"";
+ postmsg = "{\"file\": \"" + filepath + "\"";
if (data1.text != "") {
msgdata = "\"" + dataname1.text + "\":\"" + data1.text + "\"";
}
diff --git a/sample/package/package.pro b/sample/package/package.pro
index 5a0c7d8..faf285c 100644
--- a/sample/package/package.pro
+++ b/sample/package/package.pro
@@ -13,12 +13,6 @@ copy_config.commands = $(COPY_FILE) \"$$replace(copy_config.depends, /, $$QMAKE_
QMAKE_EXTRA_TARGETS += copy_config
PRE_TARGETDEPS += $$copy_config.target
-copy_qml.target = $$OUT_PWD/root/qml/
-copy_qml.depends = $$_PRO_FILE_PWD_/qml/.
-copy_qml.commands = $(COPY_DIR) \"$$replace(copy_qml.depends, /, $$QMAKE_DIR_SEP)\" \"$$replace(copy_qml.target, /, $$QMAKE_DIR_SEP)\"
-QMAKE_EXTRA_TARGETS += copy_qml
-PRE_TARGETDEPS += $$copy_qml.target
-
wgt.target = package
wgt.commands = wgtpkg-pack -f -o onstestapp.wgt root
diff --git a/sample/package/qml/images/answer.png b/sample/qml/images/answer.png
index 4707a23..4707a23 100644
--- a/sample/package/qml/images/answer.png
+++ b/sample/qml/images/answer.png
Binary files differ
diff --git a/sample/package/qml/images/disable.png b/sample/qml/images/disable.png
index 8c08c03..8c08c03 100644
--- a/sample/package/qml/images/disable.png
+++ b/sample/qml/images/disable.png
Binary files differ
diff --git a/sample/package/qml/images/heart_1079x400.png b/sample/qml/images/heart_1079x400.png
index e1fe683..e1fe683 100644
--- a/sample/package/qml/images/heart_1079x400.png
+++ b/sample/qml/images/heart_1079x400.png
Binary files differ
diff --git a/sample/package/qml/images/images.qrc b/sample/qml/images/images.qrc
index b75641f..b75641f 100644
--- a/sample/package/qml/images/images.qrc
+++ b/sample/qml/images/images.qrc
diff --git a/sample/package/qml/images/oval_1079x400.png b/sample/qml/images/oval_1079x400.png
index fb850df..fb850df 100644
--- a/sample/package/qml/images/oval_1079x400.png
+++ b/sample/qml/images/oval_1079x400.png
Binary files differ
diff --git a/sample/package/qml/images/reject.png b/sample/qml/images/reject.png
index d6586e1..d6586e1 100644
--- a/sample/package/qml/images/reject.png
+++ b/sample/qml/images/reject.png
Binary files differ
diff --git a/sample/package/qml/msg.qml b/sample/qml/msg.qml
index f89ffa0..f89ffa0 100644
--- a/sample/package/qml/msg.qml
+++ b/sample/qml/msg.qml
diff --git a/sample/package/qml/phone.qml b/sample/qml/phone.qml
index 1b25ed3..1b25ed3 100644
--- a/sample/package/qml/phone.qml
+++ b/sample/qml/phone.qml
diff --git a/sample/package/qml/system.qml b/sample/qml/system.qml
index d42eeb7..d42eeb7 100644
--- a/sample/package/qml/system.qml
+++ b/sample/qml/system.qml
diff --git a/sample/package/qml/vics.qml b/sample/qml/vics.qml
index 2848fbc..2848fbc 100644
--- a/sample/package/qml/vics.qml
+++ b/sample/qml/vics.qml
diff --git a/sample/readme.md b/sample/readme.md
index 539f386..a48f3e0 100644
--- a/sample/readme.md
+++ b/sample/readme.md
@@ -5,21 +5,21 @@ A test application for onscreenapp
## compile & install
- compile
- - when onscreenapp is compiled, this app's wgt file will exist at "onscreenapp/sample/package", called onstestapp.wgt.
+ - when onscreenapp is compiled, this app's wgt file will exist at "onscreenapp/sample/package" which called onstestapp.wgt.
- install
`afm-util install onstestapp.wgt;sync`
## dependence
-Onscreenapp depend on libhomescreen add agl-service-homescreen-2017 as below:
-- libhomescreen must have 'showWindow' event and 'showWindow' interface.
-- agl-service-homescreen-2017 must have 'showWindow/hideWindow/replyShowWindow' verbs.
-
+Onscreenapp depend on libhomescreen add agl-service-homescreen as below:
+- libhomescreen must have 'showWindow/hideWindow/replyShowWindow' event
+ and 'showWindow/hideWindow/replyShowWindow' interface.
+- agl-service-homescreen must have 'showWindow/hideWindow/replyShowWindow' verbs.
## usage
-Before start onstestapp you must copy all files in "ons" folder to "$HOME/app-data/OnScreen/qml" on your board(R-car M3 etc.),
+Before start onstestapp you must copy all files in "qml" folder to "$HOME/app-data/OnScreen/onstestapp/" on your board(R-car M3 etc.),
then do as below:
1. start onstestapp in launcher
@@ -33,5 +33,5 @@ You also can edit the text which will post to onscreen, do as below:
- comment below contents in /etc/xdg/weston/weston.ini
- `#ivi-input-module=ivi-input-controller.so`
-- before press "Post" button, touch text area to call qt virtual keyboard and edit text.
+- before press "Post" button, touch text area to call keyboard and edit the text.