QGIS API Documentation 4.1.0-Master (60fea48833c)
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
18#include <QIcon>
19
21{
22 Q_UNUSED( name );
23 // Note: concrete classes must implement the logic to read the configuration from the settings
24 // and create mUri
25}
26
28 : mUri( uri )
29 , mConfiguration( configuration )
30{}
31
33{
34 return QIcon();
35}
36
38{
39 return mUri;
40}
41
43{
44 mUri = uri;
45}
46
48{
49 return mConfiguration;
50}
51
53{
54 mConfiguration = configuration;
55}
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.