QtPass 1.7.0
Multi-platform GUI for pass, the standard unix password manager.
Loading...
Searching...
No Matches
qpushbuttonasqrcode.h
1// SPDX-FileCopyrightText: 2016 Anne Jan Brouwer
2// SPDX-License-Identifier: GPL-3.0-or-later
3#ifndef SRC_QPUSHBUTTONASQRCODE_H_
4#define SRC_QPUSHBUTTONASQRCODE_H_
5
6#include <QPushButton>
7
12class QWidget;
13class QPushButtonAsQRCode : public QPushButton {
14 Q_OBJECT
15
16public:
22 explicit QPushButtonAsQRCode(QString textToCopy = "",
23 QWidget *parent = nullptr);
24
29 [[nodiscard]] auto getTextToCopy() const -> QString;
34 void setTextToCopy(const QString &value);
35
36signals:
41 void clicked(const QString &text);
42
43private:
44 void buttonClicked(bool);
45
46private:
47 QString textToCopy;
48 QIcon iconEdit;
49};
50
51#endif // SRC_QPUSHBUTTONASQRCODE_H_
void clicked(const QString &text)
Emitted when the button is activated with the current text payload.
QPushButtonAsQRCode(QString textToCopy="", QWidget *parent=nullptr)
Construct a QPushButtonAsQRCode with an optional initial text.
void setTextToCopy(const QString &value)
Update the stored text used for QR-code actions.
auto getTextToCopy() const -> QString
Return the stored text used for QR-code actions.