16#ifndef QGSPROCESSINGOUTPUTDESTINATIONWIDGET_H
17#define QGSPROCESSINGOUTPUTDESTINATIONWIDGET_H
19#include "ui_qgsprocessingdestinationwidgetbase.h"
40class GUI_EXPORT QgsProcessingLayerOutputDestinationWidget :
public QWidget,
private Ui::QgsProcessingDestinationWidgetBase
48 QgsProcessingLayerOutputDestinationWidget(
const QgsProcessingDestinationParameter *parameter,
bool defaultSelection, QWidget *parent
SIP_TRANSFERTHIS =
nullptr );
53 bool outputIsSkipped()
const;
58 void setValue(
const QVariant &value );
63 QVariant value()
const;
70 void setWidgetContext(
const QgsProcessingParameterWidgetContext &context );
75 void setContext( QgsProcessingContext *context );
83 void registerProcessingParametersGenerator( QgsProcessingParametersGenerator *generator );
88 void addOpenAfterRunningOption();
93 bool openAfterRunning()
const;
100 void skipOutputChanged(
bool skipped );
105 void destinationChanged();
108 void dragEnterEvent( QDragEnterEvent *event )
override;
109 void dragLeaveEvent( QDragLeaveEvent *event )
override;
110 void dropEvent( QDropEvent *event )
override;
114 void menuAboutToShow();
116 void saveToTemporary(
const QString &name = QString() );
117 void selectDirectory();
119 void saveToGeopackage();
120 void saveToDatabase();
121 void appendToLayer();
122 void selectEncoding();
123 void textChanged(
const QString &text );
126 void setAppendDestination(
const QString &uri,
const QgsFields &destFields );
131 bool couldBeTemporaryLayerName(
const QString &value )
const;
132 QString memoryProviderLayerName(
const QString &value )
const;
137 bool consideredEqualTemporaryOutputValues(
const QString &val1,
const QString &val2 )
const;
142 QString variantToString(
const QVariant &value )
const;
144 void setupPlaceholderText();
146 QString mimeDataToPath(
const QMimeData *data );
148 const QgsProcessingDestinationParameter *mParameter =
nullptr;
149 QgsProcessingParametersGenerator *mParametersGenerator =
nullptr;
150 QMenu *mMenu =
nullptr;
152 bool mUseTemporary =
true;
153 bool mDefaultSelection =
false;
155 QgsBrowserGuiModel *mBrowserModel =
nullptr;
156 QCheckBox *mOpenAfterRunningCheck =
nullptr;
158 QgsRemappingSinkDefinition mRemapDefinition;
159 bool mUseRemapping =
false;
163 QgsProcessingContext *mContext =
nullptr;
165 QAction *mActionTemporaryOutputIcon =
nullptr;
170 friend class TestProcessingGui;
A model for showing available data sources and other items in a structured tree.
Base class for all parameter definitions which represent file or layer destinations,...
static const QString TEMPORARY_OUTPUT
Constant used to indicate that a Processing algorithm output should be a temporary layer/file.