QGIS API Documentation 3.41.0-Master (45a0abf3bec)
Loading...
Searching...
No Matches
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 "moc_qgs3dalgorithms.cpp"
21#include "qgsapplication.h"
22
24
25Qgs3DAlgorithms::Qgs3DAlgorithms( QObject *parent )
26 : QgsProcessingProvider( parent )
27{}
28
29QIcon Qgs3DAlgorithms::icon() const
30{
31 return QgsApplication::getThemeIcon( QStringLiteral( "/providerQgis.svg" ) );
32}
33
34QString Qgs3DAlgorithms::svgIconPath() const
35{
36 return QgsApplication::iconPath( QStringLiteral( "providerQgis.svg" ) );
37}
38
39QString Qgs3DAlgorithms::id() const
40{
41 return QStringLiteral( "3d" );
42}
43
44QString Qgs3DAlgorithms::helpId() const
45{
46 return QStringLiteral( "qgis" );
47}
48
49QString Qgs3DAlgorithms::name() const
50{
51 return tr( "QGIS (3D)" );
52}
53
55{
56 return true;
57}
58
60{
61 addAlgorithm( new QgsTessellateAlgorithm() );
62}
63
64
66
67
68
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.