QtPass 2.0.0
Developer documentation
Loading...
Searching...
No Matches
SecretTextBrowser Class Reference

A QTextBrowser for decrypted entry text: whatever is copied out of it is marked as a secret and reported for autoclear. More...

#include <secrettextbrowser.h>

Inheritance diagram for SecretTextBrowser:
Collaboration diagram for SecretTextBrowser:

Signals

void copied (const QString &text)
 Selected text was copied out of the browser.

Public Member Functions

 SecretTextBrowser (QWidget *parent=nullptr)
 Constructs the browser.

Protected Member Functions

auto createMimeDataFromSelection () const -> QMimeData *override
 The selection as secret-marked plain text.

Detailed Description

A QTextBrowser for decrypted entry text: whatever is copied out of it is marked as a secret and reported for autoclear.

Every way text leaves a QTextEdit (Ctrl+C, the context menu's Copy, a drag, and the X11 primary selection a mouse selection fills) goes through createMimeDataFromSelection(). Here that builds the same MIME data as ClipboardManager, with the platform hints that keep clipboard history and cloud clipboard out, and emits copied() so the text is cleared with the rest when the autoclear timer runs.

Definition at line 26 of file secrettextbrowser.h.

Constructor & Destructor Documentation

◆ SecretTextBrowser()

SecretTextBrowser::SecretTextBrowser ( QWidget * parent = nullptr)
explicit

Constructs the browser.

Parameters
parentOwner.

Definition at line 12 of file secrettextbrowser.cpp.

Here is the caller graph for this function:

Member Function Documentation

◆ copied

void SecretTextBrowser::copied ( const QString & text)
signal

Selected text was copied out of the browser.

Parameters
textThe text, as put on the clipboard or in the drag.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ createMimeDataFromSelection()

auto SecretTextBrowser::createMimeDataFromSelection ( ) const -> QMimeData *
nodiscardoverrideprotected

The selection as secret-marked plain text.

Returns
MIME data from buildClipboardMimeData(); the caller owns it.

Definition at line 14 of file secrettextbrowser.cpp.

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 files: