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

Stylish widget to allow copying of password and account details. More...

#include <qpushbuttonwithclipboard.h>

Inheritance diagram for QPushButtonWithClipboard:
Collaboration diagram for QPushButtonWithClipboard:

Signals

void clicked (const QString &)

Public Member Functions

 QPushButtonWithClipboard (QString textToCopy="", QWidget *parent=nullptr)
 QPushButtonWithClipboard::QPushButtonWithClipboard basic constructor.
auto getTextToCopy () const -> QString
 QPushButtonWithClipboard::getTextToCopy returns the text of associated text field.
void setTextToCopy (const QString &value)
 QPushButtonWithClipboard::setTextToCopy sets text from associated text field.

Detailed Description

Stylish widget to allow copying of password and account details.

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

The button is intended for copying or emitting password/account details and toggles between default and pushed icon states. Construct a QPushButtonWithClipboard and initialize the stored text.

Parameters
textToCopyInitial text to store and emit when the button is activated.
parentOptional parent widget. Retrieve the stored text used for copying or emission.
Returns
QString containing the current stored text. Update the stored text used for copying or emission.
Parameters
valueThe new text to store. Emitted when the button is activated with its associated text.
textThe stored text associated with this button. Restore the button's icon to its default appearance. Handle the button's clicked/pressed state and emit the stored text when appropriate.
checkedWhether the button is in the pressed/checked state.

Definition at line 52 of file qpushbuttonwithclipboard.h.

Constructor & Destructor Documentation

◆ QPushButtonWithClipboard()

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

QPushButtonWithClipboard::QPushButtonWithClipboard basic constructor.

Parameters
textToCopythe text to paste into the clipboard
parentthe parent window

Definition at line 15 of file qpushbuttonwithclipboard.cpp.

Member Function Documentation

◆ clicked

void QPushButtonWithClipboard::clicked ( const QString & )
signal

◆ getTextToCopy()

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

QPushButtonWithClipboard::getTextToCopy returns the text of associated text field.

Returns
QString textToCopy

Definition at line 32 of file qpushbuttonwithclipboard.cpp.

◆ setTextToCopy()

void QPushButtonWithClipboard::setTextToCopy ( const QString & value)

QPushButtonWithClipboard::setTextToCopy sets text from associated text field.

Parameters
valueQString text to be copied

Definition at line 41 of file qpushbuttonwithclipboard.cpp.


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