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 |
Returns true if the combo box allows the empty layer ("not set") choice.
- See also
- setAllowEmptyLayer()
- Since
- QGIS 3.0
◆ currentLayer()
QgsMapLayer * QgsMapLayerComboBox::currentLayer |
( |
| ) |
const |
◆ exceptedLayerList()
QList<QgsMapLayer *> QgsMapLayerComboBox::exceptedLayerList |
( |
| ) |
const |
|
inline |
◆ excludedProviders()
QStringList QgsMapLayerComboBox::excludedProviders |
( |
| ) |
const |
Returns the list of data providers which are excluded from the combobox.
- See also
- setExcludedProviders()
- Since
- QGIS 3.0
◆ filters()
QgsMapLayerProxyModel::Filters QgsMapLayerComboBox::filters |
( |
| ) |
const |
|
inline |
◆ indexChanged
void QgsMapLayerComboBox::indexChanged |
( |
int |
i | ) |
|
|
protectedslot |
◆ layer()
QgsMapLayer * QgsMapLayerComboBox::layer |
( |
int |
layerIndex | ) |
const |
Return the layer currently shown at the specified index within the combo box.
- Parameters
-
layerIndex | position of layer to return |
- Since
- QGIS 2.10
- See also
- currentLayer
Definition at line 99 of file qgsmaplayercombobox.cpp.
◆ layerChanged
void QgsMapLayerComboBox::layerChanged |
( |
QgsMapLayer * |
layer | ) |
|
|
signal |
layerChanged this signal is emitted whenever the currently selected layer changes
◆ 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 61 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 fitering 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 |
Returns true if the combo box shows the layer's CRS.
- See also
- setShowCrs()
- Since
- QGIS 3.0
◆ 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: