A widget designed to explore the layers of an application. More...
#include <LayerExplorer.h>
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::AbstractTreeItem * | getLayerItem (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... | |
LayerTreeModel * | getTreeModel () const |
LayerTreeView * | getTreeView () 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 | |
LayerTreeModel * | m_treeModel |
the tree model for the layers More... | |
LayerTreeView * | m_treeView |
The tree view for the layers. More... | |
A widget designed to explore the layers of an application.
Definition at line 59 of file LayerExplorer.h.
te::qt::widgets::LayerExplorer::LayerExplorer | ( | QWidget * | parent = 0 , |
Qt::WindowFlags | flags = 0 |
||
) |
Definition at line 36 of file LayerExplorer.cpp.
References doubleClicked(), layerOrderChanged(), m_treeModel, m_treeView, onItemDoubleClicked(), onLayerOrderChanged(), onSelectedLayersChanged(), onVisibilityChanged(), selectedLayersChanged(), te::qt::widgets::LayerTreeModel::setCheckable(), TE_QTWIDGETS_DEFAULT_TREEVIEW_IDENTATION, and visibilityChanged().
te::qt::widgets::LayerExplorer::~LayerExplorer | ( | ) |
Definition at line 67 of file LayerExplorer.cpp.
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.
layer | The layer that will be associated to the item layer to be added. |
parentItem | The 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.
action | The action to be associated to the context menu. |
menu | The name of a submenu, using a dot separator notation. If omitted, the action will be set on a top menu item. |
itemType | If omitted the action will be set to all item types. |
menuSelectionType | The selection type of the context menu. |
Definition at line 143 of file LayerExplorer.cpp.
|
slot |
It collapses the specified model item.
item | The model item to be collapsed. |
Definition at line 178 of file LayerExplorer.cpp.
|
signal |
Referenced by LayerExplorer().
|
slot |
It expands the specified model item.
item | The 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.
layer | The layer whose the corresponding layer item will be returned. |
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.
menuSelectionType | The 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.
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.
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.
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.
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.
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.
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().
|
signal |
Referenced by LayerExplorer().
|
slot |
It sends out a signal indicating that the given item was double clicked.
item | The tree item that was double clicked. |
Definition at line 166 of file LayerExplorer.cpp.
Referenced by LayerExplorer().
|
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().
|
slot |
It sends out a signal indicating that there were changes in the selection of layers in the tree view.
selectedLayers | The new list of selected layers. |
Definition at line 151 of file LayerExplorer.cpp.
Referenced by LayerExplorer().
|
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.
item | The item to be removed from the layer explorer. |
Definition at line 133 of file LayerExplorer.cpp.
|
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.
|
signal |
Referenced by LayerExplorer().
|
private |
the tree model for the layers
Definition at line 221 of file LayerExplorer.h.
Referenced by LayerExplorer().
|
private |
The tree view for the layers.
Definition at line 220 of file LayerExplorer.h.
Referenced by LayerExplorer().