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

kleopatra

  • sources
  • kde-4.14
  • 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 #ifndef Q_MOC_RUN
46 #include <boost/shared_ptr.hpp>
47 #endif
48 
49 #include <vector>
50 
51 namespace GpgME {
52  class Key;
53 }
54 
55 class QFileInfo;
56 template <typename T> class QList;
57 typedef QList<QFileInfo> QFileInfoList;
58 
59 namespace Kleo {
60 namespace Crypto {
61 
62  class Task;
63  class TaskCollection;
64 
65 namespace Gui {
66 
67  class ObjectsPage;
68  class ResolveRecipientsPage;
69  class ResultPage;
70  class SignerResolvePage;
71 
72  class SignEncryptWizard : public Wizard {
73  Q_OBJECT
74  public:
75  explicit SignEncryptWizard( QWidget * parent=0, Qt::WindowFlags f=0 );
76  virtual ~SignEncryptWizard();
77 
78  enum Page {
79  ResolveSignerPage=0,
80  ObjectsPage,
81  ResolveRecipientsPage,
82  ResultPage
83  };
84 
85  void setCommitPage( Page );
86 
87  GpgME::Protocol presetProtocol() const;
88  void setPresetProtocol( GpgME::Protocol proto );
89 
90  GpgME::Protocol selectedProtocol() const;
91 
93 
94 
95  QFileInfoList resolvedFiles() const;
96  void setFiles( const QStringList & files );
97 
98  bool signingSelected() const;
99  void setSigningSelected( bool selected );
100 
101  bool encryptionSelected() const;
102  void setEncryptionSelected( bool selected );
103 
104  bool isSigningUserMutable() const;
105  void setSigningUserMutable( bool isMutable );
106 
107  bool isEncryptionUserMutable() const;
108  void setEncryptionUserMutable( bool isMutable );
109 
110  bool isMultipleProtocolsAllowed() const;
111  void setMultipleProtocolsAllowed( bool allowed );
112 
114 
115  void setRecipients( const std::vector<KMime::Types::Mailbox> & recipients, const std::vector<KMime::Types::Mailbox> & encryptoToSelfRecipients );
116 
120  bool recipientsUserMutable() const;
121  void setRecipientsUserMutable( bool isMutable );
122 
123  void setSignersAndCandidates( const std::vector<KMime::Types::Mailbox> & signers, const std::vector< std::vector<GpgME::Key> > & keys );
124 
125  void setTaskCollection( const boost::shared_ptr<TaskCollection> & tasks );
126 
127  std::vector<GpgME::Key> resolvedCertificates() const;
128  std::vector<GpgME::Key> resolvedSigners() const;
129 
130  bool isAsciiArmorEnabled() const;
131  void setAsciiArmorEnabled( bool enabled );
132 
133  bool removeUnencryptedFile() const;
134  void setRemoveUnencryptedFile( bool remove );
135 
136  bool keepResultPageOpenWhenDone() const;
137  void setKeepResultPageOpenWhenDone( bool keep );
138 
139  /*reimp*/ void onNext( int currentId );
140 
141  Q_SIGNALS:
142  void signersResolved();
143  void objectsResolved();
144  void recipientsResolved();
145  void linkActivated( const QString & link );
146 
147  protected:
148  Gui::SignerResolvePage* signerResolvePage();
149  const Gui::SignerResolvePage* signerResolvePage() const;
150  Gui::ObjectsPage* objectsPage();
151  Gui::ResultPage* resultPage();
152  Gui::ResolveRecipientsPage* resolveRecipientsPage();
153 
154  void setSignerResolvePageValidator( const boost::shared_ptr<SignerResolvePage::Validator>& validator );
155 
156  private:
157  class Private;
158  kdtools::pimpl_ptr<Private> d;
159  };
160 
161 }
162 }
163 }
164 
165 #endif /* __KLEOPATRA_CRYPTO_GUI_SIGNENCRYPTWIZARD_H__ */
Kleo::Crypto::Gui::SignEncryptWizard
Definition: signencryptwizard.h:72
Kleo::Crypto::Gui::SignEncryptWizard::setMultipleProtocolsAllowed
void setMultipleProtocolsAllowed(bool allowed)
Definition: signencryptwizard.cpp:188
Kleo::Crypto::Gui::SignEncryptWizard::signersResolved
void signersResolved()
Kleo::Crypto::Gui::SignEncryptWizard::isSigningUserMutable
bool isSigningUserMutable() const
Definition: signencryptwizard.cpp:167
QWidget
Kleo::Crypto::Gui::SignEncryptWizard::keepResultPageOpenWhenDone
bool keepResultPageOpenWhenDone() const
Definition: signencryptwizard.cpp:302
kdtools::pimpl_ptr< Private >
pimpl_ptr.h
Kleo::Crypto::Gui::SignEncryptWizard::resultPage
Gui::ResultPage * resultPage()
Definition: signencryptwizard.cpp:297
Kleo::Crypto::Gui::SignEncryptWizard::~SignEncryptWizard
virtual ~SignEncryptWizard()
Definition: signencryptwizard.cpp:125
Kleo::Crypto::Gui::SignEncryptWizard::setFiles
void setFiles(const QStringList &files)
Definition: signencryptwizard.cpp:199
Kleo::Crypto::Gui::SignEncryptWizard::setSignerResolvePageValidator
void setSignerResolvePageValidator(const boost::shared_ptr< SignerResolvePage::Validator > &validator)
Definition: signencryptwizard.cpp:272
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:223
Kleo::Crypto::Gui::SignEncryptWizard::linkActivated
void linkActivated(const QString &link)
Kleo::Crypto::Gui::SignEncryptWizard::objectsPage
Gui::ObjectsPage * objectsPage()
Definition: signencryptwizard.cpp:292
Kleo::Crypto::Gui::SignEncryptWizard::onNext
void onNext(int currentId)
Definition: signencryptwizard.cpp:103
Kleo::Crypto::Gui::SignEncryptWizard::ObjectsPage
Definition: signencryptwizard.h:80
Kleo::Crypto::Gui::SignEncryptWizard::signingSelected
bool signingSelected() const
Definition: signencryptwizard.cpp:211
Kleo::Crypto::Gui::SignEncryptWizard::setRecipientsUserMutable
void setRecipientsUserMutable(bool isMutable)
Definition: signencryptwizard.cpp:267
Kleo::Crypto::Gui::SignEncryptWizard::Page
Page
Definition: signencryptwizard.h:78
Kleo::Crypto::Gui::SignEncryptWizard::setTaskCollection
void setTaskCollection(const boost::shared_ptr< TaskCollection > &tasks)
Definition: signencryptwizard.cpp:228
Kleo::Crypto::Gui::SignEncryptWizard::setEncryptionUserMutable
void setEncryptionUserMutable(bool isMutable)
Definition: signencryptwizard.cpp:194
Kleo::Crypto::Gui::SignEncryptWizard::resolvedCertificates
std::vector< GpgME::Key > resolvedCertificates() const
Definition: signencryptwizard.cpp:234
Kleo::Crypto::Gui::ResolveRecipientsPage
Definition: resolverecipientspage.h:65
Kleo::Crypto::Gui::SignEncryptWizard::recipientsUserMutable
bool recipientsUserMutable() const
if true, the user is allowed to remove/add recipients via the UI.
Definition: signencryptwizard.cpp:262
Kleo::Crypto::Gui::SignEncryptWizard::isAsciiArmorEnabled
bool isAsciiArmorEnabled() const
Definition: signencryptwizard.cpp:242
boost::shared_ptr< TaskCollection >
wizard.h
Kleo::Crypto::Gui::SignEncryptWizard::encryptionSelected
bool encryptionSelected() const
Definition: signencryptwizard.cpp:215
Kleo::Crypto::Gui::SignEncryptWizard::resolvedSigners
std::vector< GpgME::Key > resolvedSigners() const
Definition: signencryptwizard.cpp:238
QWidget::enabled
enabled
d
#define d
Definition: adduseridcommand.cpp:89
Kleo::Crypto::Gui::SignEncryptWizard::setEncryptionSelected
void setEncryptionSelected(bool selected)
Definition: signencryptwizard.cpp:157
Kleo::Crypto::Gui::SignEncryptWizard::removeUnencryptedFile
bool removeUnencryptedFile() const
Definition: signencryptwizard.cpp:252
signerresolvepage.h
QString
QList
Definition: commands/command.h:46
Kleo::Crypto::Gui::SignEncryptWizard::setRecipients
void setRecipients(const std::vector< KMime::Types::Mailbox > &recipients, const std::vector< KMime::Types::Mailbox > &encryptoToSelfRecipients)
Definition: signencryptwizard.cpp:219
QStringList
Kleo::Crypto::Gui::SignEncryptWizard::setCommitPage
void setCommitPage(Page)
Definition: signencryptwizard.cpp:127
Kleo::Crypto::Gui::SignerResolvePage
Definition: signerresolvepage.h:59
Kleo::Crypto::Gui::SignEncryptWizard::ResolveRecipientsPage
Definition: signencryptwizard.h:81
QFileInfo
Kleo::Crypto::Gui::SignEncryptWizard::ResolveSignerPage
Definition: signencryptwizard.h:79
Kleo::Crypto::Gui::SignEncryptWizard::isEncryptionUserMutable
bool isEncryptionUserMutable() const
Definition: signencryptwizard.cpp:177
Kleo::Crypto::Gui::SignEncryptWizard::resolveRecipientsPage
Gui::ResolveRecipientsPage * resolveRecipientsPage()
Definition: signencryptwizard.cpp:287
Kleo::Crypto::Gui::SignEncryptWizard::recipientsResolved
void recipientsResolved()
Kleo::Crypto::Gui::SignEncryptWizard::setAsciiArmorEnabled
void setAsciiArmorEnabled(bool enabled)
Definition: signencryptwizard.cpp:247
Kleo::Crypto::Gui::SignEncryptWizard::setPresetProtocol
void setPresetProtocol(GpgME::Protocol proto)
Definition: signencryptwizard.cpp:141
Kleo::Crypto::Gui::SignEncryptWizard::resolvedFiles
QFileInfoList resolvedFiles() const
SignOrEncryptFiles mode subinterface.
Definition: signencryptwizard.cpp:203
Kleo::Crypto::Gui::SignEncryptWizard::setSigningUserMutable
void setSigningUserMutable(bool isMutable)
Definition: signencryptwizard.cpp:172
Kleo::Crypto::Gui::Wizard
Definition: wizard.h:49
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:183
Kleo::Crypto::Gui::SignEncryptWizard::selectedProtocol
GpgME::Protocol selectedProtocol() const
Definition: signencryptwizard.cpp:147
Qt::WindowFlags
typedef WindowFlags
Kleo::Crypto::Gui::ObjectsPage
Definition: objectspage.h:46
QFileInfoList
QList< QFileInfo > QFileInfoList
Definition: signencryptwizard.h:56
QObject::parent
QObject * parent() const
Kleo::Crypto::Gui::SignEncryptWizard::setKeepResultPageOpenWhenDone
void setKeepResultPageOpenWhenDone(bool keep)
Definition: signencryptwizard.cpp:307
Kleo::Crypto::Gui::SignEncryptWizard::setSigningSelected
void setSigningSelected(bool selected)
Definition: signencryptwizard.cpp:162
Kleo::Crypto::Gui::SignEncryptWizard::presetProtocol
GpgME::Protocol presetProtocol() const
Definition: signencryptwizard.cpp:152
Kleo::Crypto::Gui::SignEncryptWizard::setRemoveUnencryptedFile
void setRemoveUnencryptedFile(bool remove)
Definition: signencryptwizard.cpp:257
Kleo::Crypto::Gui::SignEncryptWizard::signerResolvePage
Gui::SignerResolvePage * signerResolvePage()
Definition: signencryptwizard.cpp:277
Kleo::Crypto::Gui::SignEncryptWizard::SignEncryptWizard
SignEncryptWizard(QWidget *parent=0, Qt::WindowFlags f=0)
Definition: signencryptwizard.cpp:119
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:33:11 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
  • pimprint

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