blob: 0004d23896f832b0c40f91431eadf0c19866f6b1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#ifndef QPUSHBUTTONWITHCLIPBOARD_H_
#define QPUSHBUTTONWITHCLIPBOARD_H_
#include <QPushButton>
/*!
\class QPushButtonWithClipboard
\brief Stylish widget to allow copying of password and account details
*/
class QWidget;
class QPushButtonWithClipboard : public QPushButton {
Q_OBJECT
public:
explicit QPushButtonWithClipboard(const QString &textToCopy = "",
QWidget *parent = nullptr);
QString getTextToCopy() const;
void setTextToCopy(const QString &value);
signals:
void clicked(QString);
private slots:
void changeIconDefault();
void buttonClicked(bool);
private:
QString textToCopy;
QIcon iconEdit;
QIcon iconEditPushed;
};
#endif // QPUSHBUTTONWITHCLIPBOARD_H_
|