36 explicit QtPass(QObject *parent =
nullptr);
65 static auto formatOutput(QString output,
const QString &prefix = QString(),
66 const QString &postfix = QString()) -> QString;
136 void reportError(
int exitCode,
const QString &error);
174 void finishedInsert(
const QString &output,
const QString &errout);
Puts secrets on the system clipboard and takes them off again.
Abstract base class for password store operations.
void operationFinished()
A backend operation is over, successfully or not; the interface can be enabled again.
void statusMessage(const QString &message, int timeout)
A short message for the status bar.
ClipboardManager m_clipboard
The clipboard handling for this application instance, exposed through clipboard(); parented to this o...
static auto formatOutput(QString output, const QString &prefix=QString(), const QString &postfix=QString()) -> QString
Turn a process' plain-text output into the HTML the text browser shows: http(s) URLs become links,...
void entryInserted()
An entry was written; the view of the current entry is stale.
void processFinished(const QString &output, const QString &errout)
Slot for Pass::finishedGitPull / finishedGitPush and the common tail of the other slots: emit the std...
void pushRequested()
The store changed and the settings ask for an automatic push.
void connectPassSignalHandlers(Pass *pass)
Connect the completion signals of one backend to the slots that turn them into output,...
void outputReady(const QString &html)
Formatted output (see formatOutput()) or an error rendered in colour, ready for the text browser.
void finishedInsert(const QString &output, const QString &errout)
Slot for Pass::finishedInsert: like passStoreChanged(), then emit entryInserted() so the window refre...
void reportError(int exitCode, const QString &error)
Show a process' stderr in colour through outputReady(): red for a failure, dark grey for the chatter ...
void onKeyGenerationComplete(const QString &output, const QString &errout)
Slot for Pass::finishedGenerateGPGKeys: a status message followed by processFinished()....
void passStoreChanged(const QString &output, const QString &errout)
Slot for the backend signals that change the store on disk (git init, remove, init,...
auto clipboard() -> ClipboardManager &
The clipboard handling for this application instance.
void init()
Resolve the password store and the executables and migrate the settings of an older version (fresh-in...
QtPass(QObject *parent=nullptr)
Construct the glue and connect it to both pass backends.
void doGitPush()
Emit pushRequested() when the settings ask for automatic push.
static QDialog * createQRCodePopup(const QPixmap &image)
Create a frameless popup dialog, placed at the cursor, showing the given QR code. Split out of showTe...
~QtPass() override
Destroy the QtPass instance and clean up signal connections.
void processErrorExit(int exitCode, const QString &error)
Slot for Pass::processErrorExit: report the error in red and emit operationFinished().
void showTextAsQRCode(const QString &text)
Render text as a QR code with qrencode and show it in a popup at the cursor; failures are reported th...
ClipboardManager, which puts secrets on the clipboard and removes them again, and the MIME data that ...