QtPass
2.0.0
Developer documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
qpushbuttonasqrcode.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: 2016 Anne Jan Brouwer
2
// SPDX-License-Identifier: GPL-3.0-or-later
7
#ifndef SRC_QPUSHBUTTONASQRCODE_H_
8
#define SRC_QPUSHBUTTONASQRCODE_H_
9
10
#include <QPushButton>
11
23
class
QWidget;
24
class
QPushButtonAsQRCode
:
public
QPushButton {
25
Q_OBJECT
26
27
public
:
33
explicit
QPushButtonAsQRCode
(QString
textToCopy
=
""
,
34
QWidget *parent =
nullptr
);
35
40
[[nodiscard]]
auto
getTextToCopy
()
const
-> QString;
45
void
setTextToCopy
(
const
QString &value);
46
47
signals:
52
void
clicked
(
const
QString &text);
53
54
private
:
60
void
buttonClicked
(
bool
checked);
61
62
private
:
64
QString
textToCopy
;
66
QIcon
iconEdit
;
67
};
68
69
#endif
// SRC_QPUSHBUTTONASQRCODE_H_
QPushButtonAsQRCode::buttonClicked
void buttonClicked(bool checked)
Connected to QPushButton::clicked(bool); re-emits the overload carrying the stored text so receivers ...
Definition
qpushbuttonasqrcode.cpp:31
QPushButtonAsQRCode::clicked
void clicked(const QString &text)
Emitted when the button is activated with the current text payload.
QPushButtonAsQRCode::QPushButtonAsQRCode
QPushButtonAsQRCode(QString textToCopy="", QWidget *parent=nullptr)
Construct a QPushButtonAsQRCode with an optional initial text.
Definition
qpushbuttonasqrcode.cpp:11
QPushButtonAsQRCode::iconEdit
QIcon iconEdit
The qrcode icon shown on the button.
Definition
qpushbuttonasqrcode.h:66
QPushButtonAsQRCode::textToCopy
QString textToCopy
Text to be rendered as a QR code; set by the owning panel.
Definition
qpushbuttonasqrcode.h:64
QPushButtonAsQRCode::setTextToCopy
void setTextToCopy(const QString &value)
Update the stored text used for QR-code actions.
Definition
qpushbuttonasqrcode.cpp:27
QPushButtonAsQRCode::getTextToCopy
auto getTextToCopy() const -> QString
Return the stored text used for QR-code actions.
Definition
qpushbuttonasqrcode.cpp:23
src
qpushbuttonasqrcode.h
Generated by
1.18.0