QGIS API Documentation  3.24.2-Tisler (13c1a02865)
qgs3dalgorithms.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  qgs3dalgorithms.cpp
3  ---------------------
4  begin : November 2017
5  copyright : (C) 2017 by Nyall Dawson
6  email : nyall dot dawson at gmail dot com
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #include "qgs3dalgorithms.h"
19 #include "qgsalgorithmtessellate.h"
20 #include "qgsapplication.h"
21 
23 
24 Qgs3DAlgorithms::Qgs3DAlgorithms( QObject *parent )
25  : QgsProcessingProvider( parent )
26 {}
27 
28 QIcon Qgs3DAlgorithms::icon() const
29 {
30  return QgsApplication::getThemeIcon( QStringLiteral( "/providerQgis.svg" ) );
31 }
32 
33 QString Qgs3DAlgorithms::svgIconPath() const
34 {
35  return QgsApplication::iconPath( QStringLiteral( "providerQgis.svg" ) );
36 }
37 
38 QString Qgs3DAlgorithms::id() const
39 {
40  return QStringLiteral( "3d" );
41 }
42 
43 QString Qgs3DAlgorithms::helpId() const
44 {
45  return QStringLiteral( "qgis" );
46 }
47 
48 QString Qgs3DAlgorithms::name() const
49 {
50  return tr( "QGIS (3D)" );
51 }
52 
54 {
55  return true;
56 }
57 
59 {
60  addAlgorithm( new QgsTessellateAlgorithm() );
61 }
62 
63 
65 
66 
67 
QString name() const override
Returns the provider name, which is used to describe the provider within the GUI.
QString id() const override
Returns the unique provider id, used for identifying the provider.
QString svgIconPath() const override
Returns a path to an SVG version of the provider's icon.
void loadAlgorithms() override
Loads all algorithms belonging to this provider.
bool supportsNonFileBasedOutput() const override
Returns true if the provider supports non-file based outputs (such as memory layers or direct databas...
QIcon icon() const override
Returns an icon for the provider.
QString helpId() const override
Returns the provider help id string, used for creating QgsHelp urls for algorithms belong to this pro...
Qgs3DAlgorithms(QObject *parent=nullptr)
Constructor for Qgs3DAlgorithms.
static QIcon getThemeIcon(const QString &name, const QColor &fillColor=QColor(), const QColor &strokeColor=QColor())
Helper to get a theme icon.
static QString iconPath(const QString &iconFile)
Returns path to the desired icon file.
Abstract base class for processing providers.
bool addAlgorithm(QgsProcessingAlgorithm *algorithm)
Adds an algorithm to the provider.