QtPass 1.4.0
Multi-platform GUI for pass, the standard unix password manager.
Loading...
Searching...
No Matches
qpushbuttonasqrcode.cpp
Go to the documentation of this file.
2#include <QTimer>
3
13 QWidget *parent)
14 : QPushButton(parent), textToCopy(textToCopy),
15 iconEdit(QIcon::fromTheme("qrcode", QIcon(":/icons/qrcode.svg"))) {
16 setIcon(iconEdit);
17 connect(this, SIGNAL(clicked(bool)), this, SLOT(buttonClicked(bool)));
18}
19
25QString QPushButtonAsQRCode::getTextToCopy() const { return textToCopy; }
26
32void QPushButtonAsQRCode::setTextToCopy(const QString &value) {
33 textToCopy = value;
34}
35
40void QPushButtonAsQRCode::buttonClicked(bool) { emit clicked(textToCopy); }
41
46void QPushButtonAsQRCode::changeIconDefault() { this->setIcon(iconEdit); }
QPushButtonAsQRCode(const QString &textToCopy="", QWidget *parent=nullptr)
QPushButtonAsQRCode::QPushButtonAsQRCode basic constructor.
QString getTextToCopy() const
QPushButtonAsQRCode::getTextToCopy returns the text of associated text field.
void setTextToCopy(const QString &value)
QPushButtonAsQRCode::setTextToCopy sets text from associated text field.
void clicked(QString)