change qml folder to
authorwang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com>
Mon, 3 Dec 2018 04:50:55 +0000 (12:50 +0800)
committerwang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com>
Mon, 3 Dec 2018 04:52:47 +0000 (12:52 +0800)
14 files changed:
sample/app/main.cpp
sample/app/main.qml
sample/package/package.pro
sample/qml/images/answer.png [moved from sample/package/qml/images/answer.png with 100% similarity]
sample/qml/images/disable.png [moved from sample/package/qml/images/disable.png with 100% similarity]
sample/qml/images/heart_1079x400.png [moved from sample/package/qml/images/heart_1079x400.png with 100% similarity]
sample/qml/images/images.qrc [moved from sample/package/qml/images/images.qrc with 100% similarity]
sample/qml/images/oval_1079x400.png [moved from sample/package/qml/images/oval_1079x400.png with 100% similarity]
sample/qml/images/reject.png [moved from sample/package/qml/images/reject.png with 100% similarity]
sample/qml/msg.qml [moved from sample/package/qml/msg.qml with 100% similarity]
sample/qml/phone.qml [moved from sample/package/qml/phone.qml with 100% similarity]
sample/qml/system.qml [moved from sample/package/qml/system.qml with 100% similarity]
sample/qml/vics.qml [moved from sample/package/qml/vics.qml with 100% similarity]
sample/readme.md

index 69642dc..399a5c9 100644 (file)
@@ -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);
index 94de871..5a70102 100644 (file)
@@ -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: ""
@@ -108,56 +107,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
@@ -330,7 +279,7 @@ ApplicationWindow {
     }
 
     function postMessage() {
-        postmsg = "{\"gui\": \"application\", \"file\": \"" + filepath + "\"";
+        postmsg = "{\"file\": \"" + filepath + "\"";
         if (data1.text != "") {
             msgdata = "\"" + dataname1.text + "\":\"" + data1.text + "\"";
         }
index 5a0c7d8..faf285c 100644 (file)
@@ -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
 
index 539f386..a48f3e0 100644 (file)
@@ -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.