1 /*
2     SPDX-FileCopyrightText: 2009 Rolf Eike Beer <kde@opensource.sf-tec.de>
3     SPDX-License-Identifier: GPL-2.0-or-later
4 */
5 
6 #ifndef KGPGSIGNKEY_H
7 #define KGPGSIGNKEY_H
8 
9 #include <QObject>
10 
11 #include "kgpgeditkeytransaction.h"
12 #include "kgpgsigntransactionhelper.h"
13 
14 class KGpgKeyNode;
15 
16 /**
17  * @brief transaction class to sign all user ids of a key
18  */
19 class KGpgSignKey: public KGpgEditKeyTransaction, public KGpgSignTransactionHelper {
20 	Q_OBJECT
21 
22 	Q_DISABLE_COPY(KGpgSignKey)
23 	KGpgSignKey() = delete;
24 
25 public:
26 	/**
27 	 * @brief constructor
28 	 * @param parent parent object
29 	 * @param signer id of the key to sign with
30 	 * @param key node to sign
31 	 * @param local if signature should be local (not exportable)
32 	 * @param checking how carefully the identity of the key owner was checked
33 	 *
34 	 * See setUid() for description of uid.
35 	 */
36 	KGpgSignKey(QObject *parent, const QString &signer, KGpgKeyNode *key, const bool local, const carefulCheck checking);
37 	/**
38 	 * @brief destructor
39 	 */
40     ~KGpgSignKey() override;
41 
42 protected:
43 	bool nextLine(const QString &line) override;
44 	ts_boolanswer boolQuestion(const QString &line) override;
45 	bool passphraseReceived() override;
46 
47 	KGpgTransaction *asTransaction() override;
48 	void replaceCmd(const QString &cmd) override;
49 };
50 
51 #endif // KGPGSIGNKEY_H
52