File: qgsauthsettingswidget.sip.in

package info (click to toggle)
qgis 3.22.16%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,186,020 kB
  • sloc: cpp: 1,275,562; python: 194,091; xml: 15,597; perl: 3,471; sh: 3,368; sql: 2,485; ansic: 2,219; yacc: 1,056; lex: 574; javascript: 504; lisp: 411; makefile: 227
file content (229 lines) | stat: -rw-r--r-- 5,989 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/gui/auth/qgsauthsettingswidget.h                                 *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
 ************************************************************************/




class QgsAuthSettingsWidget : QWidget
{
%Docstring(signature="appended")
Widget for entering authentication credentials both in the form username/password
and by using QGIS Authentication Database and its authentication configurations.

The widget also offers the functionality to convert username/password credentials
to an authentication configuration.

.. versionadded:: 3.0
%End

%TypeHeaderCode
#include "qgsauthsettingswidget.h"
%End
  public:

    enum WarningType
    {
      ProjectFile,
      UserSettings
    };

    explicit QgsAuthSettingsWidget( QWidget *parent /TransferThis/ = 0,
                                    const QString &configId = QString(),
                                    const QString &username = QString(),
                                    const QString &password = QString(),
                                    const QString &dataprovider = QString() );
%Docstring
Create a dialog for setting an associated authentication config, either
from existing configs, or creating/removing them from auth database

:param parent: Parent widget
:param configId: authentication configuration id
:param username:
:param password:
:param dataprovider: The key of the calling layer provider, if applicable
%End

    void setWarningText( const QString &warningText );
%Docstring
setWarningText set the text of the warning label

:param warningText: the text of the warning label

.. seealso:: :py:func:`formattedWarning`
%End

    void setBasicText( const QString &basicText );
%Docstring
setBasicText set the text of the warning label

:param basicText: the text of the basic tab label
%End

    QString username() const;
%Docstring
username

:return: basic authentication username
%End

    void setUsername( const QString &username );
%Docstring
setUsername set the username

:param username: the user name
%End

    QString password() const;
%Docstring
password

:return: basic authentication password
%End

    void setPassword( const QString &password );
%Docstring
setPassword set the password

:param password: the password
%End

    QString configId() const;
%Docstring
configId

:return: authentication configuration id
%End

    void setConfigId( const QString &configId );
%Docstring
setConfigId set the authentication configuration id
param configId the authentication configuration id
%End

    void setDataprovider( const QString &dataprovider );
%Docstring
setDataprovider set the data provider key for filtering compatible authentication configurations

:param dataprovider: data provider key
%End

    QString dataprovider() const;
%Docstring
dataprovider

:return: the data provider key used to filter compatible authentication configurations
%End

    static QString formattedWarning( WarningType warning );
%Docstring
warning text message based upon where credentials are stored

:param warning: enum of warning type

:return: pre-formatted warning text
%End

    bool btnConvertToEncryptedIsEnabled() const;
%Docstring
convertButtonEnabled, mainly useful for unit tests

:return: ``True`` if the convert button is enabled
%End

    void showStoreCheckboxes( bool enabled );
%Docstring
showStoreCheckboxes show the "Store" checkboxes for basic auth.
Some connection configurations allow the user to enter credentials
for testing the connection without storing them in the project.
"Store" checkboxes are disabled by default.

:param enabled:
%End

    void setStoreUsernameChecked( bool checked );
%Docstring
setStoreUsernameChecked check the "Store" checkbox for the username

:param checked:

.. seealso:: :py:func:`showStoreCheckboxes`
%End

    void setStorePasswordChecked( bool checked );
%Docstring
setStorePasswordCheched check the "Store" checkbox for the password

:param checked:

.. seealso:: :py:func:`showStoreCheckboxes`
%End

    bool storePasswordIsChecked() const;
%Docstring
storePassword

:return: ``True`` if "Store" checkbox for the password is checked
%End

    bool storeUsernameIsChecked() const;
%Docstring
storeUsername

:return: ``True`` if "Store" checkbox for the username is checked
%End

    bool configurationTabIsSelected();
%Docstring
configurationTabIsSelected

:return: ``True`` if the configuration tab is the currently selected tab
%End

  public slots:

    bool convertToEncrypted();
%Docstring
convertToEncrypted is called when the convert to encrypted button is
clicked and it creates a Basic authentication configuration from
username and password specified in the Basic tab

:return: return ``True`` on success
%End

  signals:

    void usernameChanged();
%Docstring
Emitted when the plain text username defined in the dialog is changed.

.. versionadded:: 3.22
%End

    void passwordChanged();
%Docstring
Emitted when the plain text password defined in the dialog is changed.

.. versionadded:: 3.22
%End

    void configIdChanged();
%Docstring
Emitted when the auth configuration ID selected in the dialog is changed.

.. versionadded:: 3.22
%End

};

/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/gui/auth/qgsauthsettingswidget.h                                 *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
 ************************************************************************/