QGIS API Documentation 3.99.0-Master (26c88405ac0)
Loading...
Searching...
No Matches
qgsprofilesourceregistry.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsprofilesourceregistry.h
3 --------------------------------------
4 Date : April 2024
5 Copyright : (C) 2024 by Germán Carrillo
6 Email : german at opengis dot ch
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#ifndef QGSPROFILESOURCEREGISTRY_H
17#define QGSPROFILESOURCEREGISTRY_H
18
19#include "qgis_core.h"
20#include "qgis_sip.h"
21
23
24#include <QObject>
25#include <QList>
26
27
37class CORE_EXPORT QgsProfileSourceRegistry : public QObject
38{
39 Q_OBJECT
40
41 public:
42
47
49
53 QList< QgsAbstractProfileSource * > profileSources() const;
54
61
67 Q_DECL_DEPRECATED bool unregisterProfileSource( QgsAbstractProfileSource *source ) SIP_DEPRECATED;
68
77 bool unregisterProfileSource( const QString &sourceId );
78
86 QgsAbstractProfileSource *findSourceById( const QString &sourceId ) const;
87
88 signals:
89
98 void profileSourceRegistered( const QString &sourceId, const QString &sourceName );
99
107 void profileSourceUnregistered( const QString &sourceId );
108
109 private:
110 QList< QgsAbstractProfileSource * > mSources;
111
112 Q_DISABLE_COPY( QgsProfileSourceRegistry )
113};
114
115#endif // QGSPROFILESOURCEREGISTRY_H
Interface for classes which can generate elevation profiles.
QgsAbstractProfileSource * findSourceById(const QString &sourceId) const
Finds a registered profile source by id.
void profileSourceUnregistered(const QString &sourceId)
Signal emitted once a profile source is unregistered.
Q_DECL_DEPRECATED bool unregisterProfileSource(QgsAbstractProfileSource *source)
Unregisters a profile source and destroys its instance.
bool registerProfileSource(QgsAbstractProfileSource *source)
Registers a profile source and takes ownership of it.
QList< QgsAbstractProfileSource * > profileSources() const
Returns a list of registered profile sources.
QgsProfileSourceRegistry()
Constructor - creates a registry of profile sources.
void profileSourceRegistered(const QString &sourceId, const QString &sourceName)
Signal emitted once a profile source is registered.
#define SIP_DEPRECATED
Definition qgis_sip.h:114
#define SIP_TRANSFER
Definition qgis_sip.h:36