An item that contains a te::map::AbstractLayerPtr. More...
#include <LayerItem.h>
Public Member Functions | |
void | addChild (TreeItem *item) |
Adds a child to the item. The child is added to the end of the list. More... | |
TreeItem * | getChild (const size_t &pos) const throw (te::common::Exception) |
Returns the child located at pos. More... | |
void | getChildren (std::vector< TreeItem * > &items, const std::string &type) const |
Returns all children of a certain type. More... | |
size_t | getChildrenCount (const std::string &type) const |
Returns the number of children. More... | |
te::map::AbstractLayerPtr | getLayer () const |
Returns the layer contained in the item. More... | |
TreeItem * | getParent () const |
Returns the item parent. More... | |
int | getPosition () |
Returns the position of item in its parent's list of children. More... | |
std::string | getToolTip () const |
Returns the item tooltip (for information purposes). More... | |
std::string | getType () const |
Returns the type of the item. More... | |
bool | hasChildren () const |
Tells us if the item has children or not. More... | |
void | insertChild (TreeItem *item, const size_t &pos) throw (te::common::Exception) |
Inserts a child item at the desired position. More... | |
void | removeAllChilds () |
Removes all children. More... | |
TreeItem * | removeChild (const size_t &pos) throw (te::common::Exception) |
Removes the child located at pos from the children list. More... | |
void | setParent (TreeItem *item) |
Updates the item parent. More... | |
void | updateChart () |
Updates the chart item. More... | |
int | updateGrouping () |
Updates the grouping item. More... | |
void | updateLegend () |
updateLegend More... | |
Instantiation Methods | |
Methods related to creation and destruction of the object. | |
LayerItem (te::map::AbstractLayerPtr layer) | |
Constructor. More... | |
~LayerItem () | |
Destructor. More... | |
Reimplementation of TreeItem | |
Methods reimplemented of the TreeItem class. | |
std::string | getAsString () const |
Returns the label of the item to be presented in a Qt view. More... | |
VISIBLE | isVisible () const |
Returns the visibilty state of the item. More... | |
void | setVisible (const VISIBLE &visible, const bool &updateAncestors=false, const bool &updateDescendents=false) |
Updates the visibilty state of the item. More... | |
Qt::ItemFlags | flags () |
Returns the flags to be used by the model. More... | |
Protected Attributes | |
std::auto_ptr< Queue > | m_children |
Queue of items (children). More... | |
te::map::AbstractLayerPtr | m_layer |
The asbtract layer. More... | |
TreeItem * | m_parent |
Pointer to the parent. More... | |
std::string | m_type |
Item type. More... | |
An item that contains a te::map::AbstractLayerPtr.
Definition at line 51 of file LayerItem.h.
te::qt::widgets::LayerItem::LayerItem | ( | te::map::AbstractLayerPtr | layer | ) |
Constructor.
layer | The layer of the item. |
te::qt::widgets::LayerItem::~LayerItem | ( | ) |
Destructor.
|
inherited |
Adds a child to the item. The child is added to the end of the list.
item | The child to be inserted. |
|
virtual |
Returns the flags to be used by the model.
Reimplemented from te::qt::widgets::TreeItem.
|
virtual |
Returns the label of the item to be presented in a Qt view.
Implements te::qt::widgets::TreeItem.
|
inherited |
Returns the child located at pos.
pos | The position of the desired child at the children list. |
If | pos is greater or equal than the children list size, a te::common::Exception will be raised. |
|
inherited |
Returns all children of a certain type.
[out] | items | The set of items founded. |
type | The type of items that we are searching for. |
|
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.
type | The type of children we want to calculate the number. |
te::map::AbstractLayerPtr te::qt::widgets::LayerItem::getLayer | ( | ) | const |
Returns the layer contained in the item.
|
inherited |
Returns the item parent.
|
inherited |
Returns the position of item in its parent's list of children.
|
virtual |
Returns the item tooltip (for information purposes).
Reimplemented from te::qt::widgets::TreeItem.
|
inherited |
Returns the type of the item.
|
inherited |
Tells us if the item has children or not.
|
inherited |
Inserts a child item at the desired position.
item | The child to be inserted. |
pos | The position of the child in the children list. |
If | pos is greater than the children list size, a te::common::Exception will be raised. |
|
virtual |
Returns the visibilty state of the item.
Reimplemented from te::qt::widgets::TreeItem.
|
inherited |
Removes all children.
|
inherited |
Removes the child located at pos from the children list.
pos | The position of the desired child at the children list. |
If | pos is greater or equal than the children list size, a te::common::Exception will be raised. |
|
inherited |
Updates the item parent.
item | The new parent. |
|
virtual |
Updates the visibilty state of the item.
visible | The new visibility state. |
updateAncestors | Updates also ancestors states. |
updateDescendents | Updates also descendents states. |
Reimplemented from te::qt::widgets::TreeItem.
void te::qt::widgets::LayerItem::updateChart | ( | ) |
Updates the chart item.
int te::qt::widgets::LayerItem::updateGrouping | ( | ) |
Updates the grouping item.
void te::qt::widgets::LayerItem::updateLegend | ( | ) |
updateLegend
|
protectedinherited |
Queue of items (children).
Definition at line 237 of file TreeItem.h.
|
protected |
The asbtract layer.
Definition at line 120 of file LayerItem.h.
|
protectedinherited |
Pointer to the parent.
Definition at line 238 of file TreeItem.h.
|
protectedinherited |
Item type.
Definition at line 236 of file TreeItem.h.