16 #ifndef QGSMAPLAYERCOMBOBOX_H
17 #define QGSMAPLAYERCOMBOBOX_H
37 Q_PROPERTY( QgsMapLayerProxyModel::Filters filters READ filters WRITE setFilters )
38 Q_PROPERTY(
bool allowEmptyLayer READ allowEmptyLayer WRITE setAllowEmptyLayer )
39 Q_PROPERTY(
bool showCrs READ showCrs WRITE setShowCrs )
40 Q_PROPERTY( QStringList excludedProviders READ excludedProviders WRITE setExcludedProviders )
54 QgsMapLayerProxyModel::Filters
filters()
const {
return mProxyModel->filters(); }
57 void setExceptedLayerList(
const QList<QgsMapLayer *> &layerList ) { mProxyModel->setExceptedLayerList( layerList );}
67 void setExcludedProviders(
const QStringList &providers );
74 QStringList excludedProviders()
const;
94 void setAllowEmptyLayer(
bool allowEmpty,
const QString &text = QString(),
const QIcon &icon = QIcon() );
101 bool allowEmptyLayer()
const;
108 void setShowCrs(
bool showCrs );
115 bool showCrs()
const;
124 void setAdditionalItems(
const QStringList &items );
131 QStringList additionalItems()
const;
142 void setAdditionalLayers(
const QList<QgsMapLayer *> &layers );
150 QList< QgsMapLayer * > additionalLayers()
const;
176 void dragEnterEvent( QDragEnterEvent *event )
override;
177 void dragLeaveEvent( QDragLeaveEvent *event )
override;
178 void dropEvent( QDropEvent *event )
override;
179 void paintEvent( QPaintEvent *e )
override;
182 void indexChanged(
int i );
187 bool mDragActive =
false;
188 bool mHighlight =
false;
194 QgsMapLayer *compatibleMapLayerFromMimeData(
const QMimeData *data )
const;
196 friend class QgsProcessingMapLayerComboBox;
199 #endif // QGSMAPLAYERCOMBOBOX_H