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.Relation
describes 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.Objects
relationship (
Atk.RelationType
) – anAtk.RelationType
with 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.Object
to 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:
True
if the removal is successful.- Return type:
Remove the specified
Atk.Object
from 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