diff options
-rw-r--r-- | apps/com.pelagicore.music/stores/MusicStore.qml | 10 | ||||
-rw-r--r-- | apps/com.pelagicore.tuner/stores/TunerStore.qml | 12 | ||||
-rw-r--r-- | imports/system/intents/qmldir | 1 | ||||
-rw-r--r-- | imports/system/models/application/ApplicationModel.qml | 10 | ||||
-rw-r--r-- | imports/system/requests/ApplicationRequestHandler.qml (renamed from imports/system/intents/IntentsInterface.qml) | 26 | ||||
-rw-r--r-- | imports/system/requests/qmldir | 1 | ||||
-rw-r--r-- | sysui/display/Display.qml | 2 | ||||
-rw-r--r-- | sysui/ipc/MusicAppRequestsIPC.qml (renamed from sysui/ipc/MusicIntentsIPC.qml) | 14 | ||||
-rw-r--r-- | sysui/ipc/qmldir | 2 |
9 files changed, 39 insertions, 39 deletions
diff --git a/apps/com.pelagicore.music/stores/MusicStore.qml b/apps/com.pelagicore.music/stores/MusicStore.qml index e31102fa..eb8f054f 100644 --- a/apps/com.pelagicore.music/stores/MusicStore.qml +++ b/apps/com.pelagicore.music/stores/MusicStore.qml @@ -130,8 +130,8 @@ Store { property Item ipc: Item { ApplicationInterfaceExtension { - id: musicIntentsInterface - name: "neptune.musicintents.interface" + id: musicApplicationRequestIPC + name: "neptune.musicapprequests.interface" Component.onCompleted: { if (object.webradioInstalled) { musicSourcesModel.append({"text" : "Web radio"}); @@ -143,10 +143,10 @@ Store { } Connections { - target: musicIntentsInterface.object + target: musicApplicationRequestIPC.object onSpotifyInstalledChanged: { - if (musicIntentsInterface.object.spotifyInstalled) { + if (musicApplicationRequestIPC.object.spotifyInstalled) { musicSourcesModel.append({"text" : "Spotify"}); } else { for (var i = 0; i < musicSourcesModel.count; i++) { @@ -157,7 +157,7 @@ Store { } } onWebradioInstalledChanged: { - if (musicIntentsInterface.object.webradioInstalled) { + if (musicApplicationRequestIPC.object.webradioInstalled) { musicSourcesModel.append({"text" : "Web radio"}); } else { for (var i = 0; i < musicSourcesModel.count; i++) { diff --git a/apps/com.pelagicore.tuner/stores/TunerStore.qml b/apps/com.pelagicore.tuner/stores/TunerStore.qml index 811ef78c..1062335a 100644 --- a/apps/com.pelagicore.tuner/stores/TunerStore.qml +++ b/apps/com.pelagicore.tuner/stores/TunerStore.qml @@ -83,9 +83,9 @@ Store { } property var ipc: QtObject { - property var musicIntentsInterface: ApplicationInterfaceExtension { - id: musicIntentsInterface - name: "neptune.musicintents.interface" + property var musicApplicationRequestIPC: ApplicationInterfaceExtension { + id: musicApplicationRequestIPC + name: "neptune.musicapprequests.interface" Component.onCompleted: { if (object.webradioInstalled) { musicSourcesModel.append({"text" : "Web radio"}); @@ -97,10 +97,10 @@ Store { } property var ipcConx: Connections { - target: musicIntentsInterface.object + target: musicApplicationRequestIPC.object onSpotifyInstalledChanged: { - if (musicIntentsInterface.object.spotifyInstalled) { + if (musicApplicationRequestIPC.object.spotifyInstalled) { musicSourcesModel.append({"text" : "Spotify"}); } else { for (var i = 0; i < musicSourcesModel.count; i++) { @@ -111,7 +111,7 @@ Store { } } onWebradioInstalledChanged: { - if (musicIntentsInterface.object.webradioInstalled) { + if (musicApplicationRequestIPC.object.webradioInstalled) { musicSourcesModel.append({"text" : "Web radio"}); } else { for (var i = 0; i < musicSourcesModel.count; i++) { diff --git a/imports/system/intents/qmldir b/imports/system/intents/qmldir deleted file mode 100644 index 5ed2d57d..00000000 --- a/imports/system/intents/qmldir +++ /dev/null @@ -1 +0,0 @@ -IntentsInterface 1.0 IntentsInterface.qml diff --git a/imports/system/models/application/ApplicationModel.qml b/imports/system/models/application/ApplicationModel.qml index e65af69b..463d4c09 100644 --- a/imports/system/models/application/ApplicationModel.qml +++ b/imports/system/models/application/ApplicationModel.qml @@ -31,7 +31,7 @@ import QtQuick 2.8 import QtApplicationManager 1.0 as AM -import intents 1.0 +import requests 1.0 /* A list of ApplicationInfo objects. @@ -77,8 +77,8 @@ ListModel { function goBack() { //if an intent is requested - if (d.intentsInterface.history.length > 1) { - d.intentsInterface.goBack(); + if (d.applicationRequestHandler.history.length > 1) { + d.applicationRequestHandler.goBack(); } else { //else return to home goHome(); @@ -103,8 +103,8 @@ ListModel { property var activeAppInfo: null property var instrumentClusterAppInfo: null property var populating: true - property IntentsInterface intentsInterface: IntentsInterface { - id: intentsInterface + property ApplicationRequestHandler applicationRequestHandler: ApplicationRequestHandler { + id: applicationRequestHandler activeAppId: activeAppInfo ? activeAppInfo.id : "" } readonly property var logCat: LoggingCategory { diff --git a/imports/system/intents/IntentsInterface.qml b/imports/system/requests/ApplicationRequestHandler.qml index 52b33bb6..0dcf85a3 100644 --- a/imports/system/intents/IntentsInterface.qml +++ b/imports/system/requests/ApplicationRequestHandler.qml @@ -32,13 +32,13 @@ import QtQuick 2.10 import QtApplicationManager 1.0 /*! - \qmltype IntentsInterface - \inqmlmodule intent + \qmltype ApplicationRequestHandler + \inqmlmodule requests \inherits QtObject \since 5.11 \brief An object used to perform actions. - The IntentsInterface is not meant to be used as is in the system, instead it is + The ApplicationRequestHandler is not meant to be used as is in the system, instead it is acting as the receiver of the requests coming from the applications using the Qt.openUrlExternally function as shown in the example below. @@ -62,7 +62,7 @@ import QtApplicationManager 1.0 \endqml - The interface to act on Intent requests. An intent request is used to request an + The interface to act on application requests. A request is used to instruct an application to just open or open in a certain state. That said, the action should be possible to be performed from wherever in the system. An application could call the Qt.openUrlExternally() function passing as parameter the mime-type of the @@ -72,17 +72,17 @@ import QtApplicationManager 1.0 [ 'x-scheme-handler/x-tuner' ]) The ApplicationManager will then consult its internal database of applications looking for a match with x-scheme-handler/x-mimeType. If there is a successful match, then the openUrlRequested signal will be emitted and its receiver - (IntentsInterface) can then either acknowledge the request by calling acknowledgeOpenUrlRequest - function or reject (rejectOpenUrlRequest). If then the application is started, the url is - supplied to the application as a document through the signal openDocument(string - documentUrl, string mimeType) via its ApplicationInterface. + (ApplicationRequestHandler) can then either acknowledge the request by calling + acknowledgeOpenUrlRequest function or reject (rejectOpenUrlRequest). If then the application + is started, the url is supplied to the application as a document through the signal + openDocument(string documentUrl, string mimeType) via its ApplicationInterface. */ QtObject { id: root /*! - \qmlproperty string IntentsInterface::activeAppId + \qmlproperty string ApplicationRequestHandler ::activeAppId This property holds the active application id. It is used to store the active application id before an intent request is submitted in order to be able to navigate back to it accordingly. @@ -91,7 +91,7 @@ QtObject { property string activeAppId: "" /*! - \qmlproperty var IntentsInterface::history + \qmlproperty var ApplicationRequestHandler::history This property holds the history of activities started and it's used for a sequential navigation back to the initial state @@ -101,7 +101,7 @@ QtObject { property var history: [] /*! - \qmlproperty var IntentsInterface::appManConns + \qmlproperty var ApplicationRequestHandler::appManConns \readonly This property is used to listen to the ApplicationManager and get the request from other @@ -116,7 +116,7 @@ QtObject { } /*! - \qmlmethod IntentsInterface::sendRequest(id, params) + \qmlmethod ApplicationRequestHandler::sendRequest(id, params) Requests the action to be taken in the UI. It uses the Application Managers' acknowledgeOpenUrlRequest function to open the requested application passing the given url to it. It also keeps and @@ -132,7 +132,7 @@ QtObject { } /*! - \qmlmethod IntentsInterface::goBack() + \qmlmethod ApplicationRequestHandler::goBack() The goBack function returns to the previous state from a requested action based on the history. It also takes care of updating the history accordingly. diff --git a/imports/system/requests/qmldir b/imports/system/requests/qmldir new file mode 100644 index 00000000..4853352e --- /dev/null +++ b/imports/system/requests/qmldir @@ -0,0 +1 @@ +ApplicationRequestHandler 1.0 ApplicationRequestHandler.qml diff --git a/sysui/display/Display.qml b/sysui/display/Display.qml index 2c1d2848..325276a3 100644 --- a/sysui/display/Display.qml +++ b/sysui/display/Display.qml @@ -90,7 +90,7 @@ Item { localeCode: Style.languageLocale } - property var musicIntentsIPC: MusicIntentsIPC { } + property var musicAppRequestsIPC: MusicAppRequestsIPC { } signal screenshotRequested() diff --git a/sysui/ipc/MusicIntentsIPC.qml b/sysui/ipc/MusicAppRequestsIPC.qml index 8c44cbeb..2489e100 100644 --- a/sysui/ipc/MusicIntentsIPC.qml +++ b/sysui/ipc/MusicAppRequestsIPC.qml @@ -33,13 +33,13 @@ import QtQuick 2.0 import QtApplicationManager 1.0 /*! - \qmltype MusicIntentsIPC + \qmltype MusicAppRequestsIPC \inqmlmodule service \inherits ApplicationIPCInterface \since 5.11 - \brief An IPC for music intents + \brief An IPC for music application requests - The MusicIntentsIPC is meant to be used only for the music intents use case, enabling music, + The MusicaAppRequestsIPC is meant to be used only for the music requests use case, enabling music, tuner and webradio apps to know whether spotify and/or webradio are installed from the appstore, or added / removed. This interface can be accessed only from the mentioned apps. */ @@ -48,7 +48,7 @@ ApplicationIPCInterface { id: root /*! - \qmlproperty rect MusicIntentsIPC::spotifyInstalled + \qmlproperty rect MusicAppRequestsIPC::spotifyInstalled This property holds whether spotify application is installed or not in Neptune 3. */ @@ -56,7 +56,7 @@ ApplicationIPCInterface { property bool spotifyInstalled: false /*! - \qmlproperty rect MusicIntentsIPC::webradioInstalled + \qmlproperty rect MusicAppRequestsIPC::webradioInstalled This property holds whether web radio application is installed or not in Neptune 3. */ @@ -64,7 +64,7 @@ ApplicationIPCInterface { property bool webradioInstalled: false /*! - \qmlproperty rect MusicIntentsIPC::appmanCnx + \qmlproperty rect MusicAppRequestsIPC::appmanCnx This property is used to listen to the ApplicationManager to get the status of external application in Neptune 3. @@ -91,7 +91,7 @@ ApplicationIPCInterface { } Component.onCompleted: { - ApplicationIPCManager.registerInterface(root, "neptune.musicintents.interface", + ApplicationIPCManager.registerInterface(root, "neptune.musicapprequests.interface", { "applicationIds": [ "com.pelagicore.music", "com.pelagicore.tuner", "com.pelagicore.webradio" ] }) diff --git a/sysui/ipc/qmldir b/sysui/ipc/qmldir index dd9bb2c1..953551e5 100644 --- a/sysui/ipc/qmldir +++ b/sysui/ipc/qmldir @@ -1 +1 @@ -MusicIntentsIPC 1.0 MusicIntentsIPC.qml +MusicAppRequestsIPC 1.0 MusicAppRequestsIPC.qml |