2017-09-29 12:16:28 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
2017-09-30 08:59:07 +02:00
|
|
|
* src/gui/auth/qgsauthsettingswidget.h *
|
2017-09-29 12:16:28 +02:00
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-09-30 08:59:07 +02:00
|
|
|
class QgsAuthSettingsWidget : QWidget
|
2017-09-29 12:16:28 +02:00
|
|
|
{
|
|
|
|
%Docstring
|
|
|
|
Widget for entering authentication credentials both in the form username/password
|
|
|
|
and by using QGIS Authentication Database and its authentication configurations.
|
2017-09-29 22:46:32 +02:00
|
|
|
.. versionadded:: 3.0
|
2017-09-29 12:16:28 +02:00
|
|
|
%End
|
|
|
|
|
|
|
|
%TypeHeaderCode
|
2017-09-30 08:59:07 +02:00
|
|
|
#include "qgsauthsettingswidget.h"
|
2017-09-29 12:16:28 +02:00
|
|
|
%End
|
|
|
|
public:
|
|
|
|
|
2017-09-30 08:59:07 +02:00
|
|
|
explicit QgsAuthSettingsWidget( QWidget *parent /TransferThis/ = 0,
|
2017-09-30 09:49:35 +02:00
|
|
|
const QString &configId = QString(),
|
|
|
|
const QString &username = QString(),
|
|
|
|
const QString &password = QString(),
|
|
|
|
const QString &dataprovider = QString() );
|
2017-09-29 12:16:28 +02:00
|
|
|
%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
|
2017-09-29 17:34:59 +02:00
|
|
|
\param configId authentication configuration id
|
|
|
|
\param username
|
|
|
|
\param password
|
2017-09-29 12:16:28 +02:00
|
|
|
\param dataprovider The key of the calling layer provider, if applicable
|
|
|
|
%End
|
|
|
|
|
2017-09-29 17:34:59 +02:00
|
|
|
void setWarningText( const QString &warningText );
|
|
|
|
%Docstring
|
|
|
|
setWarningText set the text of the warning label
|
|
|
|
\param warningText the text of the warning label
|
|
|
|
%End
|
|
|
|
|
|
|
|
void setBasicText( const QString &basicText );
|
|
|
|
%Docstring
|
|
|
|
setBasicText set the text of the warning label
|
2017-09-30 08:59:07 +02:00
|
|
|
\param basicText the text of the basic tab label
|
2017-09-29 17:34:59 +02:00
|
|
|
%End
|
|
|
|
|
|
|
|
const QString username( ) const;
|
|
|
|
%Docstring
|
|
|
|
username
|
|
|
|
:return: basic authentication username
|
|
|
|
:rtype: str
|
|
|
|
%End
|
|
|
|
|
2017-10-02 14:20:44 +02:00
|
|
|
void setUsername( const QString &username );
|
|
|
|
%Docstring
|
|
|
|
setUsername set the username
|
|
|
|
\param username the user name
|
|
|
|
%End
|
|
|
|
|
2017-09-29 17:34:59 +02:00
|
|
|
const QString password( ) const;
|
|
|
|
%Docstring
|
|
|
|
password
|
|
|
|
:return: basic authentication password
|
|
|
|
:rtype: str
|
|
|
|
%End
|
|
|
|
|
2017-10-02 14:20:44 +02:00
|
|
|
void setPassword( const QString &password );
|
|
|
|
%Docstring
|
|
|
|
setPassword set the password
|
|
|
|
\param password the password
|
|
|
|
%End
|
|
|
|
|
|
|
|
void setConfigId( const QString &configId );
|
|
|
|
%Docstring
|
|
|
|
setConfigId set the authentication configuration id
|
|
|
|
param configId the authentication configuration id
|
|
|
|
%End
|
|
|
|
|
2017-09-29 17:34:59 +02:00
|
|
|
const QString configId( ) const;
|
|
|
|
%Docstring
|
|
|
|
configId
|
|
|
|
:return: authentication configuration id
|
|
|
|
:rtype: str
|
|
|
|
%End
|
|
|
|
|
|
|
|
int currentTabIndex( ) const;
|
|
|
|
%Docstring
|
|
|
|
currentTabIndex, mainly useful for unit tests
|
|
|
|
:return: active tab index
|
|
|
|
:rtype: int
|
|
|
|
%End
|
|
|
|
|
|
|
|
bool btnConvertToEncryptedIsEnabled( ) const;
|
|
|
|
%Docstring
|
|
|
|
convertButtonEnabled, mainly useful for unit tests
|
|
|
|
:return: true if the convert button is enabled
|
|
|
|
:rtype: bool
|
|
|
|
%End
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
2017-10-02 12:26:15 +02:00
|
|
|
bool convertToEncrypted( );
|
2017-09-29 17:34:59 +02:00
|
|
|
%Docstring
|
2017-10-02 12:26:15 +02:00
|
|
|
convertToEncrypted is called when the convert to encrypted button is
|
|
|
|
clicked and it creates a Basic authentication configuration from
|
2017-09-29 17:34:59 +02:00
|
|
|
username and password specified in the Basic tab
|
|
|
|
:return: return true on success
|
|
|
|
:rtype: bool
|
|
|
|
%End
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-09-29 12:16:28 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
2017-09-30 08:59:07 +02:00
|
|
|
* src/gui/auth/qgsauthsettingswidget.h *
|
2017-09-29 12:16:28 +02:00
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|