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

libkleo

  • sources
  • kde-4.12
  • kdepim
  • libkleo
  • ui
keyrequester.cpp
Go to the documentation of this file.
1 /* -*- c++ -*-
2  keyrequester.cpp
3 
4  This file is part of libkleopatra, the KDE keymanagement library
5  Copyright (c) 2004 Klar�vdalens Datakonsult AB
6 
7  Libkleopatra is free software; you can redistribute it and/or
8  modify it under the terms of the GNU General Public License as
9  published by the Free Software Foundation; either version 2 of the
10  License, or (at your option) any later version.
11 
12  Libkleopatra is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 
21  In addition, as a special exception, the copyright holders give
22  permission to link the code of this program with any edition of
23  the Qt library by Trolltech AS, Norway (or with modified versions
24  of Qt that use the same license as Qt), and distribute linked
25  combinations including the two. You must obey the GNU General
26  Public License in all respects for all of the code used other than
27  Qt. If you modify this file, you may extend this exception to
28  your version of the file, but you are not obligated to do so. If
29  you do not wish to do so, delete this exception statement from
30  your version.
31 
32 
33  Based on kpgpui.cpp
34  Copyright (C) 2001,2002 the KPGP authors
35  See file libkdenetwork/AUTHORS.kpgp for details
36 
37  This file is part of KPGP, the KDE PGP/GnuPG support library.
38 
39  KPGP is free software; you can redistribute it and/or modify
40  it under the terms of the GNU General Public License as published by
41  the Free Software Foundation; either version 2 of the License, or
42  (at your option) any later version.
43 
44  You should have received a copy of the GNU General Public License
45  along with this program; if not, write to the Free Software Foundation,
46  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
47  */
48 
49 #include "keyrequester.h"
50 
51 #include "keyselectiondialog.h"
52 
53 #include "kleo/keylistjob.h"
54 #include "kleo/dn.h"
55 #include "kleo/cryptobackendfactory.h"
56 
57 // gpgme++
58 #include <gpgme++/key.h>
59 #include <gpgme++/keylistresult.h>
60 
61 // KDE
62 #include <klocale.h>
63 #include <kiconloader.h>
64 #include <kdialog.h>
65 #include <kdebug.h>
66 #include <kmessagebox.h>
67 #include <kpushbutton.h>
68 
69 // Qt
70 #include <QApplication>
71 #include <QLayout>
72 
73 #include <QString>
74 #include <QStringList>
75 #include <QLabel>
76 #include <QRegExp>
77 
78 #include <QHBoxLayout>
79 
80 #include <assert.h>
81 
82 Kleo::KeyRequester::KeyRequester( unsigned int allowedKeys, bool multipleKeys,
83  QWidget * parent )
84  : QWidget( parent ),
85  mOpenPGPBackend( 0 ),
86  mSMIMEBackend( 0 ),
87  mMulti( multipleKeys ),
88  mKeyUsage( allowedKeys ),
89  mJobs( 0 ),
90  d( 0 )
91 {
92  init();
93 }
94 
95 Kleo::KeyRequester::KeyRequester( QWidget * parent )
96  : QWidget( parent ),
97  mOpenPGPBackend( 0 ),
98  mSMIMEBackend( 0 ),
99  mMulti( false ),
100  mKeyUsage( 0 ),
101  mJobs( 0 ),
102  d( 0 )
103 {
104  init();
105 }
106 
107 void Kleo::KeyRequester::init()
108 {
109  QHBoxLayout * hlay = new QHBoxLayout( this );
110  hlay->setSpacing( KDialog::spacingHint() );
111  hlay->setMargin( 0 );
112 
113  // the label where the key id is to be displayed:
114  mLabel = new QLabel( this );
115  mLabel->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
116 
117  // the button to unset any key:
118  mEraseButton = new KPushButton( this );
119  mEraseButton->setAutoDefault( false );
120  mEraseButton->setSizePolicy( QSizePolicy( QSizePolicy::Minimum,
121  QSizePolicy::Minimum ) );
122  mEraseButton->setIcon( KIcon( QApplication::isRightToLeft() ? QLatin1String("edit-clear-locationbar-ltr") : QLatin1String("edit-clear-locationbar-rtl") ) );
123  mEraseButton->setToolTip( i18n("Clear") );
124 
125  // the button to call the KeySelectionDialog:
126  mDialogButton = new QPushButton( i18n("Change..."), this );
127  mDialogButton->setAutoDefault( false );
128 
129  hlay->addWidget( mLabel, 1 );
130  hlay->addWidget( mEraseButton );
131  hlay->addWidget( mDialogButton );
132 
133  connect( mEraseButton, SIGNAL(clicked()), SLOT(slotEraseButtonClicked()) );
134  connect( mDialogButton, SIGNAL(clicked()), SLOT(slotDialogButtonClicked()) );
135 
136  setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding,
137  QSizePolicy::Fixed ) );
138 
139  setAllowedKeys( mKeyUsage );
140 }
141 
142 Kleo::KeyRequester::~KeyRequester() {
143 
144 }
145 
146 const std::vector<GpgME::Key> & Kleo::KeyRequester::keys() const {
147  return mKeys;
148 }
149 
150 const GpgME::Key & Kleo::KeyRequester::key() const {
151  static const GpgME::Key null = GpgME::Key::null;
152  if ( mKeys.empty() )
153  return null;
154  else
155  return mKeys.front();
156 }
157 
158 void Kleo::KeyRequester::setKeys( const std::vector<GpgME::Key> & keys ) {
159  mKeys.clear();
160  for ( std::vector<GpgME::Key>::const_iterator it = keys.begin() ; it != keys.end() ; ++it )
161  if ( !it->isNull() )
162  mKeys.push_back( *it );
163  updateKeys();
164 }
165 
166 void Kleo::KeyRequester::setKey( const GpgME::Key & key ) {
167  mKeys.clear();
168  if ( !key.isNull() )
169  mKeys.push_back( key );
170  updateKeys();
171 }
172 
173 QString Kleo::KeyRequester::fingerprint() const {
174  if ( mKeys.empty() )
175  return QString();
176  else
177  return QLatin1String(mKeys.front().primaryFingerprint());
178 }
179 
180 QStringList Kleo::KeyRequester::fingerprints() const {
181  QStringList result;
182  for ( std::vector<GpgME::Key>::const_iterator it = mKeys.begin() ; it != mKeys.end() ; ++it )
183  if ( !it->isNull() )
184  if ( const char * fpr = it->primaryFingerprint() )
185  result.push_back( QLatin1String(fpr) );
186  return result;
187 }
188 
189 void Kleo::KeyRequester::setFingerprint( const QString & fingerprint ) {
190  startKeyListJob( QStringList( fingerprint ) );
191 }
192 
193 void Kleo::KeyRequester::setFingerprints( const QStringList & fingerprints ) {
194  startKeyListJob( fingerprints );
195 }
196 
197 void Kleo::KeyRequester::updateKeys() {
198  if ( mKeys.empty() ) {
199  mLabel->clear();
200  return;
201  }
202  if ( mKeys.size() > 1 )
203  setMultipleKeysEnabled( true );
204 
205  QStringList labelTexts;
206  QString toolTipText;
207  for ( std::vector<GpgME::Key>::const_iterator it = mKeys.begin() ; it != mKeys.end() ; ++it ) {
208  if ( it->isNull() )
209  continue;
210  const QString fpr = QLatin1String(it->primaryFingerprint());
211  labelTexts.push_back( fpr.right(8) );
212  toolTipText += fpr.right(8) + QLatin1String(": ");
213  if ( const char * uid = it->userID(0).id() )
214  if ( it->protocol() == GpgME::OpenPGP )
215  toolTipText += QString::fromUtf8( uid );
216  else
217  toolTipText += Kleo::DN( uid ).prettyDN();
218  else
219  toolTipText += i18n("<placeholder>unknown</placeholder>");
220  toolTipText += QLatin1Char('\n');
221  }
222 
223  mLabel->setText( labelTexts.join(QLatin1String(", ")) );
224  mLabel->setToolTip( toolTipText );
225 }
226 
227 #ifndef __KLEO_UI_SHOW_KEY_LIST_ERROR_H__
228 #define __KLEO_UI_SHOW_KEY_LIST_ERROR_H__
229 static void showKeyListError( QWidget * parent, const GpgME::Error & err ) {
230  assert( err );
231  const QString msg = i18n( "<qt><p>An error occurred while fetching "
232  "the keys from the backend:</p>"
233  "<p><b>%1</b></p></qt>" ,
234  QString::fromLocal8Bit( err.asString() ) );
235 
236  KMessageBox::error( parent, msg, i18n( "Key Listing Failed" ) );
237 }
238 #endif // __KLEO_UI_SHOW_KEY_LIST_ERROR_H__
239 
240 void Kleo::KeyRequester::startKeyListJob( const QStringList & fingerprints ) {
241  if ( !mSMIMEBackend && !mOpenPGPBackend )
242  return;
243 
244  mTmpKeys.clear();
245  mJobs = 0;
246 
247  unsigned int count = 0;
248  for ( QStringList::const_iterator it = fingerprints.begin() ; it != fingerprints.end() ; ++it )
249  if ( !(*it).trimmed().isEmpty() )
250  ++count;
251 
252  if ( !count ) {
253  // don't fall into the trap that an empty pattern means
254  // "return all keys" :)
255  setKey( GpgME::Key::null );
256  return;
257  }
258 
259  if ( mOpenPGPBackend ) {
260  KeyListJob * job = mOpenPGPBackend->keyListJob( false ); // local, no sigs
261  if ( !job ) {
262  KMessageBox::error( this,
263  i18n("The OpenPGP backend does not support listing keys. "
264  "Check your installation."),
265  i18n("Key Listing Failed") );
266  } else {
267  connect( job, SIGNAL(result(GpgME::KeyListResult)),
268  SLOT(slotKeyListResult(GpgME::KeyListResult)) );
269  connect( job, SIGNAL(nextKey(GpgME::Key)),
270  SLOT(slotNextKey(GpgME::Key)) );
271 
272  const GpgME::Error err = job->start( fingerprints,
273  mKeyUsage & Kleo::KeySelectionDialog::SecretKeys &&
274  !( mKeyUsage & Kleo::KeySelectionDialog::PublicKeys ) );
275 
276  if ( err )
277  showKeyListError( this, err );
278  else
279  ++mJobs;
280  }
281  }
282 
283  if ( mSMIMEBackend ) {
284  KeyListJob * job = mSMIMEBackend->keyListJob( false ); // local, no sigs
285  if ( !job ) {
286  KMessageBox::error( this,
287  i18n("The S/MIME backend does not support listing keys. "
288  "Check your installation."),
289  i18n("Key Listing Failed") );
290  } else {
291  connect( job, SIGNAL(result(GpgME::KeyListResult)),
292  SLOT(slotKeyListResult(GpgME::KeyListResult)) );
293  connect( job, SIGNAL(nextKey(GpgME::Key)),
294  SLOT(slotNextKey(GpgME::Key)) );
295 
296  const GpgME::Error err = job->start( fingerprints,
297  mKeyUsage & Kleo::KeySelectionDialog::SecretKeys &&
298  !( mKeyUsage & Kleo::KeySelectionDialog::PublicKeys ) );
299 
300  if ( err )
301  showKeyListError( this, err );
302  else
303  ++mJobs;
304  }
305  }
306 
307  if ( mJobs > 0 ) {
308  mEraseButton->setEnabled( false );
309  mDialogButton->setEnabled( false );
310  }
311 }
312 
313 void Kleo::KeyRequester::slotNextKey( const GpgME::Key & key ) {
314  if ( !key.isNull() )
315  mTmpKeys.push_back( key );
316 }
317 
318 void Kleo::KeyRequester::slotKeyListResult( const GpgME::KeyListResult & res ) {
319  if ( res.error() )
320  showKeyListError( this, res.error() );
321 
322  if ( --mJobs <= 0 ) {
323  mEraseButton->setEnabled( true );
324  mDialogButton->setEnabled( true );
325 
326  setKeys( mTmpKeys );
327  mTmpKeys.clear();
328  }
329 }
330 
331 
332 void Kleo::KeyRequester::slotDialogButtonClicked() {
333 #ifndef KDEPIM_MOBILE_UI
334  KeySelectionDialog * dlg = mKeys.empty()
335  ? new KeySelectionDialog( mDialogCaption, mDialogMessage, mInitialQuery, mKeyUsage, mMulti, false, this )
336  : new KeySelectionDialog( mDialogCaption, mDialogCaption, mKeys, mKeyUsage, mMulti, false, this ) ;
337 #else
338  KeySelectionDialog * dlg = mKeys.empty()
339  ? new KeySelectionDialog( mDialogCaption, mDialogMessage, mInitialQuery, mKeyUsage, mMulti, false, 0 )
340  : new KeySelectionDialog( mDialogCaption, mDialogCaption, mKeys, mKeyUsage, mMulti, false, 0 ) ;
341 #endif
342 
343  if ( dlg->exec() == QDialog::Accepted ) {
344  if ( mMulti )
345  setKeys( dlg->selectedKeys() );
346  else
347  setKey( dlg->selectedKey() );
348  emit changed();
349  }
350 
351  delete dlg;
352 }
353 
354 void Kleo::KeyRequester::slotEraseButtonClicked() {
355  if ( !mKeys.empty() )
356  emit changed();
357  mKeys.clear();
358  updateKeys();
359 }
360 
361 void Kleo::KeyRequester::setDialogCaption( const QString & caption ) {
362  mDialogCaption = caption;
363 }
364 
365 void Kleo::KeyRequester::setDialogMessage( const QString & msg ) {
366  mDialogMessage = msg;
367 }
368 
369 bool Kleo::KeyRequester::isMultipleKeysEnabled() const {
370  return mMulti;
371 }
372 
373 void Kleo::KeyRequester::setMultipleKeysEnabled( bool multi ) {
374  if ( multi == mMulti ) return;
375 
376  if ( !multi && !mKeys.empty() )
377  mKeys.erase( mKeys.begin() + 1, mKeys.end() );
378 
379  mMulti = multi;
380  updateKeys();
381 }
382 
383 unsigned int Kleo::KeyRequester::allowedKeys() const {
384  return mKeyUsage;
385 }
386 
387 void Kleo::KeyRequester::setAllowedKeys( unsigned int keyUsage ) {
388  mKeyUsage = keyUsage;
389  mOpenPGPBackend = 0;
390  mSMIMEBackend = 0;
391 
392  if ( mKeyUsage & KeySelectionDialog::OpenPGPKeys )
393  mOpenPGPBackend = Kleo::CryptoBackendFactory::instance()->openpgp();
394  if ( mKeyUsage & KeySelectionDialog::SMIMEKeys )
395  mSMIMEBackend = Kleo::CryptoBackendFactory::instance()->smime();
396 
397  if ( mOpenPGPBackend && !mSMIMEBackend ) {
398  mDialogCaption = i18n("OpenPGP Key Selection");
399  mDialogMessage = i18n("Please select an OpenPGP key to use.");
400  } else if ( !mOpenPGPBackend && mSMIMEBackend ) {
401  mDialogCaption = i18n("S/MIME Key Selection");
402  mDialogMessage = i18n("Please select an S/MIME key to use.");
403  } else {
404  mDialogCaption = i18n("Key Selection");
405  mDialogMessage = i18n("Please select an (OpenPGP or S/MIME) key to use.");
406  }
407 }
408 
409 QPushButton * Kleo::KeyRequester::dialogButton() {
410  return mDialogButton;
411 }
412 
413 QPushButton * Kleo::KeyRequester::eraseButton() {
414  return mEraseButton;
415 }
416 
417 static inline unsigned int foo( bool openpgp, bool smime, bool trusted, bool valid ) {
418  unsigned int result = 0;
419  if ( openpgp )
420  result |= Kleo::KeySelectionDialog::OpenPGPKeys;
421  if ( smime )
422  result |= Kleo::KeySelectionDialog::SMIMEKeys;
423  if ( trusted )
424  result |= Kleo::KeySelectionDialog::TrustedKeys;
425  if ( valid )
426  result |= Kleo::KeySelectionDialog::ValidKeys;
427  return result;
428 }
429 
430 static inline unsigned int encryptionKeyUsage( bool openpgp, bool smime, bool trusted, bool valid ) {
431  return foo( openpgp, smime, trusted, valid ) | Kleo::KeySelectionDialog::EncryptionKeys | Kleo::KeySelectionDialog::PublicKeys;
432 }
433 
434 static inline unsigned int signingKeyUsage( bool openpgp, bool smime, bool trusted, bool valid ) {
435  return foo( openpgp, smime, trusted, valid ) | Kleo::KeySelectionDialog::SigningKeys | Kleo::KeySelectionDialog::SecretKeys;
436 }
437 
438 Kleo::EncryptionKeyRequester::EncryptionKeyRequester( bool multi, unsigned int proto,
439  QWidget * parent,
440  bool onlyTrusted, bool onlyValid )
441  : KeyRequester( encryptionKeyUsage( proto & OpenPGP, proto & SMIME, onlyTrusted, onlyValid ), multi,
442  parent ),d(0)
443 {
444 }
445 
446 Kleo::EncryptionKeyRequester::EncryptionKeyRequester( QWidget * parent )
447  : KeyRequester( 0, false, parent ),d(0)
448 {
449 }
450 
451 Kleo::EncryptionKeyRequester::~EncryptionKeyRequester() {}
452 
453 
454 void Kleo::EncryptionKeyRequester::setAllowedKeys( unsigned int proto, bool onlyTrusted, bool onlyValid )
455 {
456  KeyRequester::setAllowedKeys( encryptionKeyUsage( proto & OpenPGP, proto & SMIME, onlyTrusted, onlyValid ) );
457 }
458 
459 Kleo::SigningKeyRequester::SigningKeyRequester( bool multi, unsigned int proto,
460  QWidget * parent,
461  bool onlyTrusted, bool onlyValid )
462  : KeyRequester( signingKeyUsage( proto & OpenPGP, proto & SMIME, onlyTrusted, onlyValid ), multi,
463  parent ),d(0)
464 {
465 }
466 
467 Kleo::SigningKeyRequester::SigningKeyRequester( QWidget * parent )
468  : KeyRequester( 0, false, parent ),d(0)
469 {
470 }
471 
472 Kleo::SigningKeyRequester::~SigningKeyRequester() {}
473 
474 void Kleo::SigningKeyRequester::setAllowedKeys( unsigned int proto, bool onlyTrusted, bool onlyValid )
475 {
476  KeyRequester::setAllowedKeys( signingKeyUsage( proto & OpenPGP, proto & SMIME, onlyTrusted, onlyValid ) );
477 }
478 
479 void Kleo::KeyRequester::virtual_hook( int, void* ) {}
480 void Kleo::EncryptionKeyRequester::virtual_hook( int id, void * data ) {
481  KeyRequester::virtual_hook( id, data );
482 }
483 void Kleo::SigningKeyRequester::virtual_hook( int id, void * data ) {
484  KeyRequester::virtual_hook( id, data );
485 }
486 
487 #include "keyrequester.moc"
Kleo::KeyRequester::isMultipleKeysEnabled
bool isMultipleKeysEnabled() const
Definition: keyrequester.cpp:369
encryptionKeyUsage
static unsigned int encryptionKeyUsage(bool openpgp, bool smime, bool trusted, bool valid)
Definition: keyrequester.cpp:430
Kleo::KeyRequester::setMultipleKeysEnabled
void setMultipleKeysEnabled(bool enable)
Definition: keyrequester.cpp:373
Kleo::EncryptionKeyRequester::EncryptionKeyRequester
EncryptionKeyRequester(bool multipleKeys=false, unsigned int proto=AllProtocols, QWidget *parent=0, bool onlyTrusted=true, bool onlyValid=true)
Preferred constructor.
Definition: keyrequester.cpp:438
Kleo::KeyRequester::KeyRequester
KeyRequester(unsigned int allowedKeys, bool multipleKeys=false, QWidget *parent=0)
Definition: keyrequester.cpp:82
Kleo::KeyRequester::setFingerprints
void setFingerprints(const QStringList &fingerprints)
Set the keys by fingerprint.
Definition: keyrequester.cpp:193
Kleo::CryptoBackendFactory::smime
const CryptoBackend::Protocol * smime() const
Definition: cryptobackendfactory.cpp:117
Kleo::EncryptionKeyRequester::setAllowedKeys
void setAllowedKeys(unsigned int proto, bool onlyTrusted=true, bool onlyValid=true)
Definition: keyrequester.cpp:454
Kleo::KeySelectionDialog::TrustedKeys
Definition: keyselectiondialog.h:79
Kleo::KeyRequester::setAllowedKeys
void setAllowedKeys(unsigned int allowed)
Definition: keyrequester.cpp:387
QWidget
Kleo::KeySelectionDialog::SecretKeys
Definition: keyselectiondialog.h:75
keyselectiondialog.h
Kleo::KeyRequester::fingerprint
QString fingerprint() const
Definition: keyrequester.cpp:173
Kleo::KeyRequester::setKey
void setKey(const GpgME::Key &key)
Preferred method to set a key for non-multi-KeyRequesters.
Definition: keyrequester.cpp:166
Kleo::DN::prettyDN
QString prettyDN() const
Definition: dn.cpp:381
QString
Kleo::KeySelectionDialog::SMIMEKeys
Definition: keyselectiondialog.h:83
Kleo::KeyRequester::allowedKeys
unsigned int allowedKeys() const
Definition: keyrequester.cpp:383
Kleo::CryptoBackendFactory::instance
static CryptoBackendFactory * instance()
Definition: cryptobackendfactory.cpp:102
Kleo::KeySelectionDialog::OpenPGPKeys
Definition: keyselectiondialog.h:82
Kleo::KeyRequester::setKeys
void setKeys(const std::vector< GpgME::Key > &keys)
Preferred method to set a key for multi-KeyRequesters.
Definition: keyrequester.cpp:158
Kleo::KeySelectionDialog::EncryptionKeys
Definition: keyselectiondialog.h:76
Kleo::KeyRequester::~KeyRequester
~KeyRequester()
Definition: keyrequester.cpp:142
Kleo::KeyRequester::key
const GpgME::Key & key() const
Definition: keyrequester.cpp:150
dn.h
kdtools::count
size_t count(const C &c, const V &v)
Definition: stl_util.h:364
Kleo::KeyRequester::dialogButton
QPushButton * dialogButton()
Definition: keyrequester.cpp:409
Kleo::KeyRequester::virtual_hook
virtual void virtual_hook(int, void *)
Definition: keyrequester.cpp:479
Kleo::KeySelectionDialog::SigningKeys
Definition: keyselectiondialog.h:77
Kleo::KeySelectionDialog::ValidKeys
Definition: keyselectiondialog.h:78
cryptobackendfactory.h
showKeyListError
static void showKeyListError(QWidget *parent, const GpgME::Error &err)
Definition: keyrequester.cpp:229
Kleo::SigningKeyRequester::~SigningKeyRequester
~SigningKeyRequester()
Definition: keyrequester.cpp:472
Kleo::KeyRequester::keys
const std::vector< GpgME::Key > & keys() const
Definition: keyrequester.cpp:146
Kleo::EncryptionKeyRequester::virtual_hook
virtual void virtual_hook(int, void *)
Definition: keyrequester.cpp:480
Kleo::KeySelectionDialog::PublicKeys
Definition: keyselectiondialog.h:74
Kleo::DN
DN parser and reorderer.
Definition: dn.h:77
keyrequester.h
Kleo::KeyRequester::fingerprints
QStringList fingerprints() const
Definition: keyrequester.cpp:180
Kleo::KeyRequester::setDialogCaption
void setDialogCaption(const QString &caption)
Definition: keyrequester.cpp:361
Kleo::EncryptionKeyRequester::~EncryptionKeyRequester
~EncryptionKeyRequester()
Definition: keyrequester.cpp:451
Kleo::KeyRequester::eraseButton
QPushButton * eraseButton()
Definition: keyrequester.cpp:413
keylistjob.h
signingKeyUsage
static unsigned int signingKeyUsage(bool openpgp, bool smime, bool trusted, bool valid)
Definition: keyrequester.cpp:434
Kleo::KeyRequester::setDialogMessage
void setDialogMessage(const QString &message)
Definition: keyrequester.cpp:365
Kleo::SigningKeyRequester::setAllowedKeys
void setAllowedKeys(unsigned int proto, bool onlyTrusted=true, bool onlyValid=true)
Definition: keyrequester.cpp:474
Kleo::KeyRequester
Base class for SigningKeyRequester and EncryptionKeyRequester.
Definition: keyrequester.h:74
foo
static unsigned int foo(bool openpgp, bool smime, bool trusted, bool valid)
Definition: keyrequester.cpp:417
Kleo::SigningKeyRequester::virtual_hook
virtual void virtual_hook(int, void *)
Definition: keyrequester.cpp:483
Kleo::KeyRequester::setFingerprint
void setFingerprint(const QString &fingerprint)
Set the key by fingerprint.
Definition: keyrequester.cpp:189
Kleo::SigningKeyRequester::SigningKeyRequester
SigningKeyRequester(bool multipleKeys=false, unsigned int proto=AllProtocols, QWidget *parent=0, bool onlyTrusted=true, bool onlyValid=true)
Preferred constructor.
Definition: keyrequester.cpp:459
Kleo::CryptoBackendFactory::openpgp
const CryptoBackend::Protocol * openpgp() const
Definition: cryptobackendfactory.cpp:126
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:57:48 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

libkleo

Skip menu "libkleo"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

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