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:
53
void
textClicked
(
const
QString &text);
54
55
private
:
61
void
buttonClicked
(
bool
checked);
62
63
private
:
65
QString
textToCopy
;
67
QIcon
iconEdit
;
68
};
69
70
#endif
// SRC_QPUSHBUTTONASQRCODE_H_
QPushButtonAsQRCode::buttonClicked
void buttonClicked(bool checked)
Connected to QPushButton::clicked(bool); emits textClicked() with the stored text so receivers do not...
Definition
qpushbuttonasqrcode.cpp:31
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:67
QPushButtonAsQRCode::textToCopy
QString textToCopy
Text to be rendered as a QR code; set by the owning panel.
Definition
qpushbuttonasqrcode.h:65
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
QPushButtonAsQRCode::textClicked
void textClicked(const QString &text)
Emitted when the button is activated with the current text payload. Not named clicked(): that would h...
src
qpushbuttonasqrcode.h
Generated by
1.18.0