QGIS API Documentation 3.41.0-Master (57ec4277f5e)
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:
44 explicit QgsAuthConfigIdEdit( QWidget *parent = nullptr, const QString &authcfg = QString(), bool allowEmpty = true );
45
47 QString const configId();
48
50 bool allowEmptyId() { return mAllowEmpty; }
51
53 bool validate();
54
55 signals:
57 void validityChanged( bool valid );
58
59 public slots:
61 void setAuthConfigId( const QString &authcfg );
62
64 void setAllowEmptyId( bool allowed );
65
67 void clear();
68
69 private slots:
70 void updateValidityStyle( bool valid );
71
72 void btnLock_toggled( bool checked );
73
74 void leAuthCfg_textChanged( const QString &txt );
75
76 private:
77 bool isAlphaNumeric( const QString &authcfg );
78
79 QString mAuthCfgOrig;
80 bool mValid = false;
81 bool mAllowEmpty;
82};
83
84#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.