16#ifndef QGSPROCESSINGMAPLAYERCOMBOBOX_H
17#define QGSPROCESSINGMAPLAYERCOMBOBOX_H
43class GUI_EXPORT QgsProcessingMapLayerComboBox :
public QWidget
53 ~QgsProcessingMapLayerComboBox()
override;
59 void setLayer( QgsMapLayer *layer );
70 QgsMapLayer *currentLayer();
80 QString currentText();
87 void setValue(
const QVariant &value, QgsProcessingContext &context );
94 QVariant value()
const;
100 void setWidgetContext(
const QgsProcessingParameterWidgetContext &context );
108 void setEditable(
bool editable );
116 bool isEditable()
const;
126 void dragEnterEvent( QDragEnterEvent *event )
override;
127 void dragLeaveEvent( QDragLeaveEvent *event )
override;
128 void dropEvent( QDropEvent *event )
override;
132 void onLayerChanged( QgsMapLayer *layer );
134 void showSourceOptions();
135 void showRasterSourceOptions();
136 void selectFromFile();
137 void browseForLayer();
140 std::unique_ptr<QgsProcessingParameterDefinition> mParameter;
141 QgsMapLayerComboBox *mCombo =
nullptr;
142 QToolButton *mSelectButton =
nullptr;
143 QToolButton *mIterateButton =
nullptr;
144 QToolButton *mSettingsButton =
nullptr;
145 QCheckBox *mUseSelectionCheckBox =
nullptr;
146 bool mDragActive =
false;
147 long long mFeatureLimit = -1;
148 QString mFilterExpression;
149 bool mIsOverridingDefaultGeometryCheck =
false;
151 double mRasterReferenceScale = 0;
153 QPointer<QgsMapLayer> mPrevLayer;
154 int mBlockChangedSignal = 0;
156 QgsBrowserGuiModel *mBrowserModel =
nullptr;
158 QMenu *mFeatureSourceMenu =
nullptr;
159 QgsMapLayer *compatibleMapLayerFromMimeData(
const QMimeData *data,
bool &incompatibleLayerSelected )
const;
160 QString compatibleUriFromMimeData(
const QMimeData *data )
const;
ProcessingMode
Types of modes which Processing widgets can be created for.
@ Standard
Standard (single-run) algorithm mode.
InvalidGeometryCheck
Methods for handling of features with invalid geometries.
@ AbortOnInvalid
Close iterator on encountering any features with invalid geometry. This requires a slow geometry vali...
A model for showing available data sources and other items in a structured tree.
A combobox which displays a dynamic list of layers from a QGIS project.
Base class for the definition of processing parameters.
Contains settings which reflect the context in which a Processing parameter widget is shown.
QSet< QgsFeatureId > QgsFeatureIds