AppStream.Relation¶
- 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 AppStream.Relation(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod check_results_get_compatibility_score(rc_results)¶
- Parameters:
rc_results ([
AppStream.RelationCheckResult]) – an array ofAppStream.RelationCheckResult- Return type:
Calculate a compatibility sore between 0 and 100 based on the given set of AsRelationCheckResults.
A compatibility of 100 means all requirements are satisfied and the component will run perfectly on the confoguration it was tested agains, while 0 means it will not run at all.
- classmethod new()¶
- Returns:
- Return type:
Creates a new
AppStream.Relation.Added in version 0.11.0.
- get_compare()¶
- Returns:
an enum of type
AppStream.RelationCompare- Return type:
The version comparison type.
Added in version 0.12.0.
- get_display_side_kind()¶
- Returns:
a
AppStream.DisplaySideKindorAppStream.DisplaySideKind.UNKNOWN- Return type:
Gets the display side kind, in case this item is of kind
AppStream.RelationItemKind.DISPLAY_LENGTHAdded in version 0.12.12.
- get_item_kind()¶
- Returns:
an enum of type
AppStream.RelationItemKind- Return type:
The kind of the item of this
AppStream.Relation.Added in version 0.12.0.
- get_kind()¶
- Returns:
an enum of type
AppStream.RelationKind- Return type:
The type (and thereby strength) of this
AppStream.Relation.Added in version 0.12.0.
- get_value_control_kind()¶
- Returns:
a
AppStream.ControlKindorAppStream.ControlKind.UNKNOWNin case the item is not of the right kind.- Return type:
Get the value of this
AppStream.Relationitem asAppStream.ControlKindif the type of this relation isAppStream.RelationItemKind.CONTROL. Otherwise returnAppStream.ControlKind.UNKNOWNAdded in version 0.12.11.
- get_value_int()¶
- Returns:
The value of this
AppStream.Relationitem as an integer. Returns 0 if the value was no integer.- Return type:
Added in version 0.12.0.
- get_value_internet_bandwidth()¶
- Returns:
The minimum bandwidth requirement, in Mbit/s.
- Return type:
If this
AppStream.Relationis of kindAppStream.RelationItemKind.INTERNET, return the minimum bandwidth requirement of the component, if set.If the relation is of a different kind, or the requirement isn’t set, this returns
0.Added in version 0.15.5.
- get_value_internet_kind()¶
- Returns:
a
AppStream.InternetKindorAppStream.InternetKind.UNKNOWNin case the item is not of the right kind.- Return type:
Get the value of this
AppStream.Relationitem asAppStream.InternetKindif the type of this relation isAppStream.RelationItemKind.INTERNET. Otherwise returnAppStream.InternetKind.UNKNOWNAdded in version 0.15.5.
- get_value_px()¶
- Returns:
The logical pixel amount for this display length, value <= 0 on error.
- Return type:
In case this
AppStream.Relationis of kindAppStream.RelationItemKind.DISPLAY_LENGTH, return the set logical pixel amount.Added in version 0.12.12.
- get_value_str()¶
- Returns:
The value of the item this
AppStream.Relationis about, as a string.- Return type:
Added in version 0.12.12.
- get_version()¶
- Returns:
The version of the item this
AppStream.Relationis about.- Return type:
Added in version 0.12.0.
- is_satisfied(system_info, pool)¶
- Parameters:
system_info (
AppStream.SystemInfoorNone) – anAppStream.SystemInfoto use for system information.pool (
AppStream.PoolorNone) – anAppStream.Poolto find component dependencies in.
- Raises:
- Returns:
an
AppStream.RelationCheckResultwith details about the result, orNoneon error.- Return type:
Test if this relation is satisfied on the current system or with the provided
AppStream.Pool. If noAppStream.SystemInfois found, a temporary one will be created. If noAppStream.Poolis provided, any component relationships can not be validated and an error will be thrown.
- set_compare(compare)¶
- Parameters:
compare (
AppStream.RelationCompare) – the newAppStream.RelationCompare
Set the version comparison type of this
AppStream.Relation.Added in version 0.12.0.
- set_display_side_kind(kind)¶
- Parameters:
kind (
AppStream.DisplaySideKind) – the newAppStream.DisplaySideKind.
Sets the display side kind, in case this item is of kind
AppStream.RelationItemKind.DISPLAY_LENGTHAdded in version 0.12.12.
- set_item_kind(kind)¶
- Parameters:
kind (
AppStream.RelationItemKind) – the newAppStream.RelationItemKind
Set the kind of the item this
AppStream.Relationis about.Added in version 0.12.0.
- set_kind(kind)¶
- Parameters:
kind (
AppStream.RelationKind) – the newAppStream.RelationKind
Set the kind of this
AppStream.Relation.Added in version 0.12.0.
- set_value_control_kind(kind)¶
- Parameters:
kind (
AppStream.ControlKind) – anAppStream.ControlKind
Set relation item value from an
AppStream.ControlKind.Added in version 0.12.12.
- set_value_int(value)¶
- Parameters:
value (
int) – the new value.
Sets the item value as an integer, if the given item type of this
AppStream.Relationpermits integer values.Added in version 0.12.12.
- set_value_internet_kind(kind)¶
- Parameters:
kind (
AppStream.InternetKind) – anAppStream.InternetKind
Set relation item value from an
AppStream.InternetKind.Added in version 0.15.5.
- set_value_px(logical_px)¶
- Parameters:
logical_px (
int) – logical pixel count.
Sets the item value as logical pixel count. This requires the relation to be of item kind
AppStream.RelationItemKind.DISPLAY_LENGTH.Added in version 0.12.12.
- set_value_str(value)¶
- Parameters:
value (
str) – the new value.
Sets the item value as a string, if the given item type of this
AppStream.Relationpermits string values.Added in version 0.12.12.
- set_version(version)¶
- Parameters:
version (
str) – the new version.
Sets the item version.
Added in version 0.12.0.
- version_compare(version)¶
- Parameters:
version (
str) – a version number, e.g.1.2.0- Raises:
- Returns:
Trueif the version from the parameter is sufficient.- Return type:
Tests whether the version number of this
AppStream.Relationis fulfilled by version. Whether the given version is sufficient to fulfill the version requirement of thisAppStream.Relationis determined by its comparison resraint.Added in version 0.12.0.