mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-24 00:47:57 -05:00
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@6415 c8812cc2-4d05-0410-92ff-de0c093fc19c
59 lines
1.6 KiB
Plaintext
59 lines
1.6 KiB
Plaintext
|
|
/** canonical manager of data providers
|
|
|
|
This is a Singleton class that manages data provider access.
|
|
*/
|
|
class QgsProviderRegistry
|
|
{
|
|
%TypeHeaderCode
|
|
#include <qgsproviderregistry.h>
|
|
%End
|
|
|
|
public:
|
|
|
|
/** means of accessing canonical single instance */
|
|
static QgsProviderRegistry* instance(QString pluginPath = QString::null);
|
|
|
|
/** Virtual dectructor */
|
|
virtual ~QgsProviderRegistry();
|
|
|
|
QString library(const QString & providerKey) const;
|
|
|
|
QString pluginList(bool asHtml = false) const;
|
|
|
|
/** return library directory where plugins are found */
|
|
const QDir & libraryDirectory() const;
|
|
|
|
void setLibraryDirectory(const QDir & path);
|
|
|
|
QgsDataProvider * getProvider( const QString & providerKey,
|
|
const QString & dataSource );
|
|
|
|
/** Return list of available providers by their keys */
|
|
QStringList providerList() const;
|
|
|
|
/** Return metadata of the provider or NULL if not found */
|
|
const QgsProviderMetadata* providerMetadata(const QString& providerKey) const;
|
|
|
|
/** return vector file filter string
|
|
|
|
Returns a string suitable for a QFileDialog of vector file formats
|
|
supported by all data providers.
|
|
|
|
This walks through all data providers appending calls to their
|
|
fileVectorFilters to a string, which is then returned.
|
|
|
|
@note
|
|
|
|
It'd be nice to eventually be raster/vector neutral.
|
|
*/
|
|
virtual QString fileVectorFilters() const;
|
|
|
|
private:
|
|
|
|
/** ctor private since instance() creates it */
|
|
QgsProviderRegistry(QString pluginPath) /Default/ ;
|
|
|
|
}; // class QgsProviderRegistry
|
|
|