QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
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 
Qgs3DAlgorithms::icon
QIcon icon() const override
Returns an icon for the provider.
Qgs3DAlgorithms::Qgs3DAlgorithms
Qgs3DAlgorithms(QObject *parent=nullptr)
Constructor for Qgs3DAlgorithms.
qgs3dalgorithms.h
qgsalgorithmtessellate.h
Qgs3DAlgorithms::supportsNonFileBasedOutput
bool supportsNonFileBasedOutput() const override
Returns true if the provider supports non-file based outputs (such as memory layers or direct databas...
QgsProcessingProvider
Abstract base class for processing providers.
Definition: qgsprocessingprovider.h:35
QgsApplication::iconPath
static QString iconPath(const QString &iconFile)
Returns path to the desired icon file.
Definition: qgsapplication.cpp:682
Qgs3DAlgorithms::id
QString id() const override
Returns the unique provider id, used for identifying the provider.
qgsapplication.h
QgsProcessingProvider::addAlgorithm
bool addAlgorithm(QgsProcessingAlgorithm *algorithm)
Adds an algorithm to the provider.
Definition: qgsprocessingprovider.cpp:95
Qgs3DAlgorithms::name
QString name() const override
Returns the provider name, which is used to describe the provider within the GUI.
Qgs3DAlgorithms::svgIconPath
QString svgIconPath() const override
Returns a path to an SVG version of the provider's icon.
QgsApplication::getThemeIcon
static QIcon getThemeIcon(const QString &name, const QColor &fillColor=QColor(), const QColor &strokeColor=QColor())
Helper to get a theme icon.
Definition: qgsapplication.cpp:693
Qgs3DAlgorithms::loadAlgorithms
void loadAlgorithms() override
Loads all algorithms belonging to this provider.
Qgs3DAlgorithms::helpId
QString helpId() const override
Returns the provider help id string, used for creating QgsHelp urls for algorithms belong to this pro...