1 /* 2 SPDX-FileCopyrightText: 2008, 2009, 2012 Rolf Eike Beer <kde@opensource.sf-tec.de> 3 SPDX-License-Identifier: GPL-2.0-or-later 4 */ 5 6 #ifndef KGPGCHANGETRUST_H 7 #define KGPGCHANGETRUST_H 8 9 #include "kgpgeditkeytransaction.h" 10 11 #include "core/kgpgkey.h" 12 13 #include <gpgme.h> 14 #include <QObject> 15 16 /** 17 * @brief change the owner trust level of a public key 18 */ 19 class KGpgChangeTrust: public KGpgEditKeyTransaction { 20 Q_OBJECT 21 22 Q_DISABLE_COPY(KGpgChangeTrust) 23 public: 24 explicit KGpgChangeTrust(QObject *parent, const QString &keyid, const gpgme_validity_t trust); 25 ~KGpgChangeTrust() override; 26 27 void setTrust(const gpgme_validity_t trust); 28 29 protected: 30 bool nextLine(const QString &line) override; 31 ts_boolanswer boolQuestion(const QString &line) override; 32 bool preStart() override; 33 34 private: 35 gpgme_validity_t m_trust; 36 }; 37 38 #endif // KGPGCHANGETRUST_H 39