QPushButton that stores a text payload and emits it when activated.
More...
#include <qpushbuttonwithclipboard.h>
|
| void | clicked (const QString &text) |
| | Emitted when the button is activated with the stored text.
|
|
| void | changeIconDefault () |
| | Restores the default copy icon; fired by a single-shot timer 500 ms after a click.
|
| void | buttonClicked (bool checked) |
| | Connected to QPushButton::clicked(bool); shows the pushed icon, arms the revert timer and re-emits clicked with the stored text.
|
|
| QString | textToCopy |
| | Text handed to receivers on click; set by the owning panel.
|
| QIcon | iconEdit |
| | edit-copy icon shown at rest.
|
| QIcon | iconEditPushed |
| | document-new icon flashed for 500 ms after a click.
|
QPushButton that stores a text payload and emits it when activated.
The button does not touch the clipboard itself. On activation it briefly swaps to a "done" icon (reverted after 500 ms) and re-emits clicked(const QString&) with the stored text; the receiver (normally ClipboardManager via PasswordDisplayPanel) performs the copy and the autoclear bookkeeping.
Definition at line 25 of file qpushbuttonwithclipboard.h.
◆ QPushButtonWithClipboard()
| QPushButtonWithClipboard::QPushButtonWithClipboard |
( |
QString | textToCopy = "", |
|
|
QWidget * | parent = nullptr ) |
|
explicit |
◆ buttonClicked
| void QPushButtonWithClipboard::buttonClicked |
( |
bool | checked | ) |
|
|
privateslot |
Connected to QPushButton::clicked(bool); shows the pushed icon, arms the revert timer and re-emits clicked with the stored text.
- Parameters
-
| checked | Unused; the button is not checkable. |
Definition at line 35 of file qpushbuttonwithclipboard.cpp.
◆ changeIconDefault
| void QPushButtonWithClipboard::changeIconDefault |
( |
| ) |
|
|
privateslot |
◆ clicked
| void QPushButtonWithClipboard::clicked |
( |
const QString & | text | ) |
|
|
signal |
Emitted when the button is activated with the stored text.
- Parameters
-
| text | The stored text associated with this button. |
◆ getTextToCopy()
| auto QPushButtonWithClipboard::getTextToCopy |
( |
| ) |
const -> QString |
|
nodiscard |
◆ setTextToCopy()
| void QPushButtonWithClipboard::setTextToCopy |
( |
const QString & | value | ) |
|
◆ iconEdit
| QIcon QPushButtonWithClipboard::iconEdit |
|
private |
◆ iconEditPushed
| QIcon QPushButtonWithClipboard::iconEditPushed |
|
private |
◆ textToCopy
| QString QPushButtonWithClipboard::textToCopy |
|
private |
The documentation for this class was generated from the following files: