Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[processing] c++ base class for providers
Nothing particularly exciting here yet, but this commit moves the definition of the provider base class to a c++ QgsProcessingProvider abstract base class. As part of this some existing python methods were renamed to make their use clearer and to fit with the QGIS c++ api conventions: - getName was renamed to id - getDescription was renamed to name - getIcon was renamed to icon These API breaks are documented
- Loading branch information
1 parent
243f01c
commit bb24dfe
Showing
31 changed files
with
327 additions
and
181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/** | ||
* \class QgsProcessingProvider | ||
* \ingroup core | ||
* Abstract base class for processing providers. An algorithm provider is a set of | ||
* related algorithms, typically from the same external application or related | ||
* to a common area of analysis. | ||
* \note added in QGIS 3.0 | ||
*/ | ||
class QgsProcessingProvider | ||
{ | ||
%TypeHeaderCode | ||
#include <qgsprocessingprovider.h> | ||
%End | ||
|
||
public: | ||
|
||
QgsProcessingProvider(); | ||
|
||
virtual ~QgsProcessingProvider(); | ||
|
||
/** | ||
* Returns an icon for the provider. | ||
*/ | ||
virtual QIcon icon() const; | ||
|
||
/** | ||
* Returns the unique provider id, used for identifying the provider. This string | ||
* should be a unique, short, character only string, eg "qgis" or "gdal". This | ||
* string should not be localised. | ||
* @see name() | ||
*/ | ||
virtual QString id() const = 0; | ||
|
||
/** | ||
* Returns the full provider name, which is used to describe the provider within the GUI. | ||
* This string should be localised. | ||
* @see id() | ||
*/ | ||
virtual QString name() const = 0; | ||
|
||
virtual bool canBeActivated() const; | ||
|
||
private: | ||
|
||
//! Providers cannot be copied | ||
QgsProcessingProvider( const QgsProcessingProvider& other ); | ||
//! Providers cannot be copied | ||
//QgsProcessingProvider& operator=( const QgsProcessingProvider& other ); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
bb24dfe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wheeeeee!