16#ifndef QGSMAPLAYERCOMBOBOX_H
17#define QGSMAPLAYERCOMBOBOX_H
97 void setExceptedLayerList(
const QList<QgsMapLayer *> &layerList ) { mProxyModel->setExceptedLayerList( layerList ); }
110 void setExcludedProviders(
const QStringList &providers );
116 QStringList excludedProviders()
const;
135 void setAllowEmptyLayer(
bool allowEmpty,
const QString &text = QString(),
const QIcon &icon = QIcon() );
141 bool allowEmptyLayer()
const;
147 void setShowCrs(
bool showCrs );
153 bool showCrs()
const;
161 void setAdditionalItems(
const QStringList &items );
167 QStringList additionalItems()
const;
178 void setAdditionalLayers(
const QList<QgsMapLayer *> &layers );
186 QList<QgsMapLayer *> additionalLayers()
const;
215 void dropEvent( QDropEvent *event )
override;
224 bool mDragActive =
false;
225 bool mHighlight =
false;
231 QgsMapLayer *compatibleMapLayerFromMimeData(
const QMimeData *data )
const;
Provides global constants and enumerations for use throughout the application.
QFlags< LayerFilter > LayerFilters
void setFilters(Qgis::LayerFilters filters)
Sets filters for the layers displayed in the combo box.
QList< QgsMapLayer * > exceptedLayerList() const
Returns a list of layers which should be excluded from the combo box.
void dragLeaveEvent(QDragLeaveEvent *event) override
QgsMapLayerComboBox(QWidget *parent=nullptr)
QgsMapLayerComboBox creates a combo box to display the list of layers currently in the project.
void paintEvent(QPaintEvent *e) override
void setExceptedLayerList(const QList< QgsMapLayer * > &layerList)
Sets a list of layers which should be excluded from the combo box.
QStringList excludedProviders
void setExcludedProviders(const QStringList &providers)
Sets a list of data providers which should be excluded from the combobox.
Qgis::LayerFilters filters
Q_DECL_DEPRECATED void setFilters(int filters)
Filters according to layer type and/or geometry type.
void dropEvent(QDropEvent *event) override
QgsMapLayer * layer(int layerIndex) const
Returns the layer currently shown at the specified index within the combo box.
Qgis::LayerFilters filters() const
Returns any currently used filters on the listed layers.
void setShowCrs(bool showCrs)
Sets whether the CRS of layers is also included in the combo box text.
void setAllowEmptyLayer(bool allowEmpty, const QString &text=QString(), const QIcon &icon=QIcon())
Sets whether an optional empty layer ("not set") option is shown in the combo box.
friend class QgsProcessingMapLayerComboBox
void layerChanged(QgsMapLayer *layer)
Emitted whenever the currently selected layer changes.
void dragEnterEvent(QDragEnterEvent *event) override
A proxy model which provides an easy to use model to display the list of layers in widgets.
Base class for all map layer types.
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Represents a vector layer which manages a vector based dataset.