QtPass 1.7.0
Multi-platform GUI for pass, the standard unix password manager.
Loading...
Searching...
No Matches
QPushButtonWithClipboard Class Reference

QPushButton that stores a text payload and emits it when activated. More...

#include <qpushbuttonwithclipboard.h>

Inheritance diagram for QPushButtonWithClipboard:
Collaboration diagram for QPushButtonWithClipboard:

Signals

void clicked (const QString &text)
 Emitted when the button is activated with the stored text.

Public Member Functions

 QPushButtonWithClipboard (QString textToCopy="", QWidget *parent=nullptr)
 Construct a QPushButtonWithClipboard with an optional initial text.
auto getTextToCopy () const -> QString
 Return the stored text used for copying.
void setTextToCopy (const QString &value)
 Update the stored text used for copying.

Detailed Description

QPushButton that stores a text payload and emits it when activated.

Definition at line 13 of file qpushbuttonwithclipboard.h.

Constructor & Destructor Documentation

◆ QPushButtonWithClipboard()

QPushButtonWithClipboard::QPushButtonWithClipboard ( QString textToCopy = "",
QWidget * parent = nullptr )
explicit

Construct a QPushButtonWithClipboard with an optional initial text.

Parameters
textToCopyInitial text to store and emit on activation.
parentOptional parent widget.

Member Function Documentation

◆ clicked

void QPushButtonWithClipboard::clicked ( const QString & text)
signal

Emitted when the button is activated with the stored text.

Parameters
textThe stored text associated with this button.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getTextToCopy()

auto QPushButtonWithClipboard::getTextToCopy ( ) const -> QString
nodiscard

Return the stored text used for copying.

Returns
The current stored text.

◆ setTextToCopy()

void QPushButtonWithClipboard::setTextToCopy ( const QString & value)

Update the stored text used for copying.

Parameters
valueThe new text to store.
Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: