#include "aTreeWidget.h"
Public Member Functions | |
| aTreeWidgetItem (ID _newId, aTreeWidgetItem *_parent=nullptr, int _type=0) | |
| Constructor. | |
| aTreeWidgetItem (aTreeWidgetBase *_view, ID _newId, aTreeWidgetItem *_parent=nullptr, int _type=0) | |
| Constructor. | |
| virtual | ~aTreeWidgetItem () |
| Deconstructor. | |
| void | AddChild (aTreeWidgetItem *_child) |
| Will add a new child to this item. | |
| void | setParentItem (aTreeWidgetItem *_parent) |
| Will set the provided item as the parent item. | |
| void | setChildsEnabled (bool _enabled) |
| Will set the enabled state for every child of this item. | |
| void | setChildsSelected (bool _selected) |
| Will select/deselect the childs of this item. | |
| void | setChildsVisible (bool _visible) |
| Will set the visible state for every child of this item. | |
| void | ensureTopLevelSelectionVisible () |
| Will expand the most top level item that is selected and is a parent of this item. If this is the top level item, this item will be expanded. | |
| void | expandAllParents (bool _expandThis) |
| Will expand all parent items of this item. | |
| void | collapse (void) |
| Will collapse this item and all of its childs. | |
| void | setEditable (bool _editable=true) |
| void | setLocked (bool _locked=true) |
| void | setVisible (bool _isVisible, bool _expandParents=true) |
| Will unhide this item if hidden. | |
| aTreeWidgetItem * | findChild (ID _id) |
| Will return a pointer to a top level child with the provided id. Returns nullptr if the item does not exist. | |
| aTreeWidgetItem * | findChild (const QString &_text) |
| Will return a pointer to a top level child with the provided text. Returns nullptr if the item does not exist. | |
| ID | getItemID (const QStringList &_itemPath, int _currentIndex) |
| Will return the ID of the specified item. | |
| void | eraseChild (ID _id) |
| Will erase this child from the information storage This function should only be called from the child itself to clear up its data. | |
| bool | hasChilds (void) |
| Will return true if this item has childs. | |
| aTreeWidgetItem * | popFirstChild (void) |
| Will take and remove the first child item of this item. | |
| const std::list< aTreeWidgetItem * > & | childs (void) |
| Will return all next level childs of this item. | |
| const std::list< aTreeWidgetItem * > & | allChilds (void) |
| Will return all childs of this item. | |
| const std::list< ID > & | allChildsIDs (void) |
| Will return the IDs of all childs at this item. | |
| int | childCount (void) const |
| Will return the ammound of childs this item has. | |
| ID | id (void) const |
| Will return the id of the child. | |
| ID | parentId (void) const |
| Will return the id of the parent item Returns -1 if there is no parent item. | |
| void | setStoredText (const QString &_text) |
| Will set the stored text, this value is only used to evaluate the changed event. | |
| QString | storedText (void) const |
| Will return the stored text. | |
| std::list< QString > | getItemPath () |
| Will return all items from root to this item as a vector where the first item is the root item. | |
| QString | getItemPathString (char _delimiter='|') |
| Will return all items from root to this item as a string seperated with the provided delimiter where the first item is the root item. | |
| bool | isVisible (void) const |
| aTreeWidgetItem * | parentItem (void) const |
| void | setSelectChilds (bool flag) |
| bool | getSelectChilds (void) |
Public Member Functions inherited from ak::aObject | |
| aObject (objectType _type=otNone, UID _UID=ak::invalidUID) | |
| Constructor. | |
| aObject (const aObject &_other) | |
| Copy constructor. | |
| aObject & | operator= (const aObject &_other) |
| Assignment operator. | |
| virtual | ~aObject () |
| Deconstructor. | |
| virtual void | removeChildObject (aObject *_child) |
| Will remove the child from this object (not destroy it) This function should be called from the deconstructor of a child. | |
| virtual void | addChildObject (aObject *_child) |
| Will add the child to this object. | |
| void | setUniqueName (const QString &_name) |
| Will set this objects unique name. | |
| virtual void | setParentObject (aObject *_parentObject) |
| Will set the parent object of this object. | |
| QString | uniqueName (void) const |
| Will return the unique name of this object. | |
| aObject * | parentObject (void) const |
| Will return a pointer to the parent object. | |
| int | childObjectCount (void) const |
| Will return the count of sub objects. | |
| aObject * | childObject (UID _childUID) |
| Will return the child with the specified UID. | |
| void | setOwner (aObject *_object) |
| Will set the owner of this object. | |
| aObject * | owner (void) const |
| Will return the owner of this object. | |
| void | setUid (UID _UID) |
| Will set the objects UID. | |
| UID | uid (void) const |
| Returns the objects UID. | |
| objectType | type (void) const |
| Returns the objects type. | |
| virtual bool | isWidgetType (void) const |
| Returns true if the object is an object derived from aWidget. | |
Additional Inherited Members | |
Protected Attributes inherited from ak::aObject | |
| UID | m_uid |
| int | m_references |
| The objects UID. | |
| objectType | m_objectType |
| The objects references. | |
| QString | m_uniqueName |
| The object type of this object. | |
| aObject * | m_parentObject |
| aObject * | m_owner |
| std::map< UID, aObject * > | m_childObjects |
| ak::aTreeWidgetItem::aTreeWidgetItem | ( | ak::ID | _newId, |
| aTreeWidgetItem * | _parent = nullptr, | ||
| int | _type = 0 ) |
Constructor.
| _newId | The ID of this item |
| _type | The type of this item |
| ak::aTreeWidgetItem::aTreeWidgetItem | ( | ak::aTreeWidgetBase * | _view, |
| ak::ID | _newId, | ||
| aTreeWidgetItem * | _parent = nullptr, | ||
| int | _type = 0 ) |
Constructor.
| _view | The view that creates this item |
| _newId | The ID of this item |
| _type | The type of this item |
|
virtual |
Deconstructor.
| void ak::aTreeWidgetItem::AddChild | ( | aTreeWidgetItem * | _child | ) |
Will add a new child to this item.
| _child | The child to add |
| const std::list< ak::aTreeWidgetItem * > & ak::aTreeWidgetItem::allChilds | ( | void | ) |
Will return all childs of this item.
| const std::list< ak::ID > & ak::aTreeWidgetItem::allChildsIDs | ( | void | ) |
Will return the IDs of all childs at this item.
| int ak::aTreeWidgetItem::childCount | ( | void | ) | const |
Will return the ammound of childs this item has.
| const std::list< ak::aTreeWidgetItem * > & ak::aTreeWidgetItem::childs | ( | void | ) |
Will return all next level childs of this item.
| void ak::aTreeWidgetItem::collapse | ( | void | ) |
Will collapse this item and all of its childs.
| void ak::aTreeWidgetItem::ensureTopLevelSelectionVisible | ( | ) |
Will expand the most top level item that is selected and is a parent of this item. If this is the top level item, this item will be expanded.
| void ak::aTreeWidgetItem::eraseChild | ( | ak::ID | _id | ) |
Will erase this child from the information storage This function should only be called from the child itself to clear up its data.
| _id | The ID of the item to erase |
| void ak::aTreeWidgetItem::expandAllParents | ( | bool | _expandThis | ) |
Will expand all parent items of this item.
| _expandThis | If true, this item will be expanded |
| ak::aTreeWidgetItem * ak::aTreeWidgetItem::findChild | ( | const QString & | _text | ) |
Will return a pointer to a top level child with the provided text. Returns nullptr if the item does not exist.
| ak::aTreeWidgetItem * ak::aTreeWidgetItem::findChild | ( | ak::ID | _id | ) |
Will return a pointer to a top level child with the provided id. Returns nullptr if the item does not exist.
| ak::ID ak::aTreeWidgetItem::getItemID | ( | const QStringList & | _itemPath, |
| int | _currentIndex ) |
Will return the ID of the specified item.
| _itemPath | The path of the requested item |
| _delimiter | The delimiter of the item path |
| std::list< QString > ak::aTreeWidgetItem::getItemPath | ( | ) |
Will return all items from root to this item as a vector where the first item is the root item.
| QString ak::aTreeWidgetItem::getItemPathString | ( | char | _delimiter = '|' | ) |
Will return all items from root to this item as a string seperated with the provided delimiter where the first item is the root item.
| _itemId | The ID of the requested item |
| _delimiter | The delimiter between the items |
|
inline |
| bool ak::aTreeWidgetItem::hasChilds | ( | void | ) |
Will return true if this item has childs.
| ak::ID ak::aTreeWidgetItem::id | ( | void | ) | const |
Will return the id of the child.
|
inline |
| ak::ID ak::aTreeWidgetItem::parentId | ( | void | ) | const |
Will return the id of the parent item Returns -1 if there is no parent item.
|
inline |
| ak::aTreeWidgetItem * ak::aTreeWidgetItem::popFirstChild | ( | void | ) |
Will take and remove the first child item of this item.
| void ak::aTreeWidgetItem::setChildsEnabled | ( | bool | _enabled | ) |
Will set the enabled state for every child of this item.
| _enabled | If true all childs of this item will be enabled |
| void ak::aTreeWidgetItem::setChildsSelected | ( | bool | _selected | ) |
Will select/deselect the childs of this item.
| _selected | If true all childs of this item will be selected |
| void ak::aTreeWidgetItem::setChildsVisible | ( | bool | _visible | ) |
Will set the visible state for every child of this item.
| _visible | If true all childs of this item will be visible |
| void ak::aTreeWidgetItem::setEditable | ( | bool | _editable = true | ) |
| void ak::aTreeWidgetItem::setLocked | ( | bool | _locked = true | ) |
| void ak::aTreeWidgetItem::setParentItem | ( | aTreeWidgetItem * | _parent | ) |
Will set the provided item as the parent item.
| _parent | The parent item |
|
inline |
|
inline |
Will set the stored text, this value is only used to evaluate the changed event.
| void ak::aTreeWidgetItem::setVisible | ( | bool | _isVisible, |
| bool | _expandParents = true ) |
Will unhide this item if hidden.
| _expandParents | If true all parent objects will be expanded |
|
inline |
Will return the stored text.