QGIS API Documentation 3.41.0-Master (cea29feecf2)
Loading...
Searching...
No Matches
qgsabstractproviderconnection.cpp
Go to the documentation of this file.
1/***************************************************************************
2 qgsabstractproviderconnection.cpp - QgsAbstractProviderConnection
3
4 ---------------------
5 begin : 2.8.2019
6 copyright : (C) 2019 by Alessandro Pasotti
7 email : elpaso at itopen dot it
8 ***************************************************************************
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
14 * *
15 ***************************************************************************/
17#include <QIcon>
18
20{
21 Q_UNUSED( name );
22 // Note: concrete classes must implement the logic to read the configuration from the settings
23 // and create mUri
24}
25
26QgsAbstractProviderConnection::QgsAbstractProviderConnection( const QString &uri, const QVariantMap &configuration )
27 : mUri( uri )
28 , mConfiguration( configuration )
29{
30
31}
32
34{
35 return QIcon();
36}
37
39{
40 return mUri;
41}
42
43void QgsAbstractProviderConnection::setUri( const QString &uri )
44{
45 mUri = uri;
46}
47
49{
50 return mConfiguration;
51}
52
53void QgsAbstractProviderConnection::setConfiguration( const QVariantMap &configuration )
54{
55 mConfiguration = configuration;
56}
virtual QIcon icon() const
Returns an icon representing the connection.
QVariantMap configuration() const
Returns the connection configuration parameters.
void setUri(const QString &uri)
Sets the connection data source URI to uri.
QgsAbstractProviderConnection(const QString &name)
Creates a new connection with name by reading its configuration from the settings.
QString uri() const
Returns the connection data source URI string representation.
void setConfiguration(const QVariantMap &configuration)
Sets the connection configuration.