QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
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 
33 class GUI_EXPORT QgsAuthConfigEdit : public QDialog, private Ui::QgsAuthConfigEdit
34 {
35  Q_OBJECT
36 
37  public:
39  enum Validity
40  {
44  };
45 
52  explicit QgsAuthConfigEdit( QWidget *parent = nullptr, const QString& authcfg = QString(),
53  const QString &dataprovider = QString() );
55 
57  const QString configId() const { return mAuthCfg; }
58 
59  signals:
61  void authenticationConfigStored( const QString& authcfg );
62 
64  void authenticationConfigUpdated( const QString& authcfg );
65 
66  private slots:
67  void populateAuthMethods();
68 
69  void loadConfig();
70  void resetConfig();
71  void saveConfig();
72 
73  void on_btnClear_clicked();
74  void clearAll();
75 
76  void validateAuth();
77 
78  void on_leName_textChanged( const QString& txt );
79 
80  private:
81  int authMethodIndex( const QString &authMethodKey );
82 
83  QgsAuthMethodEdit *currentEditWidget();
84 
85  QString mAuthCfg;
86  QString mDataProvider;
87  QVBoxLayout *mAuthNotifyLayout;
88  QLabel *mAuthNotify;
89 };
90 
91 #endif // QGSAUTHCONFIGEDIT_H
Abstract base class for the edit widget of authentication method plugins.
Validity
Type of configuration validity.
Widget for editing an authentication configuration.
const QString configId() const
Authentication config id, updated with generated id when a new config is saved to auth database...