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

kleopatra

  • sources
  • kde-4.12
  • kdepim
  • kleopatra
  • crypto
  • gui
signencryptwizard.h
Go to the documentation of this file.
1 /* -*- mode: c++; c-basic-offset:4 -*-
2  crypto/gui/signencryptwizard.h
3 
4  This file is part of Kleopatra, the KDE keymanager
5  Copyright (c) 2007 Klarälvdalens Datakonsult AB
6 
7  Kleopatra 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  Kleopatra 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 #ifndef __KLEOPATRA_CRYPTO_GUI_SIGNENCRYPTWIZARD_H__
34 #define __KLEOPATRA_CRYPTO_GUI_SIGNENCRYPTWIZARD_H__
35 
36 #include <crypto/gui/wizard.h>
37 
38 #include <crypto/gui/signerresolvepage.h>
39 
40 #include <utils/pimpl_ptr.h>
41 
42 #include <gpgme++/global.h>
43 #include <kmime/kmime_header_parsing.h>
44 
45 #include <boost/shared_ptr.hpp>
46 
47 #include <vector>
48 
49 namespace GpgME {
50  class Key;
51 }
52 
53 class QFileInfo;
54 template <typename T> class QList;
55 typedef QList<QFileInfo> QFileInfoList;
56 
57 namespace Kleo {
58 namespace Crypto {
59 
60  class Task;
61  class TaskCollection;
62 
63 namespace Gui {
64 
65  class ObjectsPage;
66  class ResolveRecipientsPage;
67  class ResultPage;
68  class SignerResolvePage;
69 
70  class SignEncryptWizard : public Wizard {
71  Q_OBJECT
72  public:
73  explicit SignEncryptWizard( QWidget * parent=0, Qt::WindowFlags f=0 );
74  virtual ~SignEncryptWizard();
75 
76  enum Page {
77  ResolveSignerPage=0,
78  ObjectsPage,
79  ResolveRecipientsPage,
80  ResultPage
81  };
82 
83  void setCommitPage( Page );
84 
85  GpgME::Protocol presetProtocol() const;
86  void setPresetProtocol( GpgME::Protocol proto );
87 
88  GpgME::Protocol selectedProtocol() const;
89 
91 
92 
93  QFileInfoList resolvedFiles() const;
94  void setFiles( const QStringList & files );
95 
96  bool signingSelected() const;
97  void setSigningSelected( bool selected );
98 
99  bool encryptionSelected() const;
100  void setEncryptionSelected( bool selected );
101 
102  bool isSigningUserMutable() const;
103  void setSigningUserMutable( bool isMutable );
104 
105  bool isEncryptionUserMutable() const;
106  void setEncryptionUserMutable( bool isMutable );
107 
108  bool isMultipleProtocolsAllowed() const;
109  void setMultipleProtocolsAllowed( bool allowed );
110 
112 
113  void setRecipients( const std::vector<KMime::Types::Mailbox> & recipients, const std::vector<KMime::Types::Mailbox> & encryptoToSelfRecipients );
114 
118  bool recipientsUserMutable() const;
119  void setRecipientsUserMutable( bool isMutable );
120 
121  void setSignersAndCandidates( const std::vector<KMime::Types::Mailbox> & signers, const std::vector< std::vector<GpgME::Key> > & keys );
122 
123  void setTaskCollection( const boost::shared_ptr<TaskCollection> & tasks );
124 
125  std::vector<GpgME::Key> resolvedCertificates() const;
126  std::vector<GpgME::Key> resolvedSigners() const;
127 
128  bool isAsciiArmorEnabled() const;
129  void setAsciiArmorEnabled( bool enabled );
130 
131  bool removeUnencryptedFile() const;
132  void setRemoveUnencryptedFile( bool remove );
133 
134  bool keepResultPageOpenWhenDone() const;
135  void setKeepResultPageOpenWhenDone( bool keep );
136 
137  /*reimp*/ void onNext( int currentId );
138 
139  Q_SIGNALS:
140  void signersResolved();
141  void objectsResolved();
142  void recipientsResolved();
143  void linkActivated( const QString & link );
144 
145  protected:
146  Gui::SignerResolvePage* signerResolvePage();
147  const Gui::SignerResolvePage* signerResolvePage() const;
148  Gui::ObjectsPage* objectsPage();
149  Gui::ResultPage* resultPage();
150  Gui::ResolveRecipientsPage* resolveRecipientsPage();
151 
152  void setSignerResolvePageValidator( const boost::shared_ptr<SignerResolvePage::Validator>& validator );
153 
154  private:
155  class Private;
156  kdtools::pimpl_ptr<Private> d;
157  };
158 
159 }
160 }
161 }
162 
163 #endif /* __KLEOPATRA_CRYPTO_GUI_SIGNENCRYPTWIZARD_H__ */
Kleo::Crypto::Gui::SignEncryptWizard
Definition: signencryptwizard.h:70
Kleo::Crypto::Gui::SignEncryptWizard::setMultipleProtocolsAllowed
void setMultipleProtocolsAllowed(bool allowed)
Definition: signencryptwizard.cpp:187
Kleo::Crypto::Gui::SignEncryptWizard::signersResolved
void signersResolved()
Kleo::Crypto::Gui::SignEncryptWizard::isSigningUserMutable
bool isSigningUserMutable() const
Definition: signencryptwizard.cpp:166
Kleo::Crypto::Gui::SignEncryptWizard::keepResultPageOpenWhenDone
bool keepResultPageOpenWhenDone() const
Definition: signencryptwizard.cpp:301
kdtools::pimpl_ptr< Private >
pimpl_ptr.h
Kleo::Crypto::Gui::SignEncryptWizard::resultPage
Gui::ResultPage * resultPage()
Definition: signencryptwizard.cpp:296
Kleo::Crypto::Gui::SignEncryptWizard::~SignEncryptWizard
virtual ~SignEncryptWizard()
Definition: signencryptwizard.cpp:124
Kleo::Crypto::Gui::SignEncryptWizard::setFiles
void setFiles(const QStringList &files)
Definition: signencryptwizard.cpp:198
Kleo::Crypto::Gui::SignEncryptWizard::setSignerResolvePageValidator
void setSignerResolvePageValidator(const boost::shared_ptr< SignerResolvePage::Validator > &validator)
Definition: signencryptwizard.cpp:271
Kleo::Crypto::Gui::SignEncryptWizard::setSignersAndCandidates
void setSignersAndCandidates(const std::vector< KMime::Types::Mailbox > &signers, const std::vector< std::vector< GpgME::Key > > &keys)
Definition: signencryptwizard.cpp:222
Kleo::Crypto::Gui::SignEncryptWizard::linkActivated
void linkActivated(const QString &link)
Kleo::Crypto::Gui::SignEncryptWizard::objectsPage
Gui::ObjectsPage * objectsPage()
Definition: signencryptwizard.cpp:291
Kleo::Crypto::Gui::SignEncryptWizard::onNext
void onNext(int currentId)
Definition: signencryptwizard.cpp:102
QWidget
Kleo::Crypto::Gui::SignEncryptWizard::ObjectsPage
Definition: signencryptwizard.h:78
Kleo::Crypto::Gui::SignEncryptWizard::signingSelected
bool signingSelected() const
Definition: signencryptwizard.cpp:210
Kleo::Crypto::Gui::SignEncryptWizard::setRecipientsUserMutable
void setRecipientsUserMutable(bool isMutable)
Definition: signencryptwizard.cpp:266
Kleo::Crypto::Gui::SignEncryptWizard::Page
Page
Definition: signencryptwizard.h:76
Kleo::Crypto::Gui::SignEncryptWizard::setTaskCollection
void setTaskCollection(const boost::shared_ptr< TaskCollection > &tasks)
Definition: signencryptwizard.cpp:227
Kleo::Crypto::Gui::SignEncryptWizard::setEncryptionUserMutable
void setEncryptionUserMutable(bool isMutable)
Definition: signencryptwizard.cpp:193
Kleo::Crypto::Gui::SignEncryptWizard::resolvedCertificates
std::vector< GpgME::Key > resolvedCertificates() const
Definition: signencryptwizard.cpp:233
Kleo::Crypto::Gui::ResolveRecipientsPage
Definition: resolverecipientspage.h:63
Kleo::Crypto::Gui::SignEncryptWizard::recipientsUserMutable
bool recipientsUserMutable() const
if true, the user is allowed to remove/add recipients via the UI.
Definition: signencryptwizard.cpp:261
Kleo::Crypto::Gui::SignEncryptWizard::isAsciiArmorEnabled
bool isAsciiArmorEnabled() const
Definition: signencryptwizard.cpp:241
boost::shared_ptr< TaskCollection >
wizard.h
Kleo::Crypto::Gui::SignEncryptWizard::encryptionSelected
bool encryptionSelected() const
Definition: signencryptwizard.cpp:214
Kleo::Crypto::Gui::SignEncryptWizard::resolvedSigners
std::vector< GpgME::Key > resolvedSigners() const
Definition: signencryptwizard.cpp:237
d
#define d
Definition: adduseridcommand.cpp:90
Kleo::Crypto::Gui::SignEncryptWizard::setEncryptionSelected
void setEncryptionSelected(bool selected)
Definition: signencryptwizard.cpp:156
Kleo::Crypto::Gui::SignEncryptWizard::removeUnencryptedFile
bool removeUnencryptedFile() const
Definition: signencryptwizard.cpp:251
signerresolvepage.h
Kleo::Crypto::Gui::SignEncryptWizard::setRecipients
void setRecipients(const std::vector< KMime::Types::Mailbox > &recipients, const std::vector< KMime::Types::Mailbox > &encryptoToSelfRecipients)
Definition: signencryptwizard.cpp:218
Kleo::Crypto::Gui::SignEncryptWizard::setCommitPage
void setCommitPage(Page)
Definition: signencryptwizard.cpp:126
Kleo::Crypto::Gui::SignerResolvePage
Definition: signerresolvepage.h:57
Kleo::Crypto::Gui::SignEncryptWizard::ResolveRecipientsPage
Definition: signencryptwizard.h:79
Kleo::Crypto::Gui::SignEncryptWizard::ResolveSignerPage
Definition: signencryptwizard.h:77
Kleo::Crypto::Gui::SignEncryptWizard::isEncryptionUserMutable
bool isEncryptionUserMutable() const
Definition: signencryptwizard.cpp:176
Kleo::Crypto::Gui::SignEncryptWizard::resolveRecipientsPage
Gui::ResolveRecipientsPage * resolveRecipientsPage()
Definition: signencryptwizard.cpp:286
Kleo::Crypto::Gui::SignEncryptWizard::recipientsResolved
void recipientsResolved()
Kleo::Crypto::Gui::SignEncryptWizard::setAsciiArmorEnabled
void setAsciiArmorEnabled(bool enabled)
Definition: signencryptwizard.cpp:246
Kleo::Crypto::Gui::SignEncryptWizard::setPresetProtocol
void setPresetProtocol(GpgME::Protocol proto)
Definition: signencryptwizard.cpp:140
Kleo::Crypto::Gui::SignEncryptWizard::resolvedFiles
QFileInfoList resolvedFiles() const
SignOrEncryptFiles mode subinterface.
Definition: signencryptwizard.cpp:202
Kleo::Crypto::Gui::SignEncryptWizard::setSigningUserMutable
void setSigningUserMutable(bool isMutable)
Definition: signencryptwizard.cpp:171
Kleo::Crypto::Gui::Wizard
Definition: wizard.h:48
Kleo::Crypto::Gui::ResultPage
Definition: resultpage.h:53
Kleo::Crypto::Gui::SignEncryptWizard::objectsResolved
void objectsResolved()
Kleo::Crypto::Gui::SignEncryptWizard::isMultipleProtocolsAllowed
bool isMultipleProtocolsAllowed() const
Definition: signencryptwizard.cpp:182
Kleo::Crypto::Gui::SignEncryptWizard::selectedProtocol
GpgME::Protocol selectedProtocol() const
Definition: signencryptwizard.cpp:146
Kleo::Crypto::Gui::ObjectsPage
Definition: objectspage.h:46
QFileInfoList
QList< QFileInfo > QFileInfoList
Definition: signencryptwizard.h:54
Kleo::Crypto::Gui::SignEncryptWizard::setKeepResultPageOpenWhenDone
void setKeepResultPageOpenWhenDone(bool keep)
Definition: signencryptwizard.cpp:306
Kleo::Crypto::Gui::SignEncryptWizard::setSigningSelected
void setSigningSelected(bool selected)
Definition: signencryptwizard.cpp:161
Kleo::Crypto::Gui::SignEncryptWizard::presetProtocol
GpgME::Protocol presetProtocol() const
Definition: signencryptwizard.cpp:151
Kleo::Crypto::Gui::SignEncryptWizard::setRemoveUnencryptedFile
void setRemoveUnencryptedFile(bool remove)
Definition: signencryptwizard.cpp:256
QList
Definition: commands/command.h:46
Kleo::Crypto::Gui::SignEncryptWizard::signerResolvePage
Gui::SignerResolvePage * signerResolvePage()
Definition: signencryptwizard.cpp:276
Kleo::Crypto::Gui::SignEncryptWizard::SignEncryptWizard
SignEncryptWizard(QWidget *parent=0, Qt::WindowFlags f=0)
Definition: signencryptwizard.cpp:118
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:56:42 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kleopatra

Skip menu "kleopatra"
  • 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