QGIS API Documentation 3.99.0-Master (2fe06baccd8)
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
32}
33
35{
36 return QIcon();
37}
38
40{
41 return mUri;
42}
43
45{
46 mUri = uri;
47}
48
50{
51 return mConfiguration;
52}
53
55{
56 mConfiguration = configuration;
57}
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.