QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
qgsclassificationmethodregistry.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsclassificationmethodregistry.h
3 ---------------------
4 begin : September 2019
5 copyright : (C) 2019 by Denis Rouzaud
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16
17#ifndef QGSCLASSIFICATIONMETHODREGISTRY_H
18#define QGSCLASSIFICATIONMETHODREGISTRY_H
19
20#include <memory>
21
22#include "qgis_core.h"
23#include "qgis_sip.h"
24
25#include <QMap>
26
27class QIcon;
28
30
41{
42 public:
45
51
53 std::unique_ptr< QgsClassificationMethod > method( const QString &id );
54
56 QMap<QString, QString> methodNames() const;
57
59 QIcon icon( const QString &id ) const;
60
61 private:
62
63 QMap<QString, QgsClassificationMethod *> mMethods;
64};
65
66#endif // QGSCLASSIFICATIONMETHODREGISTRY_H
std::unique_ptr< QgsClassificationMethod > method(const QString &id)
Returns a new instance of the method for the given id.
bool addMethod(QgsClassificationMethod *method)
Adds a method to the registry Returns false if a method with same id already exists.
QIcon icon(const QString &id) const
Returns the icon for a given method id.
QMap< QString, QString > methodNames() const
Returns a map <name, id> of all registered methods.
An abstract class for implementations of classification methods.
#define SIP_TRANSFER
Definition qgis_sip.h:36