#include <QDialog>
#include <QMimeData>
#include <QObject>
#include <QPixmap>
#include <QProcess>
#include <QTimer>
Go to the source code of this file.
|
| auto | buildClipboardMimeData (const QString &text) -> QMimeData * |
| | Build clipboard MIME data with platform-specific security hints.
|
◆ buildClipboardMimeData()
| auto buildClipboardMimeData |
( |
const QString & | text | ) |
-> QMimeData * |
Build clipboard MIME data with platform-specific security hints.
Construct a QtPass instance associated with the given main window.
- Parameters
-
| mainWindow | Pointer to the application's MainWindow used for UI interactions. Destroy the QtPass instance and perform necessary cleanup. Initialize internal state and connections required for QtPass operation. |
- Returns
- true if initialization succeeded, false otherwise. Update the tracked clipped text value.
- Parameters
-
| text | Primary text to store as clipped content. |
| p_output | Optional additional output text used when computing the clipped value. Remove any stored clipped text value. Configure and start the timer that will clear the system clipboard after a delay. Return whether this instance was created in a fresh-start state. |
- Returns
- true if in fresh-start state, false otherwise. Set the fresh-start state for this instance.
- Parameters
-
| fs | New fresh-start state value. Set up internal references and Qt connections related to the associated MainWindow. Connect QtPass handlers to the provided Pass instance's signals. |
| pass | Pointer to the Pass instance whose signals will be connected. Perform WebDAV mounting operations required by the application. Clear the system clipboard contents immediately. Copy the provided text into the system clipboard and trigger any clipboard lifecycle handling. |
| text | Text to copy into the clipboard. Request display of the provided text as a QR code in the UI. |
| text | Text to convert into a QR code for display. Create a modal dialog configured to display the given QR code image. |
| image | Pixmap containing the rendered QR code. |
- Returns
- Pointer to a QDialog configured to show the provided image. Handle errors reported by the internal QProcess instance.
- Parameters
-
| error | The process error code emitted by QProcess. Handle an external process exiting with an error code and message. |
| exitCode | Numeric exit code returned by the process. |
| message | Associated error or status message from the process. Handle completion of an external process and provide its stdout and stderr. |
| stdout | Output captured from the process's standard output. |
| stderr | Output captured from the process's standard error. React to changes in the pass store and update relevant UI/state. |
| arg1 | First string parameter describing the change (context-specific). |
| arg2 | Second string parameter describing the change (context-specific). Handle completion of a "pass show" handler and process its output. |
| output | Output produced by the pass show handler. Initiate a Git push operation for the repository managed by the application. Handle completion of an insert operation and react to its outputs. |
| arg1 | First result string related to the insert operation. |
| arg2 | Second result string related to the insert operation. Handle completion of a key generation operation and its outputs. |
| p_output | Standard output produced during key generation. |
| p_errout | Standard error produced during key generation. Display the provided output string inside the application's text browser widget, optionally wrapping with prefix and postfix strings. |
| output | Text to display in the text browser. |
| prefix | Optional prefix to prepend to the output before display. |
| postfix | Optional postfix to append to the output before display. |
| text | - Plain text to copy |
- Returns
- QMimeData* - Ownership transferred to caller. Caller must delete or transfer to QClipboard::setMimeData which takes ownership.
- Parameters
-
- Returns
- QMimeData with text and security hints
Definition at line 477 of file qtpass.cpp.