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
signals:
44
void
clicked
(
const
QString &text);
45
46
private
slots:
52
void
buttonClicked
(
bool
checked);
53
54
private
:
56
QIcon
iconEdit
;
58
QIcon
iconEditPushed
;
61
QLineEdit *
line
;
62
};
63
64
#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:58
QPushButtonShowPassword::iconEdit
QIcon iconEdit
view-visible icon shown while the password is hidden.
Definition
qpushbuttonshowpassword.h:56
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:61
QPushButtonShowPassword::clicked
void clicked(const QString &text)
Emitted on button activation with the current text of the line edit.
src
qpushbuttonshowpassword.h
Generated by
1.18.0