diff options
author | zheng_wenlong <wenlong_zheng@nexty-ele.com> | 2018-10-30 14:30:15 +0900 |
---|---|---|
committer | zheng_wenlong <wenlong_zheng@nexty-ele.com> | 2018-10-30 14:30:15 +0900 |
commit | 6aba1789714a7557484d83ee64e5dfb217430390 (patch) | |
tree | 0386b0367c779fd3169cc02e3b856a22c75c4ae0 /src/qlibhomescreen.cpp | |
parent | 0d7f000588954006d4687c97c19b424769189f9f (diff) |
add source for ces2019sandbox/zheng_wenlong/ces2019
Diffstat (limited to 'src/qlibhomescreen.cpp')
-rw-r--r-- | src/qlibhomescreen.cpp | 72 |
1 files changed, 71 insertions, 1 deletions
diff --git a/src/qlibhomescreen.cpp b/src/qlibhomescreen.cpp index 13093c3..1082869 100644 --- a/src/qlibhomescreen.cpp +++ b/src/qlibhomescreen.cpp @@ -179,4 +179,74 @@ void QLibHomeScreen::tapShortcut(QString application_name) { HMI_DEBUG("qlibhomescreen","tapShortcut %s", application_name.toStdString().c_str()); this->mp_hs->tapShortcut(application_name.toStdString().c_str()); -}
\ No newline at end of file +} + +/** + * show application by application id + * + * #### Parameters + * - id : application id + * - json : json parameters + * + * #### Return + * - None. + * + */ +void QLibHomeScreen::showWindow(QString application_name, json_object* json) +{ + mp_hs->showWindow(application_name.toStdString().c_str(), json); +} + +/** + * show application by application id, json string + * + * #### Parameters + * - id : application id + * - json : json parameters + * + * #### Return + * - None. + * + */ +void QLibHomeScreen::showWindow(QString application_name, QString json) +{ + if(json.isNull()) + this->tapShortcut(application_name); + else + mp_hs->showWindow(application_name.toStdString().c_str(), json_tokener_parse(json.toStdString().c_str())); +} + + +/** + * allocate restiction App + * + * use libhomescreen api to call restriction app to display + * + * #### Parameters + * - area : restriction display area + * + * #### Resturn + * - None. + * + */ +void QLibHomeScreen::allocateRestriction(QString area) +{ + mp_hs->allocateRestriction(area.toStdString().c_str()); +} + +/** + * allocate restiction App + * + * use libhomescreen api to call restriction app to hide + * + * #### Parameters + * - area : restriction display area + * + * #### Resturn + * - None. + * + */ +void QLibHomeScreen::releaseRestriction(QString area) +{ + mp_hs->releaseRestriction(area.toStdString().c_str()); +} |