QGIS API Documentation
2.2.0-Valmiera
|
Interface for requesting credentials in QGIS in GUI independent way. More...
#include <qgscredentials.h>
Public Member Functions | |
virtual | ~QgsCredentials () |
virtual destructor | |
bool | get (QString realm, QString &username, QString &password, QString message=QString::null) |
void | put (QString realm, QString username, QString password) |
Static Public Member Functions | |
static QgsCredentials * | instance () |
retrieves instance |
Protected Member Functions | |
virtual bool | request (QString realm, QString &username, QString &password, QString message=QString::null)=0 |
request a password | |
void | setInstance (QgsCredentials *theInstance) |
register instance |
Private Attributes | |
QMap< QString, QPair< QString, QString > > | mCredentialCache |
cache for already requested credentials in this session |
Static Private Attributes | |
static QgsCredentials * | smInstance = 0 |
Pointer to the credential instance. |
Interface for requesting credentials in QGIS in GUI independent way.
This class provides abstraction of a dialog for requesting credentials to the user. By default QgsCredentials will be used if not overridden with other credential creator function.
QGIS application uses QgsCredentialDialog class for displaying a dialog to the user.
Object deletes itself when it's not needed anymore. Children should use signal destroyed() to be notified of the deletion
Definition at line 36 of file qgscredentials.h.
|
virtual |
virtual destructor
Definition at line 42 of file qgscredentials.cpp.
bool QgsCredentials::get | ( | QString | realm, |
QString & | username, | ||
QString & | password, | ||
QString | message = QString::null |
||
) |
Definition at line 46 of file qgscredentials.cpp.
References mCredentialCache, QgsDebugMsg, and request().
|
static |
void QgsCredentials::put | ( | QString | realm, |
QString | username, | ||
QString | password | ||
) |
Definition at line 68 of file qgscredentials.cpp.
References mCredentialCache, and QgsDebugMsg.
|
protectedpure virtual |
request a password
Implemented in QgsCredentialsConsole, and QgsCredentialDialog.
Referenced by get().
|
protected |
register instance
Definition at line 24 of file qgscredentials.cpp.
References QgsDebugMsg, and smInstance.
Referenced by QgsCredentialDialog::QgsCredentialDialog(), and QgsCredentialsConsole::QgsCredentialsConsole().
|
private |
cache for already requested credentials in this session
Definition at line 57 of file qgscredentials.h.
|
staticprivate |
Pointer to the credential instance.
Definition at line 60 of file qgscredentials.h.
Referenced by instance(), and setInstance().