All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
te::qt::widgets::LayerExplorer Class Reference

A widget designed to explore the layers of an application. More...

#include <LayerExplorer.h>

Inheritance diagram for te::qt::widgets::LayerExplorer:

Public Slots

void collapse (te::qt::widgets::AbstractTreeItem *item)
 It collapses the specified model item. More...
 
void expand (te::qt::widgets::AbstractTreeItem *item)
 It expands the specified model item. More...
 
void onItemDoubleClicked (te::qt::widgets::AbstractTreeItem *item)
 It sends out a signal indicating that the given item was double clicked. More...
 
void onLayerOrderChanged ()
 It sends out a signal indicating that there was a drag and operation on the tree view. More...
 
void onSelectedLayersChanged (const std::list< te::map::AbstractLayerPtr > &selectedLayers)
 It sends out a signal indicating that there were changes in the selection of layers in the tree view. More...
 
void onVisibilityChanged (const te::map::AbstractLayerPtr &layer)
 It sends out a signal indicating that the visibility of the given single layer was changed in the tree view. More...
 

Signals

void doubleClicked (te::qt::widgets::AbstractTreeItem *item)
 
void layerOrderChanged ()
 
void selectedLayersChanged (const std::list< te::map::AbstractLayerPtr > &selectedLayers)
 
void visibilityChanged (const te::map::AbstractLayerPtr &layer)
 

Public Member Functions

void add (const te::map::AbstractLayerPtr &layer, AbstractTreeItem *parentItem=0)
 It adds a item layer to the list of item layers of the parent layer item. If the parent layer is not specified, the item layer is added as a top layer item. More...
 
void add (QAction *action, const std::string &menu="", const std::string &itemType="", te::qt::widgets::LayerTreeView::ContextMenuSelectionType menuSelectionType=te::qt::widgets::LayerTreeView::UNIQUE_ITEM_SELECTED)
 It calls the action to a specified menu of a given layer type when a context menu is displayed. More...
 
te::qt::widgets::AbstractTreeItemgetLayerItem (const te::map::AbstractLayerPtr &layer)
 It gets the layer item that is associated to the given layer. More...
 
te::qt::widgets::LayerTreeView::ContextMenuSelectionType getMenuSelectionType (int menuSelectionType) const
 It gets the context menu selection type associated to the menu selection type. More...
 
std::list
< te::map::AbstractLayerPtr
getSelectedAndVisibleSingleLayers () const
 It gets the single layers that are selected and visible. More...
 
std::list< AbstractTreeItem * > getSelectedItems () const
 It gets all the selected items in the layer explorer. More...
 
std::list< AbstractTreeItem * > getSelectedLayerItems () const
 It gets all the selected layers(single and folders) in the layer explorer. More...
 
std::list< AbstractTreeItem * > getSelectedSingleLayerItems () const
 It gets the single layer items that are selected in the tree view. More...
 
std::list
< te::map::AbstractLayerPtr
getSelectedSingleLayers () const
 It gets the single layers that are selected. More...
 
std::list
< te::map::AbstractLayerPtr
getTopLayers () const
 It gets the top level layers in the tree model associated to the layer explorer. More...
 
LayerTreeModelgetTreeModel () const
 
LayerTreeViewgetTreeView () const
 
 LayerExplorer (QWidget *parent=0, Qt::WindowFlags flags=0)
 
bool remove (AbstractTreeItem *item)
 It removes the given item from the layer explorer. More...
 
void set (const std::list< te::map::AbstractLayerPtr > &layers)
 
 ~LayerExplorer ()
 

Private Attributes

LayerTreeModelm_treeModel
 the tree model for the layers More...
 
LayerTreeViewm_treeView
 The tree view for the layers. More...
 

Detailed Description

A widget designed to explore the layers of an application.

See also
LayerTreeView, LayerTreeModel

Definition at line 59 of file LayerExplorer.h.

Constructor & Destructor Documentation

te::qt::widgets::LayerExplorer::~LayerExplorer ( )

Definition at line 67 of file LayerExplorer.cpp.

Member Function Documentation

void te::qt::widgets::LayerExplorer::add ( const te::map::AbstractLayerPtr layer,
AbstractTreeItem parentItem = 0 
)

It adds a item layer to the list of item layers of the parent layer item. If the parent layer is not specified, the item layer is added as a top layer item.

Parameters
layerThe layer that will be associated to the item layer to be added.
parentItemThe parent item where the layer item will be added.

Definition at line 128 of file LayerExplorer.cpp.

void te::qt::widgets::LayerExplorer::add ( QAction *  action,
const std::string &  menu = "",
const std::string &  itemType = "",
te::qt::widgets::LayerTreeView::ContextMenuSelectionType  menuSelectionType = te::qt::widgets::LayerTreeView::UNIQUE_ITEM_SELECTED 
)

It calls the action to a specified menu of a given layer type when a context menu is displayed.

Parameters
actionThe action to be associated to the context menu.
menuThe name of a submenu, using a dot separator notation. If omitted, the action will be set on a top menu item.
itemTypeIf omitted the action will be set to all item types.
menuSelectionTypeThe selection type of the context menu.
Note
The LayerTreeView will not take the ownership of the action.

Definition at line 143 of file LayerExplorer.cpp.

void te::qt::widgets::LayerExplorer::collapse ( te::qt::widgets::AbstractTreeItem item)
slot

It collapses the specified model item.

Parameters
itemThe model item to be collapsed.

Definition at line 178 of file LayerExplorer.cpp.

void te::qt::widgets::LayerExplorer::doubleClicked ( te::qt::widgets::AbstractTreeItem item)
signal

Referenced by LayerExplorer().

void te::qt::widgets::LayerExplorer::expand ( te::qt::widgets::AbstractTreeItem item)
slot

It expands the specified model item.

Parameters
itemThe model item to be expanded.

Definition at line 171 of file LayerExplorer.cpp.

te::qt::widgets::AbstractTreeItem * te::qt::widgets::LayerExplorer::getLayerItem ( const te::map::AbstractLayerPtr layer)

It gets the layer item that is associated to the given layer.

Parameters
layerThe layer whose the corresponding layer item will be returned.
Returns
The layer item associated to the layer.

Definition at line 123 of file LayerExplorer.cpp.

te::qt::widgets::LayerTreeView::ContextMenuSelectionType te::qt::widgets::LayerExplorer::getMenuSelectionType ( int  menuSelectionType) const

It gets the context menu selection type associated to the menu selection type.

Parameters
menuSelectionTypeThe menu selection type.
Returns
The context menu selection type.

Definition at line 138 of file LayerExplorer.cpp.

std::list< te::map::AbstractLayerPtr > te::qt::widgets::LayerExplorer::getSelectedAndVisibleSingleLayers ( ) const

It gets the single layers that are selected and visible.

Returns
The list of single layers that are selected and visible.

Definition at line 118 of file LayerExplorer.cpp.

std::list< te::qt::widgets::AbstractTreeItem * > te::qt::widgets::LayerExplorer::getSelectedItems ( ) const

It gets all the selected items in the layer explorer.

Returns
The list of selected items in the layer explorer.

Definition at line 98 of file LayerExplorer.cpp.

std::list< te::qt::widgets::AbstractTreeItem * > te::qt::widgets::LayerExplorer::getSelectedLayerItems ( ) const

It gets all the selected layers(single and folders) in the layer explorer.

Returns
The list of all the selected layers(single and folders) in the layer explorer.

Definition at line 103 of file LayerExplorer.cpp.

std::list< te::qt::widgets::AbstractTreeItem * > te::qt::widgets::LayerExplorer::getSelectedSingleLayerItems ( ) const

It gets the single layer items that are selected in the tree view.

Returns
The list of single layer items that are selected in the tree view.

Definition at line 108 of file LayerExplorer.cpp.

std::list< te::map::AbstractLayerPtr > te::qt::widgets::LayerExplorer::getSelectedSingleLayers ( ) const

It gets the single layers that are selected.

Returns
The list of single layers that are selected.

Definition at line 113 of file LayerExplorer.cpp.

std::list< te::map::AbstractLayerPtr > te::qt::widgets::LayerExplorer::getTopLayers ( ) const

It gets the top level layers in the tree model associated to the layer explorer.

Returns
The list of the top level layers in the tree model associated to the layer explorer.

Definition at line 86 of file LayerExplorer.cpp.

te::qt::widgets::LayerTreeModel * te::qt::widgets::LayerExplorer::getTreeModel ( ) const

Definition at line 76 of file LayerExplorer.cpp.

te::qt::widgets::LayerTreeView * te::qt::widgets::LayerExplorer::getTreeView ( ) const

Definition at line 71 of file LayerExplorer.cpp.

Referenced by te::qt::af::BaseApplication::makeDialog().

void te::qt::widgets::LayerExplorer::layerOrderChanged ( )
signal

Referenced by LayerExplorer().

void te::qt::widgets::LayerExplorer::onItemDoubleClicked ( te::qt::widgets::AbstractTreeItem item)
slot

It sends out a signal indicating that the given item was double clicked.

Parameters
itemThe tree item that was double clicked.

Definition at line 166 of file LayerExplorer.cpp.

Referenced by LayerExplorer().

void te::qt::widgets::LayerExplorer::onLayerOrderChanged ( )
slot

It sends out a signal indicating that there was a drag and operation on the tree view.

Definition at line 161 of file LayerExplorer.cpp.

Referenced by LayerExplorer().

void te::qt::widgets::LayerExplorer::onSelectedLayersChanged ( const std::list< te::map::AbstractLayerPtr > &  selectedLayers)
slot

It sends out a signal indicating that there were changes in the selection of layers in the tree view.

Parameters
selectedLayersThe new list of selected layers.

Definition at line 151 of file LayerExplorer.cpp.

Referenced by LayerExplorer().

void te::qt::widgets::LayerExplorer::onVisibilityChanged ( const te::map::AbstractLayerPtr layer)
slot

It sends out a signal indicating that the visibility of the given single layer was changed in the tree view.

Definition at line 156 of file LayerExplorer.cpp.

Referenced by LayerExplorer().

bool te::qt::widgets::LayerExplorer::remove ( AbstractTreeItem item)

It removes the given item from the layer explorer.

Parameters
itemThe item to be removed from the layer explorer.
Returns
True, if the item was successfully removed; otherwise, it returns false.

Definition at line 133 of file LayerExplorer.cpp.

void te::qt::widgets::LayerExplorer::selectedLayersChanged ( const std::list< te::map::AbstractLayerPtr > &  selectedLayers)
signal

Referenced by LayerExplorer().

void te::qt::widgets::LayerExplorer::set ( const std::list< te::map::AbstractLayerPtr > &  layers)

Definition at line 81 of file LayerExplorer.cpp.

void te::qt::widgets::LayerExplorer::visibilityChanged ( const te::map::AbstractLayerPtr layer)
signal

Referenced by LayerExplorer().

Member Data Documentation

LayerTreeModel* te::qt::widgets::LayerExplorer::m_treeModel
private

the tree model for the layers

Definition at line 221 of file LayerExplorer.h.

Referenced by LayerExplorer().

LayerTreeView* te::qt::widgets::LayerExplorer::m_treeView
private

The tree view for the layers.

Definition at line 220 of file LayerExplorer.h.

Referenced by LayerExplorer().


The documentation for this class was generated from the following files: