QGIS API Documentation  2.12.0-Lyon
qgscredentialdialog.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgscredentialdialog.h - description
3  -------------------
4  begin : February 2010
5  copyright : (C) 2010 by Juergen E. Fischer
6  email : jef at norbit dot de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 #ifndef QGSCREDENTIALDIALOG_H
18 #define QGSCREDENTIALDIALOG_H
19 
20 #include <ui_qgscredentialdialog.h>
21 #include <qgisgui.h>
22 #include "qgscredentials.h"
23 
24 #include <QString>
25 
26 class QPushButton;
27 
31 class GUI_EXPORT QgsCredentialDialog : public QDialog, public QgsCredentials, private Ui_QgsCredentialDialog
32 {
33  Q_OBJECT
34  public:
37 
38  signals:
39  void credentialsRequested( QString, QString *, QString *, QString, bool * );
40 
41  void credentialsRequestedMasterPassword( QString *, bool, bool * );
42 
43  private slots:
44  void requestCredentials( const QString&, QString *, QString *, const QString&, bool * );
45 
46  void requestCredentialsMasterPassword( QString *password, bool stored, bool *ok );
47 
48  void on_chkMasterPassShow_stateChanged( int state );
49  void on_leMasterPass_textChanged( const QString& pass );
50  void on_leMasterPassVerify_textChanged( const QString& pass );
51  void on_chkbxEraseAuthDb_toggled( bool checked );
52 
53  protected:
54  virtual bool request( const QString& realm, QString &username, QString &password, const QString& message = QString::null ) override;
55 
56  virtual bool requestMasterPassword( QString &password, bool stored = false ) override;
57 
58  private:
59  QPushButton *mOkButton;
60 };
61 
62 #endif
static const Qt::WindowFlags ModalDialogFlags
Definition: qgisgui.h:49
Interface for requesting credentials in QGIS in GUI independent way.
virtual bool requestMasterPassword(QString &password, bool stored=false)=0
request a master password
virtual bool request(const QString &realm, QString &username, QString &password, const QString &message=QString::null)=0
request a password
typedef WindowFlags
A generic dialog for requesting credentials.