QtPass
2.0.0
Developer documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
qpushbuttonshowpassword.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: 2020 Anne Jan Brouwer
2
// SPDX-License-Identifier: GPL-3.0-or-later
8
#ifndef SRC_QPUSHBUTTONSHOWPASSWORD_H_
9
#define SRC_QPUSHBUTTONSHOWPASSWORD_H_
10
11
#include <QLineEdit>
12
#include <QPushButton>
13
14
class
QWidget;
28
class
QPushButtonShowPassword
:
public
QPushButton {
29
Q_OBJECT
30
31
public
:
37
explicit
QPushButtonShowPassword
(QLineEdit *
line
, QWidget *parent =
nullptr
);
38
39
private
slots:
45
void
buttonClicked
(
bool
checked);
46
47
private
:
49
QIcon
iconEdit
;
51
QIcon
iconEditPushed
;
54
QLineEdit *
line
;
55
};
56
57
#endif
// SRC_QPUSHBUTTONSHOWPASSWORD_H_
QPushButtonShowPassword::QPushButtonShowPassword
QPushButtonShowPassword(QLineEdit *line, QWidget *parent=nullptr)
Construct a show-password button linked to the given QLineEdit.
Definition
qpushbuttonshowpassword.cpp:11
QPushButtonShowPassword::iconEditPushed
QIcon iconEditPushed
view-hidden icon shown while the password is revealed.
Definition
qpushbuttonshowpassword.h:51
QPushButtonShowPassword::iconEdit
QIcon iconEdit
view-visible icon shown while the password is hidden.
Definition
qpushbuttonshowpassword.h:49
QPushButtonShowPassword::buttonClicked
void buttonClicked(bool checked)
Connected to QPushButton::clicked(bool); flips the echo mode of line and updates icon,...
Definition
qpushbuttonshowpassword.cpp:27
QPushButtonShowPassword::line
QLineEdit * line
The line edit being toggled; owned by the caller, must outlive this button.
Definition
qpushbuttonshowpassword.h:54
src
qpushbuttonshowpassword.h
Generated by
1.18.0