QGIS API Documentation  2.12.0-Lyon
qgsauthconfigedit.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsauthconfigedit.h
3  ---------------------
4  begin : September 1, 2015
5  copyright : (C) 2015 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 
18 #ifndef QGSAUTHCONFIGEDIT_H
19 #define QGSAUTHCONFIGEDIT_H
20 
21 #include <QDialog>
22 
23 #include "ui_qgsauthconfigedit.h"
24 #include "qgsauthconfig.h"
25 
26 class QgsAuthMethodEdit;
27 
28 
32 class GUI_EXPORT QgsAuthConfigEdit : public QDialog, private Ui::QgsAuthConfigEdit
33 {
34  Q_OBJECT
35 
36  public:
38  enum Validity
39  {
43  };
44 
51  explicit QgsAuthConfigEdit( QWidget *parent = 0, const QString& authcfg = QString(),
52  const QString &dataprovider = QString() );
54 
56  const QString configId() const { return mAuthCfg; }
57 
58  signals:
60  void authenticationConfigStored( const QString& authcfg );
61 
63  void authenticationConfigUpdated( const QString& authcfg );
64 
65  private slots:
66  void populateAuthMethods();
67 
68  void loadConfig();
69  void resetConfig();
70  void saveConfig();
71 
72  void on_btnClear_clicked();
73  void clearAll();
74 
75  void validateAuth();
76 
77  void on_leName_textChanged( const QString& txt );
78 
79  private:
80  int authMethodIndex( const QString &authMethodKey );
81 
82  QgsAuthMethodEdit *currentEditWidget();
83 
84  QString mAuthCfg;
85  QString mDataProvider;
86  QVBoxLayout *mAuthNotifyLayout;
87  QLabel *mAuthNotify;
88 };
89 
90 #endif // QGSAUTHCONFIGEDIT_H
Abstract base class for the edit widget of authentication method plugins.
Validity
Type of configuration validity.
const QString configId() const
Authentication config id, updated with generated id when a new config is saved to auth database...
Widget for editing an authentication configuration.