File indexing completed on 2023-12-03 09:19:03
0001 /* 0002 SPDX-FileCopyrightText: 2002 Jean-Baptiste Mardelle <bj@altern.org> 0003 SPDX-FileCopyrightText: 2007, 2009, 2012, 2013 Rolf Eike Beer <kde@opensource.sf-tec.de> 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef KGPGKEYGENERATE_H 0008 #define KGPGKEYGENERATE_H 0009 0010 #include "ui_kgpgkeygenerate.h" 0011 0012 #include "core/kgpgkey.h" 0013 0014 #include <QDialog> 0015 #include <QPushButton> 0016 0017 0018 class KgpgKeyGenerate : public QDialog, public Ui::kgpgKeyGenerate 0019 { 0020 Q_OBJECT 0021 0022 public: 0023 explicit KgpgKeyGenerate(QWidget *parent = nullptr); 0024 0025 bool isExpertMode() const; 0026 QString name() const; 0027 QString email() const; 0028 QString comment() const; 0029 KgpgCore::KgpgKeyAlgo algo() const; 0030 0031 /** 0032 * @brief return the selected capabilities for the new key 0033 * @retval 0 default capabilities of the selected algorithm should be used 0034 */ 0035 KgpgCore::KgpgSubKeyType caps() const; 0036 uint size() const; 0037 char expiration() const; 0038 uint days() const; 0039 0040 private Q_SLOTS: 0041 void slotOk(); 0042 void slotUser1(); 0043 void slotEnableOk(); 0044 void slotEnableDays(const int state); 0045 void slotEnableCaps(const int state); 0046 0047 private: 0048 QPushButton *okButton; 0049 0050 bool m_expert; 0051 }; 0052 0053 #endif // KGPGKEYGENERATE_H