A tree view for the layers of an application. More...
#include <LayerTreeView.h>
  
 Classes | |
| class | Impl | 
| LayerTreeView implementation.  More... | |
Public Types | |
| enum | ContextMenuSelectionType { NO_ITEM_SELECTED, UNIQUE_ITEM_SELECTED, MULTIPLE_ITEMS_SELECTED } | 
Public Slots | |
| void | onSelectedLayersChanged (const QItemSelection &selected, const QItemSelection &deselected) | 
Signals | |
| void | activated (te::qt::widgets::AbstractTreeItem *item) | 
| void | clicked (te::qt::widgets::AbstractTreeItem *item) | 
| void | doubleClicked (te::qt::widgets::AbstractTreeItem *item) | 
| void | entered (te::qt::widgets::AbstractTreeItem *item) | 
| void | pressed (te::qt::widgets::AbstractTreeItem *item) | 
| void | selectedLayersChanged (const std::list< te::map::AbstractLayerPtr > &selectedLayers) | 
| void | visibilityChanged (const te::map::AbstractLayerPtr &layer) | 
Public Member Functions | |
| void | add (QAction *action, const std::string &menu="", const std::string &itemType="", ContextMenuSelectionType menuSelectionType=te::qt::widgets::LayerTreeView::UNIQUE_ITEM_SELECTED) | 
| It adds the action to a specified menu of a given item type when a context menu is displayed.  More... | |
| std::list < te::map::AbstractLayerPtr >  | getSelectedAndVisibleSingleLayers () const | 
| It gets the single layers that are selected and visible in the tree view.  More... | |
| std::list< AbstractTreeItem * > | getSelectedItems () const | 
| It gets the items that are selected in the tree view.  More... | |
| std::list< AbstractTreeItem * > | getSelectedLayerItems () const | 
| It gets the single and folder layer items that are selected in the tree view.  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 in the view.  More... | |
| LayerTreeView (QWidget *parent=0) | |
| Constructor.  More... | |
| void | remove (QAction *action) | 
| It removes the action from the list of context menu.  More... | |
| ~LayerTreeView () | |
| Destructor.  More... | |
Protected Slots | |
| void | onItemActivated (const QModelIndex &index) | 
| void | onItemClicked (const QModelIndex &index) | 
| void | onItemDoubleClicked (const QModelIndex &index) | 
| void | onItemEntered (const QModelIndex &index) | 
| void | onItemPressed (const QModelIndex &index) | 
Protected Member Functions | |
| void | contextMenuEvent (QContextMenuEvent *e) | 
| void | dragEnterEvent (QDragEnterEvent *e) | 
| void | dragLeaveEvent (QDragLeaveEvent *e) | 
| void | dragMoveEvent (QDragMoveEvent *e) | 
| void | dropEvent (QDropEvent *e) | 
Private Attributes | |
| Impl * | m_pImpl | 
| The tree view implementation.  More... | |
A tree view for the layers of an application.
Definition at line 63 of file LayerTreeView.h.
| Enumerator | |
|---|---|
| NO_ITEM_SELECTED | |
| UNIQUE_ITEM_SELECTED | |
| MULTIPLE_ITEMS_SELECTED | |
Definition at line 69 of file LayerTreeView.h.
| te::qt::widgets::LayerTreeView::LayerTreeView | ( | QWidget * | parent = 0 | ) | 
Constructor.
Definition at line 248 of file LayerTreeView.cpp.
References activated(), clicked(), doubleClicked(), entered(), m_pImpl, onItemActivated(), onItemClicked(), onItemDoubleClicked(), onItemEntered(), onItemPressed(), and pressed().
| te::qt::widgets::LayerTreeView::~LayerTreeView | ( | ) | 
Destructor.
Definition at line 272 of file LayerTreeView.cpp.
      
  | 
  signal | 
Referenced by LayerTreeView().
| void te::qt::widgets::LayerTreeView::add | ( | QAction * | action, | 
| const std::string & | menu = "",  | 
        ||
| const std::string & | itemType = "",  | 
        ||
| ContextMenuSelectionType | menuSelectionType = te::qt::widgets::LayerTreeView::UNIQUE_ITEM_SELECTED  | 
        ||
| ) | 
It adds the action to a specified menu of a given item 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 388 of file LayerTreeView.cpp.
Referenced by te::qt::af::BaseApplication::makeDialog().
      
  | 
  signal | 
Referenced by LayerTreeView().
      
  | 
  protected | 
Definition at line 536 of file LayerTreeView.cpp.
      
  | 
  signal | 
Referenced by LayerTreeView().
      
  | 
  protected | 
Definition at line 484 of file LayerTreeView.cpp.
      
  | 
  protected | 
Definition at line 505 of file LayerTreeView.cpp.
      
  | 
  protected | 
Definition at line 493 of file LayerTreeView.cpp.
      
  | 
  protected | 
Definition at line 514 of file LayerTreeView.cpp.
      
  | 
  signal | 
Referenced by LayerTreeView().
| std::list< te::map::AbstractLayerPtr > te::qt::widgets::LayerTreeView::getSelectedAndVisibleSingleLayers | ( | ) | const | 
It gets the single layers that are selected and visible in the tree view.
Definition at line 352 of file LayerTreeView.cpp.
References te::map::VISIBLE.
| std::list< te::qt::widgets::AbstractTreeItem * > te::qt::widgets::LayerTreeView::getSelectedItems | ( | ) | const | 
It gets the items that are selected in the tree view.
Definition at line 277 of file LayerTreeView.cpp.
Referenced by te::qt::widgets::LayerTreeView::Impl::showContextMenu().
| std::list< te::qt::widgets::AbstractTreeItem * > te::qt::widgets::LayerTreeView::getSelectedLayerItems | ( | ) | const | 
It gets the single and folder layer items that are selected in the tree view.
Definition at line 296 of file LayerTreeView.cpp.
References te::qt::widgets::AbstractTreeItem::getLayer().
| std::list< te::qt::widgets::AbstractTreeItem * > te::qt::widgets::LayerTreeView::getSelectedSingleLayerItems | ( | ) | const | 
It gets the single layer items that are selected in the tree view.
Definition at line 314 of file LayerTreeView.cpp.
References te::qt::widgets::AbstractTreeItem::getItemType(), and te::qt::widgets::AbstractTreeItem::getLayer().
| std::list< te::map::AbstractLayerPtr > te::qt::widgets::LayerTreeView::getSelectedSingleLayers | ( | ) | const | 
It gets the single layers that are selected in the view.
Definition at line 332 of file LayerTreeView.cpp.
References te::qt::widgets::AbstractTreeItem::getLayer().
      
  | 
  protectedslot | 
Definition at line 401 of file LayerTreeView.cpp.
Referenced by LayerTreeView().
      
  | 
  protectedslot | 
Definition at line 408 of file LayerTreeView.cpp.
References te::qt::widgets::AbstractTreeItem::getAncestors(), te::qt::widgets::AbstractTreeItem::getDescendants(), te::qt::widgets::AbstractTreeItem::getLayer(), and te::qt::widgets::LayerTreeModel::isCheckable().
Referenced by LayerTreeView().
      
  | 
  protectedslot | 
Definition at line 458 of file LayerTreeView.cpp.
Referenced by LayerTreeView().
      
  | 
  protectedslot | 
Definition at line 465 of file LayerTreeView.cpp.
Referenced by LayerTreeView().
      
  | 
  protectedslot | 
Definition at line 472 of file LayerTreeView.cpp.
References te::qt::widgets::AbstractTreeItem::getLayer(), and te::map::AbstractLayer::setVisibilityAsChanged().
Referenced by LayerTreeView().
      
  | 
  slot | 
Definition at line 369 of file LayerTreeView.cpp.
      
  | 
  signal | 
Referenced by LayerTreeView().
| void te::qt::widgets::LayerTreeView::remove | ( | QAction * | action | ) | 
It removes the action from the list of context menu.
| action | The action to be removed from the context menu. | 
Definition at line 396 of file LayerTreeView.cpp.
      
  | 
  signal | 
      
  | 
  signal | 
      
  | 
  private | 
The tree view implementation.
Definition at line 187 of file LayerTreeView.h.
Referenced by LayerTreeView().