QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
processing
qgsprocessingdefaultstyleregistry.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsprocessingdefaultstyleregistry.h
3
------------------------
4
begin : Septeber 2026
5
copyright : (C) 2026 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
#ifndef QGSPROCESSINGDEFAULTSTYLEREGISTRY_H
19
#define QGSPROCESSINGDEFAULTSTYLEREGISTRY_H
20
21
#include "
qgis.h
"
22
#include "qgis_core.h"
23
24
#include <QObject>
25
36
class
CORE_EXPORT
QgsProcessingDefaultStyleRegistry
:
public
QObject
37
{
38
Q_OBJECT
39
40
public
:
47
QgsProcessingDefaultStyleRegistry
( QObject *parent =
nullptr
);
48
56
void
setDefaultStyleForOutput
(
const
QString &algorithmId,
const
QString &outputName,
const
QString &qmlPath );
57
64
QString
defaultStyleForOutput
(
const
QString &algorithmId,
const
QString &outputName )
const
;
65
71
void
loadStyles
();
72
78
void
saveStyles
();
79
80
private
:
81
static
QString configFilePath();
82
83
// map of algorithm ID to map of output name to QML file path
84
QMap< QString, QMap< QString, QString > > mStyles;
85
};
86
87
88
#endif
// QGSPROCESSINGDEFAULTSTYLEREGISTRY_H
QgsProcessingDefaultStyleRegistry::loadStyles
void loadStyles()
Loads all saved styles from the configuration file.
Definition
qgsprocessingdefaultstyleregistry.cpp:64
QgsProcessingDefaultStyleRegistry::defaultStyleForOutput
QString defaultStyleForOutput(const QString &algorithmId, const QString &outputName) const
Returns the QML path to the default style to use for the specified output from an algorithm,...
Definition
qgsprocessingdefaultstyleregistry.cpp:53
QgsProcessingDefaultStyleRegistry::saveStyles
void saveStyles()
Saves registered styles to the configuration file.
Definition
qgsprocessingdefaultstyleregistry.cpp:96
QgsProcessingDefaultStyleRegistry::setDefaultStyleForOutput
void setDefaultStyleForOutput(const QString &algorithmId, const QString &outputName, const QString &qmlPath)
Sets the default style for an output from an algorithm.
Definition
qgsprocessingdefaultstyleregistry.cpp:34
QgsProcessingDefaultStyleRegistry::QgsProcessingDefaultStyleRegistry
QgsProcessingDefaultStyleRegistry(QObject *parent=nullptr)
Constructor for QgsProcessingDefaultStyleRegistry.
Definition
qgsprocessingdefaultstyleregistry.cpp:30
qgis.h
Generated on
for QGIS API Documentation by
1.17.0