KWallet

knewwalletdialog.h
1/*
2 This file is part of the KDE project
3 SPDX-FileCopyrightText: 2013 Valentin Rusu <kde@rusu.info>
4
5 SPDX-License-Identifier: LGPL-2.0-only
6*/
7
8#ifndef KNEWWALLETDIALOG_H
9#define KNEWWALLETDIALOG_H
10
11#include <QWizard>
12
13#include "ui_knewwalletdialoggpg.h"
14#include "ui_knewwalletdialogintro.h"
15
16namespace GpgME
17{
18class Key;
19}
20
21namespace KWallet
22{
23class KNewWalletDialogIntro;
24class KNewWalletDialogGpg;
25
26class KNewWalletDialog : public QWizard
27{
29public:
30 KNewWalletDialog(const QString &appName, const QString &walletName, QWidget *parent = nullptr);
31
32 bool isBlowfish() const;
33 int gpgId() const
34 {
35 return _gpgId;
36 }
37 GpgME::Key gpgKey() const;
38
39private:
40 KNewWalletDialogIntro *_intro = nullptr;
41 int _introId = 0;
42 KNewWalletDialogGpg *_gpg = nullptr;
43 int _gpgId = 0;
44};
45
46class KNewWalletDialogIntro : public QWizardPage
47{
49public:
50 KNewWalletDialogIntro(const QString &appName, const QString &walletName, QWidget *parent = nullptr);
51 bool isBlowfish() const;
52 int nextId() const override;
53protected Q_SLOTS:
54 void onBlowfishToggled(bool);
55
56private:
57 Ui_KNewWalletDialogIntro _ui;
58};
59
60class KNewWalletDialogGpg : public QWizardPage
61{
63public:
64 explicit KNewWalletDialogGpg(QWidget *parent = nullptr);
65 void initializePage() override;
66 bool isComplete() const override;
67 virtual bool validateCurrentPage();
68protected Q_SLOTS:
69 void onItemSelectionChanged();
70
71private:
72 bool _alreadyInitialized = false;
73 Ui_KNewWalletDialogGpg _ui;
74 bool _complete = false;
75};
76
77} // namespace
78
79#endif // KNEWWALLETDIALOG_H
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:01:06 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.