File indexing completed on 2024-04-21 05:50:43

0001 /*
0002     SPDX-FileCopyrightText: 2009-2022 Rolf Eike Beer <kde@opensource.sf-tec.de>
0003     SPDX-License-Identifier: GPL-2.0-or-later
0004 */
0005 
0006 #ifndef KGPGPRIMARYUID_H
0007 #define KGPGPRIMARYUID_H
0008 
0009 #include <QObject>
0010 
0011 #include "kgpguidtransaction.h"
0012 
0013 class KGpgUidNode;
0014 
0015 /**
0016  * @brief transaction class to change the primary user id of a key
0017  */
0018 class KGpgPrimaryUid: public KGpgUidTransaction {
0019     Q_OBJECT
0020 
0021     Q_DISABLE_COPY(KGpgPrimaryUid)
0022     KGpgPrimaryUid() = delete;
0023 
0024 public:
0025     /**
0026      * @brief constructor
0027      * @param parent parent object
0028      * @param uid user id to become new primary one
0029      */
0030     KGpgPrimaryUid(QObject *parent, KGpgUidNode *uid);
0031     /**
0032      * @brief destructor
0033      */
0034     ~KGpgPrimaryUid() override = default;
0035 
0036 protected:
0037     bool nextLine(const QString &line) override;
0038     bool passphraseReceived() override;
0039 };
0040 
0041 #endif // KGPGPRIMARYUID_H