QtPass  1.2.0
Multi-platform GUI for pass, the standard unix password manager.
qpushbuttonwithclipboard.h
Go to the documentation of this file.
1 #ifndef QPUSHBUTTONWITHCLIPBOARD_H_
2 #define QPUSHBUTTONWITHCLIPBOARD_H_
3 
4 #include <QPushButton>
5 #include <QWidget>
6 
11 class QPushButtonWithClipboard : public QPushButton {
12  Q_OBJECT
13 
14 public:
15  explicit QPushButtonWithClipboard(const QString &textToCopy = "",
16  QWidget *parent = 0);
17 
18  QString getTextToCopy() const;
19  void setTextToCopy(const QString &value);
20 
21 signals:
22  void clicked(QString);
23 
24 private slots:
25  void changeIconDefault();
26  void buttonClicked(bool);
27 
28 private:
29  QString textToCopy;
30  QIcon iconEdit;
31  QIcon iconEditPushed;
32 };
33 
34 #endif // QPUSHBUTTONWITHCLIPBOARD_H_
Stylish widget to allow copying of password and account details.
QPushButtonWithClipboard(const QString &textToCopy="", QWidget *parent=0)
QPushButtonWithClipboard::QPushButtonWithClipboard basic constructor.
QString getTextToCopy() const
QPushButtonWithClipboard::getTextToCopy returns the text of associated text field.
void setTextToCopy(const QString &value)
QPushButtonWithClipboard::setTextToCopy sets text from associated text field.