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