QtPass 2.0.0
Developer documentation
Loading...
Searching...
No Matches
exportpublickeydialog.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2026 Anne Jan Brouwer
2// SPDX-License-Identifier: GPL-3.0-or-later
8#ifndef SRC_EXPORTPUBLICKEYDIALOG_H_
9#define SRC_EXPORTPUBLICKEYDIALOG_H_
10
11#include <QDialog>
12#include <QScopedPointer>
13#include <QString>
14
15namespace Ui {
16class ExportPublicKeyDialog;
17}
18
27class ExportPublicKeyDialog : public QDialog {
28 Q_OBJECT
29
30public:
38 explicit ExportPublicKeyDialog(const QString &keyId,
39 const QString &armoredKey,
40 QWidget *parent = nullptr);
43
51 static auto sanitizeKeyIdForFilename(const QString &keyId) -> QString;
52
53private slots:
60
68
69private:
71 QScopedPointer<Ui::ExportPublicKeyDialog> ui;
74 QString m_keyId;
78};
79
80#endif // SRC_EXPORTPUBLICKEYDIALOG_H_
void on_saveButton_clicked()
Prompt for a destination and write the armored key to that file through a QSaveFile....
QScopedPointer< Ui::ExportPublicKeyDialog > ui
Generated form (exportpublickeydialog.ui); owned.
QString m_keyId
Key id as passed to the constructor; the basis of the suggested file name.
ExportPublicKeyDialog(const QString &keyId, const QString &armoredKey, QWidget *parent=nullptr)
Construct an ExportPublicKeyDialog.
~ExportPublicKeyDialog() override
Destroys the dialog and its generated UI.
void on_copyButton_clicked()
Copy the armored key text to the system clipboard; the button reads "Copied!" for 1....
static auto sanitizeKeyIdForFilename(const QString &keyId) -> QString
Reduce a key identifier to a filesystem-safe token.
QString m_copyButtonOriginalText
The copy button's label from the form, restored after the "Copied!" flash.