IntentObject QML Type
This type represents an Intent definition on the System UI side. More...
Import Statement: | import QtApplicationManager.SystemUI 2.0 |
Properties
- applicationId : string
- intentId : string
- packageId : string
- parameterMatch : var
- requiredCapabilities : list<string>
- visibility : IntentObject.Visibility
Detailed Description
Each instance of this class represents a single Intent definition for a specific application.
Most of the read-only properties map directly to values read from the package's info.yaml
file - these are documented in the Manifest Definition.
Items of this type are not creatable from QML code. Only functions and properties of IntentServer and IntentModel will return pointers to this class.
Make sure to not save references to an IntentObject across function calls: packages (and with that, the intents contained within) can be deinstalled at any time, invalidating your reference. In case you do need a persistent handle, use the intentId together with the applicationId string.
Property Documentation
[read-only] applicationId : string |
The id of the application responsible for handling this intent.
[read-only] intentId : string |
The id of the intent.
[read-only] packageId : string |
The id of the package that the handling application of this intent is part of.
[read-only] parameterMatch : var |
A handling application can limit what parameter values it accepts. The property itself is an object that corresponds to a subset of allowed parameter object of this intent. When set, the parameters of each incoming intent request are matched against this object, following these rules:
- a field missing from
parameterMatch
is ignored. - a field of type
string
specified inparameterMatch
is matched as a regular expressions against the corresponding parameter value. - for fields of type
list
specified inparameterMatch
, the corresponding parameter value has to match any of the values in the list (using QVariant compare). - any other fields in
parameterMatch
are compared as QVariants to the corresponding parameter value.
One example would be an open-mime-type
intent that is implemented by many applications: there would be a mimeType
parameter and each application could limit the requests it wants to receive by setting a parameterMatch on this mimeType
parameter, e.g. { mimeType: "^image/.*\.png$" }
An application requesting this intent needs to have all of the given capabilities.
See also ApplicationObject::capabilities.
[read-only] visibility : IntentObject.Visibility |
The visibility of this intent for other packages.
- IntentObject.Public - Any application can request this intent.
- IntentObject.Private - Only applications from the same package can request this intent.
© 2021 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.