Atk.Relation¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r/w |
The type of the relation |
||
r/w |
An array of the targets for the relation |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
parent |
r |
||
relationship |
r |
||
target |
[ |
r |
Class Details¶
- class Atk.Relation(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
An object used to describe a relation between a object and one or more other objects.
An
Atk.Relationdescribes a relation between an object and one or more other objects. The actual relations that an object has with other objects are defined as anAtk.RelationSet, which is a set of AtkRelations.- classmethod new(targets, relationship)[source]¶
- Parameters:
targets ([
Atk.Object]) – an array of pointers toAtk.Objectsrelationship (
Atk.RelationType) – anAtk.RelationTypewith which to create the newAtk.Relation
- Returns:
a pointer to a new
Atk.Relation- Return type:
Create a new relation for the specified key and the specified list of targets. See also
Atk.Object.add_relationship().
- add_target(target)[source]¶
- Parameters:
target (
Atk.Object) – anAtk.Object
Adds the specified
Atk.Objectto the target for the relation, if it is not already present. See alsoAtk.Object.add_relationship().New in version 1.9.
- remove_target(target)[source]¶
- Parameters:
target (
Atk.Object) – anAtk.Object- Returns:
Trueif the removal is successful.- Return type:
Remove the specified
Atk.Objectfrom the target for the relation.
Property Details¶
- Atk.Relation.props.relation_type¶
- Name:
relation-type- Type:
- Default Value:
- Flags:
The type of the relation
- Atk.Relation.props.target¶
- Name:
target- Type:
- Default Value:
- Flags:
An array of the targets for the relation