• 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
kgpgchangekey.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2008,2012,2014 Rolf Eike Beer <kde@opensource.sf-tec.de>
3  */
4 
5 /***************************************************************************
6  * *
7  * This program is free software; you can redistribute it and/or modify *
8  * it under the terms of the GNU General Public License as published by *
9  * the Free Software Foundation; either version 2 of the License, or *
10  * (at your option) any later version. *
11  * *
12  ***************************************************************************/
13 
14 #ifndef KGPGCHANGEKEY_H
15 #define KGPGCHANGEKEY_H
16 
17 #include "core/kgpgkey.h"
18 
19 #include <gpgme.h>
20 #include <QObject>
21 #include <QDateTime>
22 
23 class KGpgKeyNode;
24 class KGpgTransaction;
25 class QWidget;
26 
44 class KGpgChangeKey : public QObject
45 {
46  Q_OBJECT
47 
48 public:
67  KGpgChangeKey(KGpgKeyNode *node, QWidget *widget);
71  ~KGpgChangeKey();
72 
79  void setExpiration(const QDateTime &date);
80 
86  void setDisable(const bool disable);
87 
93  void setOwTrust(const gpgme_validity_t trust);
94 
108  bool apply();
109 
119  bool wasChanged();
120 
133  void selfdestruct(const bool applyChanges);
134 
138  void setParentWidget(QWidget *widget);
139 signals:
148  void done(int result);
149 
166  void keyNeedsRefresh(KGpgKeyNode *node);
167 
168 private slots:
172  void nextStep(int result);
173 
174 private:
175  QDateTime m_expiration;
176  bool m_disable;
177  gpgme_validity_t m_owtrust;
178  KgpgCore::KgpgKey m_key;
179  KGpgKeyNode *m_node;
180  KGpgTransaction *m_current;
181  QWidget *m_parentWidget;
182  int m_step;
183  int m_failed;
184  bool m_autodestroy;
185 };
186 
187 #endif // KGPGCHANGEKEY_H
KGpgChangeKey::wasChanged
bool wasChanged()
Checks if the cached values differ from those of the key.
Definition: kgpgchangekey.cpp:153
KGpgChangeKey::KGpgChangeKey
KGpgChangeKey(KGpgKeyNode *node, QWidget *widget)
Creates a change object for a given key node.
Definition: kgpgchangekey.cpp:23
QWidget
KGpgChangeKey::setParentWidget
void setParentWidget(QWidget *widget)
set a new parent widget for the transactions
Definition: kgpgchangekey.cpp:181
kgpgkey.h
KgpgCore::KgpgKey
Definition: kgpgkey.h:236
KGpgChangeKey::selfdestruct
void selfdestruct(const bool applyChanges)
Tell the object to remove itself once all work is done.
Definition: kgpgchangekey.cpp:167
KGpgChangeKey::setOwTrust
void setOwTrust(const gpgme_validity_t trust)
Cache new owner trust.
Definition: kgpgchangekey.cpp:53
KGpgKeyNode
A public key with or without corresponding secret key.
Definition: KGpgKeyNode.h:33
KGpgChangeKey::~KGpgChangeKey
~KGpgChangeKey()
Destroys the object.
Definition: kgpgchangekey.cpp:38
QObject
KGpgChangeKey::done
void done(int result)
This signal gets emitted every time apply() has done all of it's work.
KGpgChangeKey::setExpiration
void setExpiration(const QDateTime &date)
Cache new expiration date.
Definition: kgpgchangekey.cpp:43
KGpgChangeKey
A class for changing several properties of a key at once.
Definition: kgpgchangekey.h:44
KGpgChangeKey::setDisable
void setDisable(const bool disable)
Cache new disable flag.
Definition: kgpgchangekey.cpp:48
KGpgChangeKey::apply
bool apply()
Apply all cached changes to the key.
Definition: kgpgchangekey.cpp:58
KGpgTransaction
Process one GnuPG operation.
Definition: kgpgtransaction.h:44
KGpgChangeKey::keyNeedsRefresh
void keyNeedsRefresh(KGpgKeyNode *node)
This signal get's emitted if apply finishes in detached mode.
QDateTime
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