QGIS API Documentation 3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
qgsauthconfigidedit.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsauthconfigidedit.h
3 ---------------------
4 begin : September, 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#ifndef QGSAUTHCONFIGIDEDIT_H
18#define QGSAUTHCONFIGIDEDIT_H
19
20#include "ui_qgsauthconfigidedit.h"
21
22#include <QWidget>
23#include "qgis_gui.h"
24
25#define SIP_NO_FILE
26
33class GUI_EXPORT QgsAuthConfigIdEdit : public QWidget, private Ui::QgsAuthConfigIdEdit
34{
35 Q_OBJECT
36
37 public:
38
45 explicit QgsAuthConfigIdEdit( QWidget *parent = nullptr, const QString &authcfg = QString(), bool allowEmpty = true );
46
48 QString const configId();
49
51 bool allowEmptyId() { return mAllowEmpty;}
52
54 bool validate();
55
56 signals:
58 void validityChanged( bool valid );
59
60 public slots:
62 void setAuthConfigId( const QString &authcfg );
63
65 void setAllowEmptyId( bool allowed );
66
68 void clear();
69
70 private slots:
71 void updateValidityStyle( bool valid );
72
73 void btnLock_toggled( bool checked );
74
75 void leAuthCfg_textChanged( const QString &txt );
76
77 private:
78 bool isAlphaNumeric( const QString &authcfg );
79
80 QString mAuthCfgOrig;
81 bool mValid = false;
82 bool mAllowEmpty;
83};
84
85#endif // QGSAUTHCONFIGIDEDIT_H
Custom widget for editing an authentication configuration ID.
bool allowEmptyId()
Whether to allow no ID to be set.
void validityChanged(bool valid)
Validity of the ID has changed.