File indexing completed on 2024-06-23 05:14:02
0001 /* -*- mode: c++; c-basic-offset:4 -*- 0002 dialogs/signcertificatedialog.h 0003 0004 This file is part of Kleopatra, the KDE keymanager 0005 SPDX-FileCopyrightText: 2008 Klarälvdalens Datakonsult AB 0006 0007 SPDX-License-Identifier: GPL-2.0-or-later 0008 */ 0009 0010 #pragma once 0011 0012 #include <QWizard> 0013 0014 #include <QGpgME/SignKeyJob> 0015 0016 #include <gpgme++/key.h> 0017 0018 #include <utils/pimpl_ptr.h> 0019 0020 namespace Kleo 0021 { 0022 0023 class CertifyWidget; 0024 0025 class CertifyCertificateDialog : public QDialog 0026 { 0027 Q_OBJECT 0028 public: 0029 explicit CertifyCertificateDialog(QWidget *parent = nullptr, Qt::WindowFlags f = {}); 0030 ~CertifyCertificateDialog() override; 0031 0032 /** Sets the certificate to certify for certifying user IDs of a single certificate. */ 0033 void setCertificateToCertify(const GpgME::Key &key, const std::vector<GpgME::UserID> &uids = {}); 0034 0035 /** Sets the certificates to certify for bulk certification. */ 0036 void setCertificatesToCertify(const std::vector<GpgME::Key> &keys); 0037 0038 /** Set the optional group name when certifying the certificates of a certificate group. */ 0039 void setGroupName(const QString &name); 0040 0041 bool exportableCertificationSelected() const; 0042 0043 bool trustSignatureSelected() const; 0044 QString trustSignatureDomain() const; 0045 0046 void setSelectedUserIDs(const std::vector<GpgME::UserID> &uids); 0047 std::vector<GpgME::UserID> selectedUserIDs() const; 0048 0049 GpgME::Key selectedSecretKey() const; 0050 0051 bool sendToServer() const; 0052 0053 QString tags() const; 0054 0055 QDate expirationDate() const; 0056 0057 public Q_SLOTS: 0058 void accept() override; 0059 0060 private: 0061 CertifyWidget *mCertWidget = nullptr; 0062 }; 0063 0064 }