• 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
  • transactions
kgpgchangedisable.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2008,2009,2012 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 #include "kgpgchangedisable.h"
15 
16 KGpgChangeDisable::KGpgChangeDisable(QObject *parent, const QString &keyid, const bool disable)
17  : KGpgEditKeyTransaction(parent, keyid, QString(), false)
18 {
19  setDisable(disable);
20 }
21 
22 KGpgChangeDisable::~KGpgChangeDisable()
23 {
24 }
25 
26 void
27 KGpgChangeDisable::setDisable(bool disable)
28 {
29  QString cmd;
30  if (disable)
31  cmd = QLatin1String( "disable" );
32  else
33  cmd = QLatin1String( "enable" );
34 
35  replaceCommand(cmd);
36 }
37 
38 bool
39 KGpgChangeDisable::preStart()
40 {
41  if (!KGpgEditKeyTransaction::preStart())
42  return false;
43 
44  setSuccess(TS_OK);
45 
46  return true;
47 }
48 
49 bool
50 KGpgChangeDisable::nextLine(const QString &line)
51 {
52  return KGpgEditKeyTransaction::nextLine(line);
53 }
54 
55 #include "kgpgchangedisable.moc"
kgpgchangedisable.h
KGpgChangeDisable::nextLine
virtual bool nextLine(const QString &line)
handle standard GnuPG prompts
Definition: kgpgchangedisable.cpp:50
KGpgTransaction::TS_OK
everything went fine
Definition: kgpgtransaction.h:60
KGpgEditKeyTransaction
edit a single property of a key
Definition: kgpgeditkeytransaction.h:24
KGpgChangeDisable::KGpgChangeDisable
KGpgChangeDisable(QObject *parent, const QString &keyid, const bool disable)
Definition: kgpgchangedisable.cpp:16
QObject
KGpgEditKeyTransaction::nextLine
virtual bool nextLine(const QString &line)
handle standard GnuPG prompts
Definition: kgpgeditkeytransaction.cpp:60
QString
KGpgChangeDisable::setDisable
void setDisable(bool disable)
Definition: kgpgchangedisable.cpp:27
KGpgEditKeyTransaction::replaceCommand
void replaceCommand(const QString &cmd)
replace the command
Definition: kgpgeditkeytransaction.cpp:101
KGpgChangeDisable::preStart
virtual bool preStart()
reset class before next operation starts
Definition: kgpgchangedisable.cpp:39
QLatin1String
KGpgTransaction::setSuccess
void setSuccess(const int v)
set the success value that will be returned with the done signal
Definition: kgpgtransaction.cpp:448
KGpgEditKeyTransaction::preStart
virtual bool preStart()
reset class before next operation starts
Definition: kgpgeditkeytransaction.cpp:52
KGpgChangeDisable::~KGpgChangeDisable
virtual ~KGpgChangeDisable()
Definition: kgpgchangedisable.cpp:22
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