AppStreamCompose.Hint¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class AppStreamCompose.Hint(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new()¶
- Return type:
Creates a new
AppStreamCompose.Hint
.
- classmethod new_for_tag(tag)¶
- Parameters:
tag (
str
) – The tag ID to construct this hint for.- Raises:
- Return type:
Creates a new
AppStreamCompose.Hint
with the given tag. If the selected tag was not registered+ with the global tag registry,None
is returned and an error is set.
- add_explanation_var(var_name, text)¶
- Parameters:
Add a replacement variable for the explanation text.
- format_explanation()¶
- Returns:
Explanation text for this hint, with variables replaced.
- Return type:
Formats the explanation template to return a human-redable issue hint explanation, with all placeholder variables replaced.
- get_explanation_vars_list()¶
- Returns:
A flattened
GLib.PtrArray
with the key/value pairs.- Return type:
[
str
]
Returns a list with the flattened key/value pairs for this hint. Values are located in uneven list entries, following their keys in even list entries.
- get_severity()¶
- Return type:
Gets the issue severity of this hint.
- is_valid()¶
-
Check if this hint is valid (it requires at least a tag and a severity in order to be considered valid).
- set_explanation_template(explanation_tmpl)¶
- Parameters:
explanation_tmpl (
str
) –
Sets the explanation template for this hint.
- set_severity(severity)¶
- Parameters:
severity (
AppStream.IssueSeverity
) –
Sets the issue severity of this hint.