Defines a hierarchical structure.
More...
#include <TreeItem.h>
Defines a hierarchical structure.
Definition at line 72 of file TreeItem.h.
◆ TreeItem()
te::qt::widgets::TreeItem::TreeItem |
( |
const std::string & |
type | ) |
|
Constructor.
- Parameters
-
type | The type of the item. |
◆ ~TreeItem()
virtual te::qt::widgets::TreeItem::~TreeItem |
( |
| ) |
|
|
virtual |
◆ addChild()
virtual void te::qt::widgets::TreeItem::addChild |
( |
TreeItem * |
item | ) |
|
|
virtual |
Adds a child to the item. The child is added to the end of the list.
- Parameters
-
item | The child to be inserted. |
Reimplemented in te::qt::widgets::FolderItem.
◆ flags()
virtual Qt::ItemFlags te::qt::widgets::TreeItem::flags |
( |
| ) |
|
|
virtual |
◆ getAsString()
virtual std::string te::qt::widgets::TreeItem::getAsString |
( |
| ) |
const |
|
pure virtual |
◆ getChild()
TreeItem * te::qt::widgets::TreeItem::getChild |
( |
const size_t & |
pos | ) |
const |
Returns the child located at pos.
- Parameters
-
pos | The position of the desired child at the children list. |
- Returns
- The child item located at pos.
- Exceptions
-
◆ getChildren()
void te::qt::widgets::TreeItem::getChildren |
( |
std::vector< TreeItem * > & |
items, |
|
|
const std::string & |
type |
|
) |
| const |
Returns all children of a certain type.
- Parameters
-
[out] | items | The set of items founded. |
| type | The type of items that we are searching for. |
◆ getChildrenCount()
size_t te::qt::widgets::TreeItem::getChildrenCount |
( |
const std::string & |
type | ) |
const |
Returns the number of children.
The type, defines the type of children we want to considere in the operation. If an empty string is given as argument, all kinds of children will be considered.
- Parameters
-
type | The type of children we want to calculate the number. |
- Returns
- Number of children of type type.
◆ getParent()
TreeItem * te::qt::widgets::TreeItem::getParent |
( |
| ) |
const |
Returns the item parent.
- Returns
- A pointer to the parent.
◆ getPosition()
int te::qt::widgets::TreeItem::getPosition |
( |
| ) |
|
Returns the position of item in its parent's list of children.
- Returns
- The position of item in its parent's list of children.
◆ getToolTip()
virtual std::string te::qt::widgets::TreeItem::getToolTip |
( |
| ) |
const |
|
virtual |
◆ getType()
std::string te::qt::widgets::TreeItem::getType |
( |
| ) |
const |
Returns the type of the item.
- Returns
- Type of the item.
◆ hasChildren()
bool te::qt::widgets::TreeItem::hasChildren |
( |
| ) |
const |
Tells us if the item has children or not.
- Returns
- True if children list is not empty and false otherwise.
◆ insertChild()
virtual void te::qt::widgets::TreeItem::insertChild |
( |
TreeItem * |
item, |
|
|
const size_t & |
pos |
|
) |
| |
|
virtual |
Inserts a child item at the desired position.
- Parameters
-
item | The child to be inserted. |
pos | The position of the child in the children list. |
- Exceptions
-
Reimplemented in te::qt::widgets::FolderItem.
◆ isVisible()
virtual VISIBLE te::qt::widgets::TreeItem::isVisible |
( |
| ) |
const |
|
virtual |
◆ removeAllChilds()
void te::qt::widgets::TreeItem::removeAllChilds |
( |
| ) |
|
◆ removeChild()
TreeItem * te::qt::widgets::TreeItem::removeChild |
( |
const size_t & |
pos | ) |
|
Removes the child located at pos from the children list.
- Parameters
-
pos | The position of the desired child at the children list. |
- Returns
- The removed item.
- Exceptions
-
◆ setParent()
void te::qt::widgets::TreeItem::setParent |
( |
TreeItem * |
item | ) |
|
Updates the item parent.
- Parameters
-
◆ setVisible()
virtual void te::qt::widgets::TreeItem::setVisible |
( |
const VISIBLE & |
visible, |
|
|
const bool & |
updateAncestors = false , |
|
|
const bool & |
updateDescendents = false |
|
) |
| |
|
virtual |
◆ m_children
std::unique_ptr<Queue> te::qt::widgets::TreeItem::m_children |
|
protected |
Queue of items (children).
Definition at line 237 of file TreeItem.h.
◆ m_parent
TreeItem* te::qt::widgets::TreeItem::m_parent |
|
protected |
Pointer to the parent.
Definition at line 238 of file TreeItem.h.
◆ m_type
std::string te::qt::widgets::TreeItem::m_type |
|
protected |
The documentation for this class was generated from the following file:
- /home/castejon/castejon_files/develop/terralib5/git_release/src/terralib/qt/widgets/layer/explorer/TreeItem.h