QGIS API Documentation
4.3.0-Master (52aa6503bed)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gui
qgsprojectstorageguiregistry.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsprojectstorageguiregistry.h
3
-------------------------------
4
begin : June 2019
5
copyright : (C) 2019 by Peter Petrik
6
email : zilolv at google 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 QGSPROJECTSTORAGEGUIREGISTRY_H
19
#define QGSPROJECTSTORAGEGUIREGISTRY_H
20
21
#include <map>
22
23
#include "qgis_gui.h"
24
#include "
qgis_sip.h
"
25
26
#include <QHash>
27
#include <QList>
28
#include <QString>
29
30
class
QgsProjectStorageGuiProvider
;
31
class
QgsProviderGuiRegistry
;
32
44
class
GUI_EXPORT
QgsProjectStorageGuiRegistry
45
{
46
public
:
47
QgsProjectStorageGuiRegistry
();
48
~QgsProjectStorageGuiRegistry
();
49
50
QgsProjectStorageGuiRegistry
(
const
QgsProjectStorageGuiRegistry
&rh ) =
delete
;
51
QgsProjectStorageGuiRegistry
&
operator=
(
const
QgsProjectStorageGuiRegistry
&rh ) =
delete
;
52
54
QgsProjectStorageGuiProvider
*
projectStorageFromType
(
const
QString &type );
55
57
QgsProjectStorageGuiProvider
*
projectStorageFromUri
(
const
QString &uri );
58
60
QList<QgsProjectStorageGuiProvider *>
projectStorages
()
const
;
61
63
void
registerProjectStorage
(
QgsProjectStorageGuiProvider
*storage
SIP_TRANSFER
);
64
66
void
unregisterProjectStorage
(
QgsProjectStorageGuiProvider
*storage );
67
72
void
initializeFromProviderGuiRegistry
(
QgsProviderGuiRegistry
*providerGuiRegistry );
73
74
private
:
75
#ifdef SIP_RUN
76
QgsProjectStorageGuiRegistry
(
const
QgsProjectStorageGuiRegistry
&rh );
77
#endif
78
79
QHash<QString, QgsProjectStorageGuiProvider *> mBackends;
80
};
81
82
#endif
// QGSPROJECTSTORAGEGUIREGISTRY_H
QgsProjectStorageGuiProvider
Abstract interface for project storage GUI - to be implemented by various backends and registered in ...
Definition
qgsprojectstorageguiprovider.h:32
QgsProjectStorageGuiRegistry::QgsProjectStorageGuiRegistry
QgsProjectStorageGuiRegistry(const QgsProjectStorageGuiRegistry &rh)=delete
QgsProjectStorageGuiRegistry::projectStorageFromType
QgsProjectStorageGuiProvider * projectStorageFromType(const QString &type)
Returns storage implementation if the storage type matches one. Returns nullptr otherwise (it is a no...
Definition
qgsprojectstorageguiregistry.cpp:30
QgsProjectStorageGuiRegistry::unregisterProjectStorage
void unregisterProjectStorage(QgsProjectStorageGuiProvider *storage)
Unregisters a storage backend and destroys its instance.
Definition
qgsprojectstorageguiregistry.cpp:57
QgsProjectStorageGuiRegistry::projectStorages
QList< QgsProjectStorageGuiProvider * > projectStorages() const
Returns a list of registered project storage implementations.
Definition
qgsprojectstorageguiregistry.cpp:47
QgsProjectStorageGuiRegistry::registerProjectStorage
void registerProjectStorage(QgsProjectStorageGuiProvider *storage)
Registers a storage backend and takes ownership of it.
Definition
qgsprojectstorageguiregistry.cpp:52
QgsProjectStorageGuiRegistry::operator=
QgsProjectStorageGuiRegistry & operator=(const QgsProjectStorageGuiRegistry &rh)=delete
QgsProjectStorageGuiRegistry::initializeFromProviderGuiRegistry
void initializeFromProviderGuiRegistry(QgsProviderGuiRegistry *providerGuiRegistry)
Initializes the registry.
Definition
qgsprojectstorageguiregistry.cpp:62
QgsProjectStorageGuiRegistry::projectStorageFromUri
QgsProjectStorageGuiProvider * projectStorageFromUri(const QString &uri)
Returns storage implementation if the URI matches one. Returns nullptr otherwise (it is a normal file...
Definition
qgsprojectstorageguiregistry.cpp:35
QgsProjectStorageGuiRegistry::QgsProjectStorageGuiRegistry
QgsProjectStorageGuiRegistry()
QgsProviderGuiRegistry
A registry / canonical manager of GUI parts of data providers.
Definition
qgsproviderguiregistry.h:54
qgis_sip.h
SIP_TRANSFER
#define SIP_TRANSFER
Definition
qgis_sip.h:35
Generated on
for QGIS API Documentation by
1.17.0