blob: a21b98d3935df87d6b129b8df4cdd14d1665b02e (
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
|
#ifndef QPUSHBUTTONWITHCLIPBOARD_H_
#define QPUSHBUTTONWITHCLIPBOARD_H_
#include <QPushButton>
#include <QWidget>
class QPushButtonWithClipboard : public QPushButton {
Q_OBJECT
public:
explicit QPushButtonWithClipboard(const QString &textToCopy = "",
QWidget *parent = 0);
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_
|