File indexing completed on 2024-09-08 05:14:38
0001 /* 0002 SPDX-FileCopyrightText: 2008-2022 Rolf Eike Beer <kde@opensource.sf-tec.de> 0003 0004 SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0005 */ 0006 #ifndef KGPGSUBKEYNODE_H 0007 #define KGPGSUBKEYNODE_H 0008 0009 #include "KGpgSignableNode.h" 0010 0011 #include "kgpgkey.h" 0012 0013 using namespace KgpgCore; 0014 0015 /** 0016 * @brief a subkey of a public key or key pair 0017 */ 0018 class KGpgSubkeyNode : public KGpgSignableNode 0019 { 0020 private: 0021 KgpgCore::KgpgKeySub m_skey; 0022 QString m_fingerprint; 0023 0024 protected: 0025 void readChildren() override; 0026 0027 public: 0028 explicit KGpgSubkeyNode(KGpgKeyNode *parent, const KgpgCore::KgpgKeySub &k); 0029 ~KGpgSubkeyNode() override = default; 0030 0031 KgpgCore::KgpgItemType getType() const override; 0032 KgpgCore::KgpgKeyTrust getTrust() const override; 0033 QString getSize() const override; 0034 QString getName() const override; 0035 QDateTime getExpiration() const override; 0036 QDateTime getCreation() const override; 0037 QString getId() const override; 0038 KGpgKeyNode *getKeyNode(void) override; 0039 const KGpgKeyNode *getKeyNode(void) const override; 0040 virtual KGpgKeyNode *getParentKeyNode() const; 0041 0042 void setFingerprint(const QString &fpr); 0043 const QString &getFingerprint() const; 0044 }; 0045 0046 #endif /* KGPGSUBKEYNODE_H */