The QgsMapLayerComboBox class is a combo box which displays the list of layers.
More...
#include <qgsmaplayercombobox.h>
The QgsMapLayerComboBox class is a combo box which displays the list of layers.
- Since
- QGIS 2.3
Definition at line 34 of file qgsmaplayercombobox.h.
◆ QgsMapLayerComboBox()
QgsMapLayerComboBox::QgsMapLayerComboBox |
( |
QWidget * |
parent = nullptr | ) |
|
|
explicit |
◆ additionalItems()
QStringList QgsMapLayerComboBox::additionalItems |
( |
| ) |
const |
◆ allowEmptyLayer()
bool QgsMapLayerComboBox::allowEmptyLayer |
( |
| ) |
const |
◆ currentLayer()
QgsMapLayer * QgsMapLayerComboBox::currentLayer |
( |
| ) |
const |
◆ dragEnterEvent()
void QgsMapLayerComboBox::dragEnterEvent |
( |
QDragEnterEvent * |
event | ) |
|
|
overrideprotected |
◆ dragLeaveEvent()
void QgsMapLayerComboBox::dragLeaveEvent |
( |
QDragLeaveEvent * |
event | ) |
|
|
overrideprotected |
◆ dropEvent()
void QgsMapLayerComboBox::dropEvent |
( |
QDropEvent * |
event | ) |
|
|
overrideprotected |
◆ exceptedLayerList()
QList<QgsMapLayer *> QgsMapLayerComboBox::exceptedLayerList |
( |
| ) |
const |
|
inline |
◆ excludedProviders()
QStringList QgsMapLayerComboBox::excludedProviders |
( |
| ) |
const |
◆ filters()
QgsMapLayerProxyModel::Filters QgsMapLayerComboBox::filters |
( |
| ) |
const |
|
inline |
◆ indexChanged
void QgsMapLayerComboBox::indexChanged |
( |
int |
i | ) |
|
|
protectedslot |
◆ layer()
QgsMapLayer * QgsMapLayerComboBox::layer |
( |
int |
layerIndex | ) |
const |
Returns the layer currently shown at the specified index within the combo box.
- Parameters
-
layerIndex | position of layer to return |
- See also
- currentLayer
- Since
- QGIS 2.10
Definition at line 109 of file qgsmaplayercombobox.cpp.
◆ layerChanged
void QgsMapLayerComboBox::layerChanged |
( |
QgsMapLayer * |
layer | ) |
|
|
signal |
Emitted whenever the currently selected layer changes.
◆ paintEvent()
void QgsMapLayerComboBox::paintEvent |
( |
QPaintEvent * |
e | ) |
|
|
overrideprotected |
◆ rowsChanged
void QgsMapLayerComboBox::rowsChanged |
( |
| ) |
|
|
protectedslot |
◆ setAdditionalItems()
void QgsMapLayerComboBox::setAdditionalItems |
( |
const QStringList & |
items | ) |
|
Sets a list of additional (non map layer) items to include at the end of the combobox.
These may represent additional layers such as layers which are not included in the map layer registry, or paths to layers which have not yet been loaded into QGIS.
- See also
- additionalItems()
- Since
- QGIS 3.0
Definition at line 67 of file qgsmaplayercombobox.cpp.
◆ setAllowEmptyLayer()
void QgsMapLayerComboBox::setAllowEmptyLayer |
( |
bool |
allowEmpty | ) |
|
◆ setExceptedLayerList()
void QgsMapLayerComboBox::setExceptedLayerList |
( |
const QList< QgsMapLayer * > & |
layerList | ) |
|
|
inline |
◆ setExcludedProviders()
void QgsMapLayerComboBox::setExcludedProviders |
( |
const QStringList & |
providers | ) |
|
◆ setFilters()
void QgsMapLayerComboBox::setFilters |
( |
QgsMapLayerProxyModel::Filters |
filters | ) |
|
|
inline |
setFilters allows filtering according to layer type and/or geometry type.
Definition at line 51 of file qgsmaplayercombobox.h.
◆ setLayer
void QgsMapLayerComboBox::setLayer |
( |
QgsMapLayer * |
layer | ) |
|
|
slot |
◆ setShowCrs()
void QgsMapLayerComboBox::setShowCrs |
( |
bool |
showCrs | ) |
|
◆ showCrs()
bool QgsMapLayerComboBox::showCrs |
( |
| ) |
const |
◆ QgsProcessingMapLayerComboBox
friend class QgsProcessingMapLayerComboBox |
|
friend |
◆ allowEmptyLayer
bool QgsMapLayerComboBox::allowEmptyLayer |
|
readwrite |
◆ excludedProviders
QStringList QgsMapLayerComboBox::excludedProviders |
|
readwrite |
◆ filters
QgsMapLayerProxyModel::Filters QgsMapLayerComboBox::filters |
|
readwrite |
◆ showCrs
bool QgsMapLayerComboBox::showCrs |
|
readwrite |
The documentation for this class was generated from the following files: