Code Review
/
apps
/
onscreenapp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
|
inline
| side by side (parent:
5ba4327
)
change qml folder to
author
wang_zhiqiang
<wang_zhiqiang@dl.cn.nexty-ele.com>
Mon, 3 Dec 2018 04:50:55 +0000
(12:50 +0800)
committer
wang_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
patch
|
blob
|
history
sample/app/main.qml
patch
|
blob
|
history
sample/package/package.pro
patch
|
blob
|
history
sample/qml/images/answer.png
[moved from
sample/package/qml/images/answer.png
with 100% similarity]
patch
|
blob
|
history
sample/qml/images/disable.png
[moved from
sample/package/qml/images/disable.png
with 100% similarity]
patch
|
blob
|
history
sample/qml/images/heart_1079x400.png
[moved from
sample/package/qml/images/heart_1079x400.png
with 100% similarity]
patch
|
blob
|
history
sample/qml/images/images.qrc
[moved from
sample/package/qml/images/images.qrc
with 100% similarity]
patch
|
blob
|
history
sample/qml/images/oval_1079x400.png
[moved from
sample/package/qml/images/oval_1079x400.png
with 100% similarity]
patch
|
blob
|
history
sample/qml/images/reject.png
[moved from
sample/package/qml/images/reject.png
with 100% similarity]
patch
|
blob
|
history
sample/qml/msg.qml
[moved from
sample/package/qml/msg.qml
with 100% similarity]
patch
|
blob
|
history
sample/qml/phone.qml
[moved from
sample/package/qml/phone.qml
with 100% similarity]
patch
|
blob
|
history
sample/qml/system.qml
[moved from
sample/package/qml/system.qml
with 100% similarity]
patch
|
blob
|
history
sample/qml/vics.qml
[moved from
sample/package/qml/vics.qml
with 100% similarity]
patch
|
blob
|
history
sample/readme.md
patch
|
blob
|
history
diff --git
a/sample/app/main.cpp
b/sample/app/main.cpp
index
69642dc
..
399a5c9
100644
(file)
--- a/
sample/app/main.cpp
+++ b/
sample/app/main.cpp
@@
-21,7
+21,6
@@
#include <QtQml/QQmlApplicationEngine>
#include <QtQuickControls2/QQuickStyle>
#include <QtQuick/QQuickWindow>
#include <QtQml/QQmlApplicationEngine>
#include <QtQuickControls2/QQuickStyle>
#include <QtQuick/QQuickWindow>
-#include <QtCore/QDir>
#include "eventhandler.h"
#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);
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;
}
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);
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
(file)
--- a/
sample/app/main.qml
+++ b/
sample/app/main.qml
@@
-12,8
+12,7
@@
ApplicationWindow {
height: 1487
property string onsId: qsTr("onscreenapp")
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: ""
property string filepath: pri_path + qsTr("vics.qml")
property string msgdata: ""
property string postmsg: ""
@@
-108,56
+107,6
@@
ApplicationWindow {
ColumnLayout {
spacing: 20
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
RowLayout {
id: line3
spacing: 20
@@
-330,7
+279,7
@@
ApplicationWindow {
}
function postMessage() {
}
function postMessage() {
- postmsg = "{\"
gui\": \"application\", \"
file\": \"" + filepath + "\"";
+ postmsg = "{\"file\": \"" + filepath + "\"";
if (data1.text != "") {
msgdata = "\"" + dataname1.text + "\":\"" + data1.text + "\"";
}
if (data1.text != "") {
msgdata = "\"" + dataname1.text + "\":\"" + data1.text + "\"";
}
diff --git
a/sample/package/package.pro
b/sample/package/package.pro
index
5a0c7d8
..
faf285c
100644
(file)
--- 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
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
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
similarity index 100%
rename from
sample/package/qml/images/answer.png
rename to
sample/qml/images/answer.png
diff --git
a/sample/package/qml/images/disable.png
b/sample/qml/images/disable.png
similarity index 100%
rename from
sample/package/qml/images/disable.png
rename to
sample/qml/images/disable.png
diff --git
a/sample/package/qml/images/heart_1079x400.png
b/sample/qml/images/heart_1079x400.png
similarity index 100%
rename from
sample/package/qml/images/heart_1079x400.png
rename to
sample/qml/images/heart_1079x400.png
diff --git
a/sample/package/qml/images/images.qrc
b/sample/qml/images/images.qrc
similarity index 100%
rename from
sample/package/qml/images/images.qrc
rename to
sample/qml/images/images.qrc
diff --git
a/sample/package/qml/images/oval_1079x400.png
b/sample/qml/images/oval_1079x400.png
similarity index 100%
rename from
sample/package/qml/images/oval_1079x400.png
rename to
sample/qml/images/oval_1079x400.png
diff --git
a/sample/package/qml/images/reject.png
b/sample/qml/images/reject.png
similarity index 100%
rename from
sample/package/qml/images/reject.png
rename to
sample/qml/images/reject.png
diff --git
a/sample/package/qml/msg.qml
b/sample/qml/msg.qml
similarity index 100%
rename from
sample/package/qml/msg.qml
rename to
sample/qml/msg.qml
diff --git
a/sample/package/qml/phone.qml
b/sample/qml/phone.qml
similarity index 100%
rename from
sample/package/qml/phone.qml
rename to
sample/qml/phone.qml
diff --git
a/sample/package/qml/system.qml
b/sample/qml/system.qml
similarity index 100%
rename from
sample/package/qml/system.qml
rename to
sample/qml/system.qml
diff --git
a/sample/package/qml/vics.qml
b/sample/qml/vics.qml
similarity index 100%
rename from
sample/package/qml/vics.qml
rename to
sample/qml/vics.qml
diff --git
a/sample/readme.md
b/sample/readme.md
index
539f386
..
a48f3e0
100644
(file)
--- a/
sample/readme.md
+++ b/
sample/readme.md
@@
-5,21
+5,21
@@
A test application for onscreenapp
## compile & install
- compile
## 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
- 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
## 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
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`
- 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.