Metadata passed to scopes for preview and activation.
More...
#include <unity/scopes/qt/QActionMetadata.h>
unity::scopes::qt::QActionMetadata::QActionMetadata |
( |
QString const & |
locale, |
|
|
QString const & |
form_factor |
|
) |
| |
Create ActionMetadata with the given locale and form factor.
- Parameters
-
locale | locale string, eg. en_EN |
form_factor | form factor name, e.g. phone, desktop, phone-version etc. |
bool unity::scopes::qt::QActionMetadata::contains_hint |
( |
QString const & |
key | ) |
const |
Check if this SearchMetadata has a hint.
- Parameters
-
- Returns
- True if the hint is set.
QVariantMap unity::scopes::qt::QActionMetadata::hints |
( |
| ) |
const |
Get all hints.
- Returns
- Hints dictionary.
- Exceptions
-
unity::NotFoundException | if no hints are available. |
QVariant& unity::scopes::qt::QActionMetadata::operator[] |
( |
QString const & |
key | ) |
|
Returns a reference to a hint.
This method can be used to read or set hints. Setting a value of an existing hint overwrites its previous value. Referencing a non-existing hint automatically creates it with a default value of QVariant::Type::Null.
- Parameters
-
- Returns
- A reference to the hint.
QVariant const& unity::scopes::qt::QActionMetadata::operator[] |
( |
QString const & |
key | ) |
const |
Returns a const reference to a hint.
This method can be used for read-only access to hints. Referencing a non-existing hint throws unity::InvalidArgumentException.
- Parameters
-
- Returns
- A const reference to the hint.
- Exceptions
-
unity::NotFoundException | if no hint with the given name exists. |
QVariant unity::scopes::qt::QActionMetadata::scope_data |
( |
| ) |
const |
Get data attached to this ActionMetadata.
- Returns
- The attached data, or QVariant::null.
void unity::scopes::qt::QActionMetadata::set_hint |
( |
QString const & |
key, |
|
|
QVariant const & |
value |
|
) |
| |
Sets a hint.
- Parameters
-
key | The name of the hint. |
value | Hint value |
void unity::scopes::qt::QActionMetadata::set_scope_data |
( |
QVariant const & |
data | ) |
|
Attach arbitrary data to this ActionMetadata.
- Parameters
-
data | The data value to attach. |
The documentation for this class was generated from the following file: