An item that contains a te::map::AbstractLayerPtr.
More...
#include <LayerItem.h>
|
Methods related to creation and destruction of the object.
|
std::string | m_type |
| Item type.
|
|
std::unique_ptr< Queue > | m_children |
| Queue of items (children).
|
|
TreeItem * | m_parent |
| Pointer to the parent.
|
|
void | setParent (TreeItem *item) |
| Updates the item parent.
|
|
virtual void | addChild (TreeItem *item) |
| Adds a child to the item. The child is added to the end of the list.
|
|
virtual void | insertChild (TreeItem *item, const size_t &pos) |
| Inserts a child item at the desired position.
|
|
TreeItem * | getChild (const size_t &pos) const |
| Returns the child located at pos.
|
|
TreeItem * | getParent () const |
| Returns the item parent.
|
|
TreeItem * | removeChild (const size_t &pos) |
| Removes the child located at pos from the children list.
|
|
size_t | getChildrenCount (const std::string &type) const |
| Returns the number of children.
|
|
void | getChildren (std::vector< TreeItem * > &items, const std::string &type) const |
| Returns all children of a certain type.
|
|
bool | hasChildren () const |
| Tells us if the item has children or not.
|
|
int | getPosition () |
| Returns the position of item in its parent's list of children.
|
|
std::string | getType () const |
| Returns the type of the item.
|
|
void | removeAllChilds () |
| Removes all children.
|
|
An item that contains a te::map::AbstractLayerPtr.
- Note
- The type of the item is "LAYER".
Definition at line 51 of file LayerItem.h.
◆ LayerItem()
Constructor.
- Parameters
-
layer | The layer of the item. |
◆ ~LayerItem()
te::qt::widgets::LayerItem::~LayerItem |
( |
| ) |
|
◆ addChild()
virtual void te::qt::widgets::TreeItem::addChild |
( |
TreeItem * |
item | ) |
|
|
virtualinherited |
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()
Qt::ItemFlags te::qt::widgets::LayerItem::flags |
( |
| ) |
|
|
virtual |
Returns the flags to be used by the model.
- Returns
- Qt flags. By default itens are enabled, editable and selectable. If you want to change the flags reimplement this method in a subclass.
Reimplemented from te::qt::widgets::TreeItem.
◆ getAsString()
std::string te::qt::widgets::LayerItem::getAsString |
( |
| ) |
const |
|
virtual |
Returns the label of the item to be presented in a Qt view.
- Returns
- The item label, to be presented in a Qt view.
Implements te::qt::widgets::TreeItem.
◆ getChild()
TreeItem * te::qt::widgets::TreeItem::getChild |
( |
const size_t & |
pos | ) |
const |
|
inherited |
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 |
|
inherited |
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 |
|
inherited |
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.
◆ getLayer()
Returns the layer contained in the item.
- Returns
- The layer contained at the item.
◆ getParent()
TreeItem * te::qt::widgets::TreeItem::getParent |
( |
| ) |
const |
|
inherited |
Returns the item parent.
- Returns
- A pointer to the parent.
◆ getPosition()
int te::qt::widgets::TreeItem::getPosition |
( |
| ) |
|
|
inherited |
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()
std::string te::qt::widgets::LayerItem::getToolTip |
( |
| ) |
const |
|
virtual |
◆ getType()
std::string te::qt::widgets::TreeItem::getType |
( |
| ) |
const |
|
inherited |
Returns the type of the item.
- Returns
- Type of the item.
◆ hasChildren()
bool te::qt::widgets::TreeItem::hasChildren |
( |
| ) |
const |
|
inherited |
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 |
|
) |
| |
|
virtualinherited |
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()
VISIBLE te::qt::widgets::LayerItem::isVisible |
( |
| ) |
const |
|
virtual |
Returns the visibilty state of the item.
- Returns
- The state of visibilty of the item.
Reimplemented from te::qt::widgets::TreeItem.
◆ removeAllChilds()
void te::qt::widgets::TreeItem::removeAllChilds |
( |
| ) |
|
|
inherited |
◆ removeChild()
TreeItem * te::qt::widgets::TreeItem::removeChild |
( |
const size_t & |
pos | ) |
|
|
inherited |
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 | ) |
|
|
inherited |
Updates the item parent.
- Parameters
-
◆ setVisible()
void te::qt::widgets::LayerItem::setVisible |
( |
const VISIBLE & |
visible, |
|
|
const bool & |
updateAncestors = false , |
|
|
const bool & |
updateDescendents = false |
|
) |
| |
|
virtual |
Updates the visibilty state of the item.
- Parameters
-
visible | The new visibility state. |
updateAncestors | Updates also ancestors states. |
updateDescendents | Updates also descendents states. |
Reimplemented from te::qt::widgets::TreeItem.
◆ updateChart()
void te::qt::widgets::LayerItem::updateChart |
( |
| ) |
|
◆ updateLegend()
int te::qt::widgets::LayerItem::updateLegend |
( |
| ) |
|
updateLegend
- Returns
- The position of the StyleItem as child of the Layer.
◆ m_children
std::unique_ptr<Queue> te::qt::widgets::TreeItem::m_children |
|
protectedinherited |
Queue of items (children).
Definition at line 237 of file TreeItem.h.
◆ m_layer
◆ m_parent
TreeItem* te::qt::widgets::TreeItem::m_parent |
|
protectedinherited |
Pointer to the parent.
Definition at line 238 of file TreeItem.h.
◆ m_type
std::string te::qt::widgets::TreeItem::m_type |
|
protectedinherited |
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/LayerItem.h