QGIS API Documentation
4.3.0-Master (52aa6503bed)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gui
qgspasswordlineedit.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgspasswordlineedit.h
3
------------------------
4
begin : March 13, 2017
5
copyright : (C) 2017 by Alexander Bruy
6
email : alexander dot bruy at gmail dot com
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
18
#ifndef QGSPASSWORDLINEEDIT_H
19
#define QGSPASSWORDLINEEDIT_H
20
21
#include "qgis_gui.h"
22
23
#include <QAction>
24
#include <QLineEdit>
25
32
class
GUI_EXPORT
QgsPasswordLineEdit
:
public
QLineEdit
33
{
34
Q_OBJECT
35
Q_PROPERTY(
bool
showLockIcon
READ
showLockIcon
WRITE
setShowLockIcon
)
36
37
public
:
43
QgsPasswordLineEdit
( QWidget *parent =
nullptr
,
bool
passwordVisible =
false
);
44
49
void
setShowLockIcon
(
bool
visible );
50
54
bool
showLockIcon
()
const
{
return
mLockIconVisible; }
55
59
void
setPasswordVisibility(
bool
visible );
60
61
private
slots:
62
void
togglePasswordVisibility(
bool
toggled );
63
64
private
:
65
QAction *mActionShowHidePassword =
nullptr
;
66
QAction *mActionLock =
nullptr
;
67
68
QIcon mShowPasswordIcon;
69
QIcon mHidePasswordIcon;
70
71
bool
mLockIconVisible =
false
;
72
QSize mIconsSize;
73
};
74
75
#endif
// QGSPASSWORDLINEEDIT_H
QgsPasswordLineEdit::showLockIcon
bool showLockIcon
Definition
qgspasswordlineedit.h:35
QgsPasswordLineEdit::QgsPasswordLineEdit
QgsPasswordLineEdit(QWidget *parent=nullptr, bool passwordVisible=false)
Constructor for QgsPasswordLineEdit.
Definition
qgspasswordlineedit.cpp:28
QgsPasswordLineEdit::showLockIcon
bool showLockIcon() const
Returns if a lock icon shall be shown on the left of the widget.
Definition
qgspasswordlineedit.h:54
QgsPasswordLineEdit::setShowLockIcon
void setShowLockIcon(bool visible)
Define if a lock icon shall be shown on the left of the widget.
Definition
qgspasswordlineedit.cpp:67
Generated on
for QGIS API Documentation by
1.17.0