QGIS/python/core/qgsproviderregistry.sip
Juergen E. Fischer f3cb57b1eb SIP bindings update:
- update methods of existing classes
- add comment to methods missing in the sip bindings
- split up collective sip files into single files and use
  same directory structure in python/ as in src/
- add a lot of missing classes (some might not make sense because of
  missing python methods in those classes)
- remove some non-existing methods from the header files
- add scripts/sipdiff
- replace some usages of std::vector and std::set with QVector/QSet
2012-09-24 02:42:57 +02:00

92 lines
3.0 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();
/** Return path for the library of the provider */
QString library( const QString & providerKey ) const;
/** Return list of provider plugins found */
QString pluginList( bool asHtml = false ) const;
/** return library directory where plugins are found */
const QDir & libraryDirectory() const;
/** Set library directory where to search for plugins */
void setLibraryDirectory( const QDir & path );
/** Create an instance of the provider
@param providerKey identificator of the provider
@param dataSource string containing data source for the provider
@return instance of provider or NULL on error
*/
QgsDataProvider *provider( const QString & providerKey,
const QString & dataSource );
QWidget *selectWidget( const QString & providerKey,
QWidget * parent = 0, Qt::WFlags fl = 0 );
/** Get pointer to provider function
@param providerKey identificator of the provider
@param functionName name of function
@return pointer to function or NULL on error
*/
void *function( const QString & providerKey,
const QString & functionName );
QLibrary *providerLibrary( const QString & providerKey ) const;
/** 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;
/** return a string containing the available database drivers
* @note this method was added in QGIS 1.1
*/
virtual QString databaseDrivers() const;
/** return a string containing the available directory drivers
* @note this method was added in QGIS 1.1
*/
virtual QString directoryDrivers() const;
/** return a string containing the available protocol drivers
* @note this method was added in QGIS 1.1
*/
virtual QString protocolDrivers() const;
void registerGuis( QWidget *widget );
private:
/** ctor private since instance() creates it */
QgsProviderRegistry( QString pluginPath );
}; // class QgsProviderRegistry