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 |
◆ 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 |
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 |
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 107 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 65 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
◆ 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: