16 #ifndef QGSPROCESSINGBATCHALGORITHMDIALOGBASE_H
17 #define QGSPROCESSINGBATCHALGORITHMDIALOGBASE_H
23 #include <QElapsedTimer>
37 class GUI_EXPORT QgsProcessingBatchAlgorithmDialogBase :
public QgsProcessingAlgorithmDialogBase
46 QgsProcessingBatchAlgorithmDialogBase( QWidget *parent
SIP_TRANSFERTHIS =
nullptr, Qt::WindowFlags flags = Qt::WindowFlags() );
47 ~QgsProcessingBatchAlgorithmDialogBase()
override;
49 void resetAdditionalGui()
override;
50 void blockAdditionalControlsWhileRunning()
override;
57 virtual void runAsSingle() = 0;
61 void algExecuted(
bool successful,
const QVariantMap &results )
override;
65 bool isFinalized()
override;
71 void execute(
const QList< QVariantMap > ¶meters );
88 virtual void loadHtmlResults(
const QVariantMap &results,
int index ) = 0;
93 virtual void createSummaryTable(
const QList< QVariantMap > &results,
const QList< QVariantMap > &errors ) = 0;
97 void onTaskComplete(
bool ok,
const QVariantMap &results );
98 void taskTriggered(
QgsTask *task );
103 void allTasksComplete(
bool canceled );
105 QPushButton *mButtonRunSingle =
nullptr;
107 int mCurrentStep = 0;
109 QList< QVariantMap > mQueuedParameters;
110 QVariantMap mCurrentParameters;
111 QPointer< QgsProxyProgressTask > mProxyTask;
112 std::unique_ptr< QgsProcessingFeedback > mFeedback;
113 std::unique_ptr< QgsProcessingBatchFeedback > mBatchFeedback;
114 std::unique_ptr< QgsProcessingContext > mTaskContext;
115 QList< QVariantMap > mResults;
116 QList< QVariantMap > mErrors;
117 QElapsedTimer mTotalTimer;
118 QElapsedTimer mCurrentStepTimer;
123 #endif // QGSPROCESSINGBATCHALGORITHMDIALOGBASE_H