QGIS API Documentation  2.5.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Slots | Signals | Public Member Functions | Protected Slots | Properties | Private Attributes | List of all members
QgsMapLayerComboBox Class Reference

The QgsMapLayerComboBox class is a combo box which displays the list of layers. More...

#include <qgsmaplayercombobox.h>

Collaboration diagram for QgsMapLayerComboBox:
Collaboration graph
[legend]

Public Slots

void setLayer (QgsMapLayer *layer)
 setLayer set the current layer selected in the combo

Signals

void layerChanged (QgsMapLayer *layer)
 layerChanged this signal is emitted whenever the currently selected layer changes

Public Member Functions

 QgsMapLayerComboBox (QWidget *parent=0)
 QgsMapLayerComboBox creates a combo box to dislpay the list of layers (currently in the registry).
void setFilters (QgsMapLayerProxyModel::Filters filters)
 setFilters allows fitering according to layer type and/or geometry type.
QgsMapLayerProxyModel::Filters filters ()
 currently used filter on list layers
QgsMapLayercurrentLayer ()
 currentLayer returns the current layer selected in the combo box

Protected Slots

void indexChanged (int i)

Properties

QgsMapLayerProxyModel::Filters filters

Private Attributes

QgsMapLayerProxyModelmProxyModel

Detailed Description

The QgsMapLayerComboBox class is a combo box which displays the list of layers.

Note
added in 2.3

Definition at line 30 of file qgsmaplayercombobox.h.

Constructor & Destructor Documentation

QgsMapLayerComboBox::QgsMapLayerComboBox ( QWidget *  parent = 0)
explicit

QgsMapLayerComboBox creates a combo box to dislpay the list of layers (currently in the registry).

The layers can be filtered and/or ordered.

Definition at line 20 of file qgsmaplayercombobox.cpp.

References indexChanged(), and mProxyModel.

Member Function Documentation

QgsMapLayer * QgsMapLayerComboBox::currentLayer ( )

currentLayer returns the current layer selected in the combo box

Definition at line 51 of file qgsmaplayercombobox.cpp.

References index, and mProxyModel.

Referenced by indexChanged(), and setLayer().

QgsMapLayerProxyModel::Filters QgsMapLayerComboBox::filters ( )
inline

currently used filter on list layers

Definition at line 47 of file qgsmaplayercombobox.h.

References QgsMapLayerProxyModel::filters().

void QgsMapLayerComboBox::indexChanged ( int  i)
protectedslot

Definition at line 75 of file qgsmaplayercombobox.cpp.

References currentLayer(), and layerChanged().

Referenced by QgsMapLayerComboBox().

void QgsMapLayerComboBox::layerChanged ( QgsMapLayer layer)
signal

layerChanged this signal is emitted whenever the currently selected layer changes

Referenced by indexChanged(), and setLayer().

void QgsMapLayerComboBox::setFilters ( QgsMapLayerProxyModel::Filters  filters)

setFilters allows fitering according to layer type and/or geometry type.

Definition at line 29 of file qgsmaplayercombobox.cpp.

References mProxyModel, and QgsMapLayerProxyModel::setFilters().

void QgsMapLayerComboBox::setLayer ( QgsMapLayer layer)
slot

setLayer set the current layer selected in the combo

Definition at line 34 of file qgsmaplayercombobox.cpp.

References currentLayer(), QgsMapLayerModel::indexFromLayer(), layerChanged(), mProxyModel, and QgsMapLayerProxyModel::sourceLayerModel().

Member Data Documentation

QgsMapLayerProxyModel* QgsMapLayerComboBox::mProxyModel
private

Definition at line 64 of file qgsmaplayercombobox.h.

Referenced by currentLayer(), QgsMapLayerComboBox(), setFilters(), and setLayer().

Property Documentation

QgsMapLayerProxyModel::Filters QgsMapLayerComboBox::filters
readwrite

Definition at line 34 of file qgsmaplayercombobox.h.


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