project_item
¶
ProjectItem class.
authors: |
|
---|---|
date: | 4.10.2018 |
Module Contents¶
-
class
project_item.
ProjectItem
(name, description, is_root=False, is_category=False)[source]¶ Bases:
metaobject.MetaObject
Base class for all project items. Create root and category items by instantiating objects from this class.
-
name
¶ Object name
Type: str
-
description
¶ Object description
Type: str
-
is_root
¶ True if new item should be a root item
Type: bool
-
is_category
¶ True if new item should be a category item
Type: bool
-
child
(self, row)[source]¶ Returns child ProjectItem on given row.
Parameters: row (int) – Row of child to return Returns: ProjectItem on given row or None if it does not exist
-
add_child
(self, child_item)[source]¶ Append child project item as the last item in the children list. Set parent of this items parent as this item. This method is called by ProjectItemModel when new items are added.
Parameters: child_item (ProjectItem) – Project item to add Returns: True if operation succeeded, False otherwise
-