File indexing completed on 2021-12-21 14:36:54

0001 /*
0002     SPDX-FileCopyrightText: 2002, 2003 Jean-Baptiste Mardelle <bj@altern.org>
0003     SPDX-FileCopyrightText: 2010, 2012, 2014, 2016, 2017 Rolf Eike Beer <kde@opensource.sf-tec.de>
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 
0008 #ifndef KGPGREVOKEWIDGET_H
0009 #define KGPGREVOKEWIDGET_H
0010 
0011 #include <QDialog>
0012 
0013 #include "ui_kgpgrevokewidget.h"
0014 
0015 class KGpgKeyNode;
0016 class QUrl;
0017 
0018 class KgpgRevokeWidget : public QWidget, public Ui_KgpgRevokeWidget
0019 {
0020     Q_OBJECT
0021 
0022 public:
0023     explicit KgpgRevokeWidget(QWidget* parent = nullptr);
0024 
0025 
0026 public Q_SLOTS:
0027    virtual void cbSave_toggled(bool isOn);
0028 };
0029 
0030 class KGpgRevokeDialog: public QDialog
0031 {
0032     Q_OBJECT
0033 
0034     Q_DISABLE_COPY(KGpgRevokeDialog)
0035     KGpgRevokeDialog() = delete;
0036 public:
0037     KGpgRevokeDialog(QWidget* parent, const KGpgKeyNode* node);
0038 
0039     QString getDescription() const;
0040     int getReason() const;
0041     QUrl saveUrl() const;
0042     QString getId() const;
0043     bool printChecked();
0044     bool importChecked();
0045 
0046     static QUrl revokeUrl(const QString &name, const QString &email);
0047 
0048 private:
0049     KgpgRevokeWidget *m_revWidget;
0050     const QString m_id;
0051 };
0052 
0053 #endif