• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeutils API Reference
  • KDE Home
  • Contact Us
 

kgpg

  • sources
  • kde-4.14
  • kdeutils
  • kgpg
  • core
KGpgKeyNode.h
Go to the documentation of this file.
1 /* Copyright 2008,2009,2010,2012,2013 Rolf Eike Beer <kde@opensource.sf-tec.de>
2  *
3  * This program is free software; you can redistribute it and/or
4  * modify it under the terms of the GNU General Public License as
5  * published by the Free Software Foundation; either version 2 of
6  * the License or (at your option) version 3 or any later version
7  * accepted by the membership of KDE e.V. (or its successor approved
8  * by the membership of KDE e.V.), which shall act as a proxy
9  * defined in Section 14 of version 3 of the license.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  */
19 #ifndef KGPGKEYNODE_H
20 #define KGPGKEYNODE_H
21 
22 #include "KGpgSignableNode.h"
23 #include "KGpgSignNode.h"
24 
25 #include "kgpgkey.h"
26 
27 class KGpgExpandableNode;
28 class KGpgRefNode;
29 
33 class KGpgKeyNode : public KGpgSignableNode
34 {
35  Q_OBJECT
36 
37  friend class KGpgGroupMemberNode;
38 
39 private:
40  KgpgCore::KgpgKey *m_key;
41  int m_signs;
42 
43 protected:
44  virtual void readChildren();
45 
46  QList<KGpgRefNode *> m_refs;
47  QList<KGpgRefNode *> getRefsOfType(const KgpgCore::KgpgItemType &type) const;
48 
49 public:
50  typedef QList<KGpgKeyNode *> List;
51  typedef QList<const KGpgKeyNode *> ConstList;
52 
53  explicit KGpgKeyNode(KGpgRootNode *parent, const KgpgCore::KgpgKey &k);
54  virtual ~KGpgKeyNode();
55 
56  virtual bool hasChildren() const;
57 
58  static KgpgCore::KgpgItemType getType(const KgpgCore::KgpgKey *k);
59 
60  virtual KgpgCore::KgpgItemType getType() const;
61  virtual KgpgCore::KgpgKeyTrust getTrust() const;
62  const QString &getFingerprint() const;
63  virtual QString getSize() const;
64  virtual QString getName() const;
65  virtual QString getEmail() const;
66  virtual QDateTime getExpiration() const;
67  virtual QDateTime getCreation() const;
68  virtual QString getId() const;
69  virtual KGpgKeyNode *getKeyNode(void);
70  virtual const KGpgKeyNode *getKeyNode(void) const;
74  bool isSecret() const;
86  QString getBeautifiedFingerprint() const;
87  virtual QString getComment() const;
98  virtual QString getSignCount() const;
102  virtual KgpgCore::KgpgKey *copyKey() const;
108  void setKey(const KgpgCore::KgpgKey &key);
113  const KgpgCore::KgpgKey *getKey() const;
114 
119  virtual unsigned int getSignKeySize() const;
124  virtual unsigned int getEncryptionKeySize() const;
129  void addRef(KGpgRefNode *node);
137  void delRef(KGpgRefNode *node);
141  QList<KGpgGroupNode *> getGroups(void) const;
145  QList<KGpgGroupMemberNode *> getGroupRefs(void) const;
149  KGpgSignNode::List getSignRefs(void) const;
154  KGpgSignNode::List getSignatures(const bool subkeys) const;
164  const KGpgSignableNode *getUid(const unsigned int index) const;
165 
173  bool compareId(const QString &other) const;
174 
178  bool canEncrypt() const;
179 
180 Q_SIGNALS:
181  void expanded();
182 
183 public slots:
194  void expand();
195 };
196 
197 #endif /* KGPGKEYNODE_H */
KGpgKeyNode::getName
virtual QString getName() const
Definition: KGpgKeyNode.cpp:89
KGpgKeyNode::delRef
void delRef(KGpgRefNode *node)
Remove a reference to this object.
Definition: KGpgKeyNode.cpp:218
KGpgKeyNode::getUid
const KGpgSignableNode * getUid(const unsigned int index) const
get the user id or user attribute with the given number
Definition: KGpgKeyNode.cpp:312
KGpgKeyNode::getKey
const KgpgCore::KgpgKey * getKey() const
Returns a reference to the key used in this object.
Definition: KGpgKeyNode.cpp:193
KGpgKeyNode::List
QList< KGpgKeyNode * > List
Definition: KGpgKeyNode.h:50
KGpgKeyNode::getSignCount
virtual QString getSignCount() const
Return the number of signatures of the primary user id.
Definition: KGpgKeyNode.cpp:166
KGpgSignNode.h
KGpgKeyNode::getId
virtual QString getId() const
Definition: KGpgKeyNode.cpp:113
kgpgkey.h
KGpgKeyNode::~KGpgKeyNode
virtual ~KGpgKeyNode()
Definition: KGpgKeyNode.cpp:40
KgpgCore::KgpgKey
Definition: kgpgkey.h:236
KGpgKeyNode::expanded
void expanded()
KGpgKeyNode::getComment
virtual QString getComment() const
Definition: KGpgKeyNode.cpp:149
KGpgKeyNode
A public key with or without corresponding secret key.
Definition: KGpgKeyNode.h:33
KGpgRootNode
The parent of all key data objects.
Definition: KGpgRootNode.h:38
KGpgKeyNode::getFingerprint
const QString & getFingerprint() const
Definition: KGpgKeyNode.cpp:75
KGpgKeyNode::canEncrypt
bool canEncrypt() const
return if this key can be used for encryption
Definition: KGpgKeyNode.cpp:355
KGpgRefNode
Class for child objects that are only a reference to a primary key.
Definition: KGpgRefNode.h:39
QString
QList< KGpgRefNode * >
KGpgKeyNode::getEncryptionKeySize
virtual unsigned int getEncryptionKeySize() const
Returns the size of the first encryption subkey.
Definition: KGpgKeyNode.cpp:205
KGpgKeyNode::getSignKeySize
virtual unsigned int getSignKeySize() const
Returns the size of the signing key.
Definition: KGpgKeyNode.cpp:199
KGpgKeyNode::ConstList
QList< const KGpgKeyNode * > ConstList
Definition: KGpgKeyNode.h:51
KGpgKeyNode::getExpiration
virtual QDateTime getExpiration() const
Definition: KGpgKeyNode.cpp:101
KGpgExpandableNode
The abstract base class for all classes that may have child objects.
Definition: KGpgExpandableNode.h:34
KGpgKeyNode::getSize
virtual QString getSize() const
Returns a string describing the size of this object.
Definition: KGpgKeyNode.cpp:81
KGpgKeyNode::addRef
void addRef(KGpgRefNode *node)
Notify this key that a KGpgRefNode now references this key.
Definition: KGpgKeyNode.cpp:211
KGpgKeyNode::isSecret
bool isSecret() const
Return if this key has a private key.
Definition: KGpgKeyNode.cpp:125
KGpgKeyNode::getKeyNode
virtual KGpgKeyNode * getKeyNode(void)
returns the key node this node belongs to
Definition: KGpgKeyNode.cpp:119
KGpgKeyNode::KGpgKeyNode
KGpgKeyNode(KGpgRootNode *parent, const KgpgCore::KgpgKey &k)
Definition: KGpgKeyNode.cpp:33
KGpgKeyNode::getEmail
virtual QString getEmail() const
Definition: KGpgKeyNode.cpp:95
KGpgGroupMemberNode
A member of a GnuPG group.
Definition: KGpgGroupMemberNode.h:35
KGpgKeyNode::getType
virtual KgpgCore::KgpgItemType getType() const
Returns the item type of this object.
Definition: KGpgKeyNode.cpp:48
KGpgSignableNode::getSignatures
KGpgSignNode::List getSignatures(void) const
Definition: KGpgSignableNode.cpp:33
KGpgKeyNode::copyKey
virtual KgpgCore::KgpgKey * copyKey() const
Creates a copy of the KgpgKey that belongs to this class.
Definition: KGpgKeyNode.cpp:174
KGpgKeyNode::getGroupRefs
QList< KGpgGroupMemberNode * > getGroupRefs(void) const
returns a list of all group member nodes that reference this key
Definition: KGpgKeyNode.cpp:250
KGpgSignableNode.h
KGpgKeyNode::compareId
bool compareId(const QString &other) const
compare the id of this node to the given other node
Definition: KGpgKeyNode.cpp:339
KGpgKeyNode::m_refs
QList< KGpgRefNode * > m_refs
Definition: KGpgKeyNode.h:46
KGpgKeyNode::expand
void expand()
read all subitems
Definition: KGpgKeyNode.cpp:361
KGpgKeyNode::getCreation
virtual QDateTime getCreation() const
Definition: KGpgKeyNode.cpp:107
KGpgKeyNode::hasChildren
virtual bool hasChildren() const
check if there are any child nodes
Definition: KGpgKeyNode.cpp:54
QObject::parent
QObject * parent() const
KGpgKeyNode::setKey
void setKey(const KgpgCore::KgpgKey &key)
Replaces the current key information with the new one.
Definition: KGpgKeyNode.cpp:180
KGpgKeyNode::getBeautifiedFingerprint
QString getBeautifiedFingerprint() const
Print the full key fingerprint with spaces inserted.
Definition: KGpgKeyNode.cpp:137
KGpgKeyNode::getGroups
QList< KGpgGroupNode * > getGroups(void) const
returns a list of all groups this key is member of
Definition: KGpgKeyNode.cpp:226
KGpgKeyNode::getSignRefs
KGpgSignNode::List getSignRefs(void) const
returns a list of all sign nodes that reference this key
Definition: KGpgKeyNode.cpp:261
KGpgSignableNode
An object that may have KGpgSignNode children.
Definition: KGpgSignableNode.h:31
QDateTime
KGpgKeyNode::getTrust
virtual KgpgCore::KgpgKeyTrust getTrust() const
Definition: KGpgKeyNode.cpp:69
KGpgKeyNode::readChildren
virtual void readChildren()
reimplemented in every base class to read in the child data
Definition: KGpgKeyNode.cpp:155
KGpgKeyNode::getRefsOfType
QList< KGpgRefNode * > getRefsOfType(const KgpgCore::KgpgItemType &type) const
Definition: KGpgKeyNode.cpp:237
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:42:08 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kgpg

Skip menu "kgpg"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeutils API Reference

Skip menu "kdeutils API Reference"
  • ark
  • filelight
  • kcalc
  • kcharselect
  • kdf
  • kfloppy
  • kgpg
  • ktimer
  • kwallet
  • sweeper

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal