QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gui
auth
qgsauthconfigselect.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsauthconfigselect.h
3
---------------------
4
begin : October 5, 2014
5
copyright : (C) 2014 by Boundless Spatial, Inc. USA
6
author : Larry Shaffer
7
email : lshaffer at boundlessgeo dot com
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
***************************************************************************/
16
17
#ifndef QGSAUTHCONFIGSELECT_H
18
#define QGSAUTHCONFIGSELECT_H
19
20
#include "ui_qgsauthconfigselect.h"
21
22
#include "qgis_gui.h"
23
#include "
qgis_sip.h
"
24
#include "
qgsauthconfig.h
"
25
26
#include <QLabel>
27
#include <QWidget>
28
33
class
GUI_EXPORT
QgsAuthConfigSelect
:
public
QWidget,
private
Ui::QgsAuthConfigSelect
34
{
35
Q_OBJECT
36
37
public
:
44
explicit
QgsAuthConfigSelect
( QWidget *parent
SIP_TRANSFERTHIS
=
nullptr
,
const
QString &dataprovider = QString() );
45
47
void
setConfigId
(
const
QString &authcfg );
48
50
const
QString
configId
()
const
{
return
mAuthCfg; }
51
53
void
setDataProviderKey(
const
QString &key );
54
55
signals:
57
void
selectedConfigIdChanged
(
const
QString &authcfg );
58
60
void
selectedConfigIdRemoved
(
const
QString &authcfg );
61
62
public
slots:
64
void
showMessage
(
const
QString &msg );
65
67
void
clearMessage
();
68
69
private
slots:
70
void
loadConfig();
71
void
clearConfig();
72
void
validateConfig();
73
void
populateConfigSelector();
74
75
void
cmbConfigSelect_currentIndexChanged(
int
index );
76
77
void
btnConfigAdd_clicked();
78
79
void
btnConfigEdit_clicked();
80
81
void
btnConfigRemove_clicked();
82
83
void
btnConfigMsgClear_clicked();
84
85
private
:
86
void
loadAvailableConfigs();
87
88
QString mAuthCfg;
89
QString mDataProvider;
90
QgsAuthMethodConfigsMap
mConfigs;
91
92
bool
mDisabled =
false
;
93
QVBoxLayout *mAuthNotifyLayout =
nullptr
;
94
QLabel *mAuthNotify =
nullptr
;
95
bool
mTemporarilyBlockLoad =
false
;
96
};
97
98
100
101
#include "ui_qgsauthconfiguriedit.h"
102
103
class
QPushButton;
104
109
class
GUI_EXPORT
QgsAuthConfigUriEdit
:
public
QDialog,
private
Ui::QgsAuthConfigUriEdit
110
{
111
Q_OBJECT
112
113
public
:
120
explicit
QgsAuthConfigUriEdit
( QWidget *parent
SIP_TRANSFERTHIS
=
nullptr
,
const
QString &datauri = QString(),
const
QString &dataprovider = QString() );
121
123
void
setDataSourceUri
(
const
QString &datauri );
124
126
QString
dataSourceUri
();
127
129
static
bool
hasConfigId
(
const
QString &txt );
130
131
private
slots:
132
void
saveChanges();
133
134
void
resetChanges();
135
136
void
authCfgUpdated(
const
QString &authcfg );
137
138
void
authCfgRemoved(
const
QString &authcfg );
139
140
private
:
141
int
authCfgIndex();
142
143
QString authCfgFromUri();
144
145
void
selectAuthCfgInUri();
146
147
void
updateUriWithAuthCfg();
148
149
void
removeAuthCfgFromUri();
150
151
QString mAuthCfg;
152
QString mDataUri;
153
QString mDataUriOrig;
154
155
bool
mDisabled =
false
;
156
QVBoxLayout *mAuthNotifyLayout =
nullptr
;
157
QLabel *mAuthNotify =
nullptr
;
158
};
159
160
#endif
// QGSAUTHCONFIGSELECT_H
QgsAuthConfigSelect::clearMessage
void clearMessage()
Clear and hide small message bar.
Definition
qgsauthconfigselect.cpp:192
QgsAuthConfigSelect::setConfigId
void setConfigId(const QString &authcfg)
Sets the authentication config id for the resource.
Definition
qgsauthconfigselect.cpp:78
QgsAuthConfigSelect::selectedConfigIdRemoved
void selectedConfigIdRemoved(const QString &authcfg)
Emitted when authentication config is removed.
QgsAuthConfigSelect::QgsAuthConfigSelect
QgsAuthConfigSelect(QWidget *parent=nullptr, const QString &dataprovider=QString())
Create a dialog for setting an associated authentication config, either from existing configs,...
Definition
qgsauthconfigselect.cpp:38
QgsAuthConfigSelect::selectedConfigIdChanged
void selectedConfigIdChanged(const QString &authcfg)
Emitted when authentication config is changed or missing.
QgsAuthConfigSelect::configId
const QString configId() const
Gets the authentication config id for the resource.
Definition
qgsauthconfigselect.h:50
QgsAuthConfigSelect::showMessage
void showMessage(const QString &msg)
Show a small message bar with a close button.
Definition
qgsauthconfigselect.cpp:182
QgsAuthConfigUriEdit::setDataSourceUri
void setDataSourceUri(const QString &datauri)
Sets the data source URI to parse.
Definition
qgsauthconfigselect.cpp:310
QgsAuthConfigUriEdit::hasConfigId
static bool hasConfigId(const QString &txt)
Whether a string contains an authcfg ID.
Definition
qgsauthconfigselect.cpp:349
QgsAuthConfigUriEdit::dataSourceUri
QString dataSourceUri()
The returned, possibly edited data source URI.
Definition
qgsauthconfigselect.cpp:340
QgsAuthConfigUriEdit::QgsAuthConfigUriEdit
QgsAuthConfigUriEdit(QWidget *parent=nullptr, const QString &datauri=QString(), const QString &dataprovider=QString())
Construct wrapper dialog for select widget to edit an authcfg in a data source URI.
Definition
qgsauthconfigselect.cpp:279
qgis_sip.h
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition
qgis_sip.h:52
qgsauthconfig.h
QgsAuthMethodConfigsMap
QHash< QString, QgsAuthMethodConfig > QgsAuthMethodConfigsMap
Definition
qgsauthconfig.h:197
Generated on
for QGIS API Documentation by
1.17.0