mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
86 lines
2.7 KiB
C++
86 lines
2.7 KiB
C++
/***************************************************************************
|
|
qgsprocessingalgorithmconfig.h
|
|
--------------------------
|
|
begin : April 2018
|
|
copyright : (C) 2018 by Matthias Kuhn
|
|
email : matthias@opengis.ch
|
|
***************************************************************************/
|
|
|
|
/***************************************************************************
|
|
* *
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
* it under the terms of the GNU General Public License as published by *
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
* (at your option) any later version. *
|
|
* *
|
|
***************************************************************************/
|
|
|
|
|
|
#ifndef QGSPROCESSINGALGORITHMCONFIGURATIONWIDGET_H
|
|
#define QGSPROCESSINGALGORITHMCONFIGURATIONWIDGET_H
|
|
|
|
#include <QWidget>
|
|
#include <QVariantMap>
|
|
|
|
#include "qgis_core.h"
|
|
#include "qgis_sip.h"
|
|
|
|
class QgsProcessingAlgorithm;
|
|
class QgsProcessingAlgorithmConfigurationWidget;
|
|
|
|
/**
|
|
* A configuration widget for processing algorithms allows to provide additional
|
|
* configuration options directly on algorithm level, in addition to parameters.
|
|
*
|
|
* \since QGIS 3.2
|
|
* \ingroup core
|
|
*/
|
|
class CORE_EXPORT QgsProcessingAlgorithmConfigurationWidget : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
/**
|
|
* Creates a new QgsProcessingAlgorithmConfigurationWidget
|
|
*/
|
|
QgsProcessingAlgorithmConfigurationWidget( QWidget *parent = nullptr );
|
|
virtual ~QgsProcessingAlgorithmConfigurationWidget() = default;
|
|
|
|
/**
|
|
* Read the current configuration from this widget.
|
|
*/
|
|
virtual QVariantMap configuration() const = 0;
|
|
|
|
/**
|
|
* Set the configuration which this widget should represent.
|
|
*/
|
|
virtual void setConfiguration( const QVariantMap &configuration ) = 0;
|
|
};
|
|
|
|
|
|
/**
|
|
* Interface base class for factories for algorithm configuration widgets.
|
|
*
|
|
* \since QGIS 3.2
|
|
* \ingroup core
|
|
*/
|
|
class CORE_EXPORT QgsProcessingAlgorithmConfigurationWidgetFactory
|
|
{
|
|
public:
|
|
virtual ~QgsProcessingAlgorithmConfigurationWidgetFactory() = default;
|
|
|
|
/**
|
|
* Create a new configuration widget for \a algorithm.
|
|
*/
|
|
virtual QgsProcessingAlgorithmConfigurationWidget *create( QgsProcessingAlgorithm *algorithm ) const = 0 SIP_FACTORY;
|
|
|
|
/**
|
|
* Check if this factory can create widgets for \a algorithm.
|
|
*/
|
|
virtual bool canCreateFor( QgsProcessingAlgorithm *algorithm ) const = 0;
|
|
};
|
|
|
|
|
|
#endif // QGSPROCESSINGALGORITHMCONFIGURATIONWIDGET_H
|