|
QtPass 1.7.0
Multi-platform GUI for pass, the standard unix password manager.
|
Main application window orchestrating UI, user interactions, and external process handlers. More...
#include <mainwindow.h>
Public Slots | |
| void | deselect () |
| Clear the current tree view selection. | |
| void | messageAvailable (const QString &message) |
| Handle an incoming inter-process message (single-instance mode). | |
| void | critical (const QString &title, const QString &msg) |
| Display a critical error dialog. | |
| void | executeWrapperStarted () |
| Slot called when an external process wrapper has started. | |
| void | showStatusMessage (const QString &msg, int timeout=2000) |
| Show a message in the status bar for the given duration. | |
| void | passShowHandler (const QString &output) |
| Handle output from the pass show command. | |
| void | passOtpHandler (const QString &output) |
| Handle output from the pass OTP command. | |
| void | onGrepFinished (const QList< QPair< QString, QStringList > > &results) |
| Handle results from a completed grep search. | |
| void | onPush () |
| Trigger a git push operation. | |
| void | on_treeView_clicked (const QModelIndex &index) |
| Handle a click on an item in the tree view. | |
| void | startReencryptPath () |
| Begin a re-encryption pass on the current path. | |
| void | endReencryptPath () |
| Finish a re-encryption pass on the current path. | |
Signals | |
| void | passShowHandlerFinished (const QString &output) |
| Emitted when the pass show handler has finished decrypting. | |
| void | passGitInitNeeded () |
| Emitted when a Git init is required for the current store. | |
| void | generateGPGKeyPair (const QString &batch) |
| Emitted to trigger GPG key pair generation. | |
Public Member Functions | |
| MainWindow (const QString &searchText=QString(), QWidget *parent=nullptr) | |
| Construct the main window. | |
| void | restoreWindow () |
| Restore window geometry and state from saved settings. | |
| void | generateKeyPair (const QString &batch, QDialog *dialog) |
| Open the GPG key generation dialog. | |
| void | userDialog (const QString &dir="") |
| Open the user/recipient management dialog. | |
| void | config () |
| Open the configuration dialog. | |
| void | setUiElementsEnabled (bool state) |
| Enable or disable the main UI elements. | |
| void | flashText (const QString &text, const bool isError, const bool isHtml=false) |
| Display a transient message in the text panel. | |
| auto | getCurrentTreeViewIndex () -> QModelIndex |
| Return the currently selected index in the tree view. | |
| auto | getKeygenDialog () -> QDialog * |
| Return the active key generation dialog, if any. | |
| void | cleanKeygenDialog () |
| Destroy and clear the key generation dialog. | |
Protected Member Functions | |
| void | closeEvent (QCloseEvent *event) override |
| Save window state and geometry on close. | |
| void | keyPressEvent (QKeyEvent *event) override |
| Handle keyboard shortcuts. | |
| void | changeEvent (QEvent *event) override |
| React to language or window state changes. | |
| auto | eventFilter (QObject *obj, QEvent *event) -> bool override |
| Filter events from watched objects. | |
Main application window orchestrating UI, user interactions, and external process handlers.
Provides the central interface for managing items, folders, passwords, and OTPs; coordinates UI components (toolbars, panels, dialogs, status/tray), selection and navigation in the underlying file/store models, and lifecycle interactions with external handlers (e.g., pass, Git, GPG key generation, OTP).
Definition at line 45 of file mainwindow.h.
|
explicit |
Construct the main window.
| searchText | Initial search text to populate the search field. |
| parent | Optional parent widget. |
|
overrideprotected |
React to language or window state changes.
| event | The change event. |
|
overrideprotected |
Save window state and geometry on close.
| event | The close event. |
|
slot |
Display a critical error dialog.
| title | Dialog title. |
| msg | Error message body. |
|
overrideprotected |
Filter events from watched objects.
| obj | The object that received the event. |
| event | The event to filter. |
| void MainWindow::flashText | ( | const QString & | text, |
| const bool | isError, | ||
| const bool | isHtml = false ) |
Display a transient message in the text panel.
| text | Message text to display. |
| isError | true to style the message as an error. |
| isHtml | true if text contains HTML markup. |
|
signal |
Emitted to trigger GPG key pair generation.
| batch | GPG batch parameter string. |
| void MainWindow::generateKeyPair | ( | const QString & | batch, |
| QDialog * | dialog ) |
Open the GPG key generation dialog.
| batch | GPG batch parameter string. |
| dialog | Dialog to store as the active keygen dialog; it is kept as activeKeygenDialog and represents the UI used during generation. |
| auto MainWindow::getCurrentTreeViewIndex | ( | ) | -> QModelIndex |
Return the currently selected index in the tree view.
|
inline |
Return the active key generation dialog, if any.
Definition at line 107 of file mainwindow.h.
|
overrideprotected |
Handle keyboard shortcuts.
| event | The key press event. |
|
slot |
Handle an incoming inter-process message (single-instance mode).
| message | Message string received from another instance. |
|
slot |
Handle a click on an item in the tree view.
| index | The model index that was clicked. |
|
slot |
Handle results from a completed grep search.
| results | List of file/match pairs from the grep operation. |
|
slot |
Handle output from the pass OTP command.
| output | OTP output string. |
|
slot |
Handle output from the pass show command.
| output | Decrypted password file content. |
|
signal |
Emitted when the pass show handler has finished decrypting.
| output | Decrypted password file content. |
| void MainWindow::setUiElementsEnabled | ( | bool | state | ) |
Enable or disable the main UI elements.
| state | true to enable, false to disable. |
|
slot |
Show a message in the status bar for the given duration.
| msg | Message to display. |
| timeout | Duration in milliseconds (default 2000). |
| void MainWindow::userDialog | ( | const QString & | dir = "" | ) |
Open the user/recipient management dialog.
| dir | Directory for which to manage recipients. |