kleopatra
resolverecipientspage.cpp
Go to the documentation of this file.
79 ResolveRecipientsPage::ListWidget::ListWidget( QWidget* parent, Qt::WindowFlags flags ) : QWidget( parent, flags ), m_protocol( UnknownProtocol )
111 void ResolveRecipientsPage::ListWidget::addEntry( const QString& id, const QString& name, const Mailbox& mbox )
131 void ResolveRecipientsPage::ListWidget::setCertificates( const QString& id, const std::vector<Key>& pgp, const std::vector<Key>& cms )
143 GpgME::Key ResolveRecipientsPage::ListWidget::selectedCertificate( const QString& id, GpgME::Protocol prot ) const
190 ResolveRecipientsPage::ItemWidget::ItemWidget( const QString& id, const QString& name, const Mailbox& mbox,
191 QWidget* parent, Qt::WindowFlags flags ) : QWidget( parent, flags ), m_id( id ), m_mailbox( mbox ), m_protocol( UnknownProtocol ), m_selected( false )
258 static CertificateSelectionDialog * createCertificateSelectionDialog( QWidget* parent, GpgME::Protocol prot ) {
271 QPointer<CertificateSelectionDialog> dlg = createCertificateSelectionDialog( this, m_protocol );
340 void ResolveRecipientsPage::ItemWidget::setCertificates( const std::vector<Key>& pgp, const std::vector<Key>& cms )
350 return KeyCache::instance()->findByKeyIDOrFingerprint( m_certCombo->itemData( m_certCombo->currentIndex(), ListWidget::IdRole ).toString().toStdString() );
352 const QString tmpStr = m_certCombo->itemData( m_certCombo->currentIndex(), ListWidget::IdRole ).toString();
370 certs.push_back( KeyCache::instance()->findByKeyIDOrFingerprint( m_certCombo->itemData( i, ListWidget::IdRole ).toString().toStdString() ) );
413 : q( qq ), m_presetProtocol( UnknownProtocol ), m_selectedProtocol( m_presetProtocol ), m_multipleProtocolsAllowed( false ), m_recipientPreferences()
463 const bool haveSecret = std::find_if( keys.begin(), keys.end(), boost::bind( &Key::hasSecret, _1 ) ) != keys.end();
465 q->setExplanation( i18n( "<b>Warning:</b> None of the selected certificates seem to be your own. You will not be able to decrypt the encrypted data again." ) );
574 QPointer<CertificateSelectionDialog> dlg = createCertificateSelectionDialog( q, q->selectedProtocol() );
586 const std::vector<Key> pgp = key.protocol() == OpenPGP ? std::vector<Key>( 1, key ) : std::vector<Key>();
587 const std::vector<Key> cms = key.protocol() == CMS ? std::vector<Key>( 1, key ) : std::vector<Key>();
595 std::vector<Key> makeSuggestions( const boost::shared_ptr<RecipientPreferences>& prefs, const Mailbox& mb, GpgME::Protocol prot )
613 void ResolveRecipientsPage::setAdditionalRecipientsInfo( const std::vector<Key> & recipients ) {
622 void ResolveRecipientsPage::setRecipients( const std::vector<Mailbox>& recipients, const std::vector<Mailbox> & encryptToSelfRecipients )
692 void ResolveRecipientsPage::setRecipientPreferences( const boost::shared_ptr<RecipientPreferences>& prefs )
QLayout * layout() const
void setOptions(Options options)
Definition: certificateselectiondialog.cpp:208
Definition: resolverecipientspage_p.h:71
bool isComplete() const
Definition: resolverecipientspage.cpp:484
void removeEntry(const QString &id)
Definition: resolverecipientspage.cpp:162
void setSelectionMode(QAbstractItemView::SelectionMode mode)
void setMultipleProtocolsAllowed(bool allowed)
Definition: resolverecipientspage.cpp:548
void setPresetProtocol(GpgME::Protocol protocol)
Definition: resolverecipientspage.cpp:527
void addButton(QAbstractButton *button)
void showSelectionDialog()
Definition: resolverecipientspage.cpp:269
void setCertificates(const std::vector< GpgME::Key > &pgp, const std::vector< GpgME::Key > &cms)
Definition: resolverecipientspage.cpp:340
void addEntry(const QString &id, const QString &name)
Definition: resolverecipientspage.cpp:106
void setProtocol(GpgME::Protocol prot)
Definition: resolverecipientspage.cpp:153
bool contains(const QString &str, Qt::CaseSensitivity cs) const
visible
static QString listKeysForInfo(const std::vector< Key > &keys)
Definition: resolverecipientspage.cpp:607
bool isSelected() const
Definition: resolverecipientspage.cpp:245
void completeChanged()
QString join(const QString &separator) const
int length() const
void addSpacing(int size)
void setRecipientsUserMutable(bool isMutable)
Definition: resolverecipientspage.cpp:675
QString id() const
Definition: resolverecipientspage.cpp:228
QString formatForComboBox(const GpgME::Key &key)
Definition: formatting.cpp:497
std::vector< GpgME::Key > resolvedCertificates() const
Definition: resolverecipientspage.cpp:651
const char * name() const
void setEnabled(bool)
void addWidget(QWidget *widget, int stretch, QFlags< Qt::AlignmentFlag > alignment)
QString number(int n, int base)
void append(const T &value)
~ResolveRecipientsPage()
Definition: resolverecipientspage.cpp:504
static std::vector< GpgME::Key > resolveRecipient(const KMime::Types::Mailbox &recipient, GpgME::Protocol proto)
Definition: certificateresolver.cpp:69
GpgME::Key selectedCertificate() const
Definition: resolverecipientspage.cpp:347
Definition: classify.h:49
void setForegroundRole(QPalette::ColorRole role)
bool isEmpty() const
bool isEmpty() const
const char * constData() const
virtual QVariant data(int role) const
Definition: classify.h:48
void setText(const QString &)
Definition: commands/command.h:46
bool multipleProtocolsAllowed() const
Definition: resolverecipientspage.cpp:543
std::vector< GpgME::Key > certificates() const
Definition: resolverecipientspage.cpp:365
QStringList identifiers() const
Definition: resolverecipientspage.cpp:148
void setMargin(int margin)
void setRecipientPreferences(const boost::shared_ptr< RecipientPreferences > &prefs)
Definition: resolverecipientspage.cpp:692
GpgME::Protocol selectedProtocol() const
The protocol selected by the user (which is chosen by the user in case none was preset) ...
Definition: resolverecipientspage.cpp:506
void setCertificates(const QString &id, const std::vector< GpgME::Key > &pgpCerts, const std::vector< GpgME::Key > &cmsCerts)
Definition: resolverecipientspage.cpp:131
virtual void setData(int role, const QVariant &value)
sizeHint
static CertificateSelectionDialog * createCertificateSelectionDialog(QWidget *parent, GpgME::Protocol prot)
Definition: resolverecipientspage.cpp:258
ResolveRecipientsPage(QWidget *parent=0)
Definition: resolverecipientspage.cpp:499
QStringList selectedEntries() const
Definition: resolverecipientspage.cpp:179
void setProtocol(GpgME::Protocol protocol)
Definition: resolverecipientspage.cpp:329
bool recipientsUserMutable() const
if true, the user is allowed to remove/add recipients via the UI.
Definition: resolverecipientspage.cpp:681
QByteArray toLatin1() const
void showSelectionDialog(const QString &id)
Definition: resolverecipientspage.cpp:172
void addStretch(int stretch)
int count() const
KMime::Types::Mailbox mailbox() const
Definition: resolverecipientspage.cpp:283
QWidget(QWidget *parent, QFlags< Qt::WindowType > f)
KMime::Types::Mailbox mailbox(const QString &id) const
Definition: resolverecipientspage.cpp:126
static boost::shared_ptr< const KeyCache > instance()
Definition: keycache.cpp:190
static CertificateSelectionDialog::Option protocol2option(GpgME::Protocol proto)
Definition: resolverecipientspage.cpp:250
void setText(const QString &text)
void setSelected(bool selected)
Definition: resolverecipientspage.cpp:233
typedef WindowFlags
void setAutoFillBackground(bool enabled)
~ItemWidget()
Definition: resolverecipientspage.cpp:224
~ListWidget()
Definition: resolverecipientspage.cpp:88
void setBackgroundRole(QPalette::ColorRole role)
Definition: wizardpage.h:48
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QObject * parent() const
void setAdditionalRecipientsInfo(const std::vector< GpgME::Key > &recipients)
Definition: resolverecipientspage.cpp:613
QString formatKeyLink(const GpgME::Key &key)
QString toString() const
iterator begin()
boost::shared_ptr< RecipientPreferences > recipientPreferences() const
Definition: resolverecipientspage.cpp:687
void setWordWrap(bool on)
GpgME::Protocol presetProtocol() const
the protocol set before the dialog is shown.
Definition: resolverecipientspage.cpp:538
ItemWidget(const QString &id, const QString &name, const KMime::Types::Mailbox &mbox, QWidget *parent=0, Qt::WindowFlags flags=0)
Definition: resolverecipientspage.cpp:190
void setRecipients(const std::vector< KMime::Types::Mailbox > &recipients, const std::vector< KMime::Types::Mailbox > &encryptToSelfRecipients)
Definition: resolverecipientspage.cpp:622
Definition: classify.h:58
GpgME::Key selectedCertificate(const QString &id) const
Definition: resolverecipientspage.cpp:137
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
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.