QGIS API Documentation
4.3.0-Master (4ecdf0f3f59)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
project
qgsprojectstorageregistry.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsprojectstorageregistry.h
3
--------------------------------------
4
Date : March 2018
5
Copyright : (C) 2018 by Martin Dobias
6
Email : wonder dot sk at gmail dot com
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 QGSPROJECTSTORAGEREGISTRY_H
17
#define QGSPROJECTSTORAGEREGISTRY_H
18
19
#include "qgis_core.h"
20
#include "
qgis_sip.h
"
21
22
#include <QHash>
23
24
class
QgsProjectStorage
;
25
34
class
CORE_EXPORT
QgsProjectStorageRegistry
35
{
36
public
:
37
~QgsProjectStorageRegistry
();
38
40
QgsProjectStorage
*
projectStorageFromType
(
const
QString &type );
41
43
QgsProjectStorage
*
projectStorageFromUri
(
const
QString &uri );
44
46
QList<QgsProjectStorage *>
projectStorages
()
const
;
47
49
void
registerProjectStorage
(
QgsProjectStorage
*storage
SIP_TRANSFER
);
50
52
void
unregisterProjectStorage
(
QgsProjectStorage
*storage );
53
54
private
:
55
QHash<QString, QgsProjectStorage *> mBackends;
56
};
57
58
#endif
// QGSPROJECTSTORAGEREGISTRY_H
QgsProjectStorageRegistry
Registry of storage backends that QgsProject may use.
Definition
qgsprojectstorageregistry.h:35
QgsProjectStorageRegistry::projectStorageFromUri
QgsProjectStorage * projectStorageFromUri(const QString &uri)
Returns storage implementation if the URI matches one. Returns nullptr otherwise (it is a normal file...
Definition
qgsprojectstorageregistry.cpp:30
QgsProjectStorageRegistry::unregisterProjectStorage
void unregisterProjectStorage(QgsProjectStorage *storage)
Unregisters a storage backend and destroys its instance.
Definition
qgsprojectstorageregistry.cpp:59
QgsProjectStorageRegistry::registerProjectStorage
void registerProjectStorage(QgsProjectStorage *storage)
Registers a storage backend and takes ownership of it.
Definition
qgsprojectstorageregistry.cpp:54
QgsProjectStorageRegistry::projectStorageFromType
QgsProjectStorage * projectStorageFromType(const QString &type)
Returns storage implementation if the storage type matches one. Returns nullptr otherwise (it is a no...
Definition
qgsprojectstorageregistry.cpp:25
QgsProjectStorageRegistry::projectStorages
QList< QgsProjectStorage * > projectStorages() const
Returns a list of registered project storage implementations.
Definition
qgsprojectstorageregistry.cpp:49
QgsProjectStorage
Abstract interface for project storage - to be implemented by various backends and registered in QgsP...
Definition
qgsprojectstorage.h:37
qgis_sip.h
SIP_TRANSFER
#define SIP_TRANSFER
Definition
qgis_sip.h:35
Generated on
for QGIS API Documentation by
1.17.0