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

kmail

  • sources
  • kde-4.14
  • kdepim
  • kmail
  • configuredialog
configuresecuritypage.cpp
Go to the documentation of this file.
1 /*
2  Copyright (c) 2013-2015 Montel Laurent <montel@kde.org>
3 
4  This program is free software; you can redistribute it and/or modify it
5  under the terms of the GNU General Public License, version 2, as
6  published by the Free Software Foundation.
7 
8  This program is distributed in the hope that it will be useful, but
9  WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License along
14  with this program; if not, write to the Free Software Foundation, Inc.,
15  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16 */
17 
18 #include "configuresecuritypage.h"
19 #include "pimcommon/widgets/configureimmutablewidgetutils.h"
20 using namespace PimCommon::ConfigureImmutableWidgetUtils;
21 #include "messageviewer/settings/globalsettings.h"
22 #include "messagecomposer/settings/messagecomposersettings.h"
23 #include "messageviewer/adblock/adblocksettingwidget.h"
24 #include "mailcommon/folder/foldercollection.h"
25 #include "settings/globalsettings.h"
26 
27 #include "kmkernel.h"
28 
29 #include "kleo/cryptoconfig.h"
30 #include "kleo/cryptobackendfactory.h"
31 #include "libkleo/ui/keyrequester.h"
32 #include "libkleo/ui/keyselectiondialog.h"
33 #include "libkleo/ui/cryptoconfigdialog.h"
34 
35 #include <KLocalizedString>
36 #include <KCMultiDialog>
37 #include <KMessageBox>
38 #include <QWhatsThis>
39 #include <QDBusConnection>
40 
41 QString SecurityPage::helpAnchor() const
42 {
43  return QString::fromLatin1("configure-security");
44 }
45 
46 SecurityPage::SecurityPage( const KComponentData &instance, QWidget *parent )
47  : ConfigModuleWithTabs( instance, parent )
48 {
49  //
50  // "Reading" tab:
51  //
52  mGeneralTab = new GeneralTab(); // @TODO: rename
53  addTab( mGeneralTab, i18n("Reading") );
54 
55  addTab( new MDNTab(), i18n("Message Disposition Notifications") );
56 
57  //
58  // "Composing" tab:
59  //
60  mComposerCryptoTab = new ComposerCryptoTab();
61  addTab( mComposerCryptoTab, i18n("Composing") );
62 
63  //
64  // "Warnings" tab:
65  //
66  mWarningTab = new WarningTab();
67  addTab( mWarningTab, i18n("Miscellaneous") );
68 
69  //
70  // "S/MIME Validation" tab:
71  //
72  mSMimeTab = new SMimeTab();
73  addTab( mSMimeTab, i18n("S/MIME Validation") );
74 #ifndef KDEPIM_NO_WEBKIT
75  mSAdBlockTab = new SecurityPageAdBlockTab;
76  addTab( mSAdBlockTab, i18n("Ad block") );
77 #endif
78 }
79 
80 QString SecurityPage::GeneralTab::helpAnchor() const
81 {
82  return QString::fromLatin1("configure-security-reading");
83 }
84 
85 SecurityPageGeneralTab::SecurityPageGeneralTab( QWidget * parent )
86  : ConfigModuleTab( parent )
87 {
88  mSGTab.setupUi( this );
89 
90  connect( mSGTab.mHtmlMailCheck, SIGNAL(stateChanged(int)),
91  this, SLOT(slotEmitChanged()) );
92  connect( mSGTab.mExternalReferences, SIGNAL(stateChanged(int)),
93  this, SLOT(slotEmitChanged()) );
94  connect(mSGTab.labelWarnHTML, SIGNAL(linkActivated(QString)),
95  SLOT(slotLinkClicked(QString)));
96 
97  connect( mSGTab.mAlwaysDecrypt, SIGNAL(stateChanged(int)),
98  this, SLOT(slotEmitChanged()) );
99 
100  connect( mSGTab.mAutomaticallyImportAttachedKeysCheck, SIGNAL(toggled(bool)),
101  SLOT(slotEmitChanged()) );
102 
103  connect( mSGTab.mScamDetection, SIGNAL(toggled(bool)),
104  SLOT(slotEmitChanged()) );
105 
106  connect( mSGTab.scamWhiteList, SIGNAL(changed()),
107  SLOT(slotEmitChanged()) );
108 }
109 
110 void SecurityPageGeneralTab::slotLinkClicked( const QString & link )
111 {
112  if ( link == QLatin1String( "whatsthis1" ) )
113  QWhatsThis::showText( QCursor::pos(), mSGTab.mHtmlMailCheck->whatsThis() );
114  else if (link == QLatin1String( "whatsthis2" ) )
115  QWhatsThis::showText( QCursor::pos(), mSGTab.mExternalReferences->whatsThis() );
116 }
117 
118 void SecurityPage::GeneralTab::doLoadOther()
119 {
120  loadWidget(mSGTab.mHtmlMailCheck, MessageViewer::GlobalSettings::self()->htmlMailItem() );
121  loadWidget(mSGTab.mExternalReferences, MessageViewer::GlobalSettings::self()->htmlLoadExternalItem());
122  loadWidget(mSGTab.mAutomaticallyImportAttachedKeysCheck, MessageViewer::GlobalSettings::self()->autoImportKeysItem() );
123  loadWidget(mSGTab.mAlwaysDecrypt, MessageViewer::GlobalSettings::self()->alwaysDecryptItem() );
124 
125  loadWidget(mSGTab.mScamDetection, MessageViewer::GlobalSettings::self()->scamDetectionEnabledItem());
126  loadWidget(mSGTab.scamWhiteList, MessageViewer::GlobalSettings::self()->scamDetectionWhiteListItem());
127 }
128 
129 void SecurityPage::GeneralTab::save()
130 {
131  if ( MessageViewer::GlobalSettings::self()->htmlMail() != mSGTab.mHtmlMailCheck->isChecked())
132  {
133  if (KMessageBox::warningContinueCancel(this, i18n("Changing the global "
134  "HTML setting will override all folder specific values."), QString(),
135  KStandardGuiItem::cont(), KStandardGuiItem::cancel(), QLatin1String("htmlMailOverride")) == KMessageBox::Continue)
136  {
137  saveCheckBox(mSGTab.mHtmlMailCheck, MessageViewer::GlobalSettings::self()->htmlMailItem());
138  if (kmkernel) {
139  foreach( const Akonadi::Collection &collection, kmkernel->allFolders() ) {
140  KConfigGroup config( KMKernel::self()->config(), MailCommon::FolderCollection::configGroupName(collection) );
141  //Old config
142  config.deleteEntry("htmlMailOverride");
143  config.deleteEntry("displayFormatOverride");
144  }
145  }
146  }
147  }
148  saveCheckBox(mSGTab.mExternalReferences, MessageViewer::GlobalSettings::self()->htmlLoadExternalItem());
149 
150  saveCheckBox(mSGTab.mAutomaticallyImportAttachedKeysCheck, MessageViewer::GlobalSettings::self()->autoImportKeysItem() );
151  saveCheckBox(mSGTab.mAlwaysDecrypt, MessageViewer::GlobalSettings::self()->alwaysDecryptItem() );
152  saveCheckBox(mSGTab.mScamDetection, MessageViewer::GlobalSettings::self()->scamDetectionEnabledItem());
153  saveSimpleStringListEditor(mSGTab.scamWhiteList, MessageViewer::GlobalSettings::self()->scamDetectionWhiteListItem());
154 }
155 
156 //Adblock
157 
158 #ifndef KDEPIM_NO_WEBKIT
159 QString SecurityPageAdBlockTab::helpAnchor() const
160 {
161  return QString();
162 }
163 
164 
165 SecurityPageAdBlockTab::SecurityPageAdBlockTab( QWidget * parent )
166  : ConfigModuleTab( parent )
167 {
168  QHBoxLayout *lay = new QHBoxLayout;
169  lay->setMargin(0);
170 
171  mWidget = new MessageViewer::AdBlockSettingWidget;
172  lay->addWidget(mWidget);
173  connect(mWidget, SIGNAL(changed(bool)), SLOT(slotEmitChanged()));
174  setLayout(lay);
175 }
176 
177 SecurityPageAdBlockTab::~SecurityPageAdBlockTab()
178 {
179 }
180 
181 void SecurityPageAdBlockTab::save()
182 {
183  mWidget->save();
184 }
185 
186 void SecurityPageAdBlockTab::doLoadFromGlobalSettings()
187 {
188  mWidget->doLoadFromGlobalSettings();
189 }
190 
191 void SecurityPageAdBlockTab::doLoadOther()
192 {
193 
194 }
195 
196 void SecurityPageAdBlockTab::doResetToDefaultsOther()
197 {
198  mWidget->doResetToDefaultsOther();
199 }
200 #endif
201 
202 QString SecurityPage::MDNTab::helpAnchor() const
203 {
204  return QString::fromLatin1("configure-security-mdn");
205 }
206 
207 SecurityPageMDNTab::SecurityPageMDNTab( QWidget * parent )
208  : ConfigModuleTab( parent )
209 {
210  mUi.setupUi( this );
211 
212  // "ignore", "ask", "deny", "always send" radiobuttons
213  mMDNGroup = new QButtonGroup( this );
214  connect( mMDNGroup, SIGNAL(buttonClicked(int)),
215  this, SLOT(slotEmitChanged()) );
216  mMDNGroup->addButton( mUi.radioIgnore, 0 );
217  mMDNGroup->addButton( mUi.radioAsk, 1 );
218  mMDNGroup->addButton( mUi.radioDeny, 2 );
219  mMDNGroup->addButton( mUi.radioAlways, 3 );
220 
221  // "Original Message quote" radiobuttons
222  mOrigQuoteGroup = new QButtonGroup( this );
223  connect( mOrigQuoteGroup, SIGNAL(buttonClicked(int)),
224  this, SLOT(slotEmitChanged()) );
225  mOrigQuoteGroup->addButton( mUi.radioNothing, 0 );
226  mOrigQuoteGroup->addButton( mUi.radioFull, 1 );
227  mOrigQuoteGroup->addButton( mUi.radioHeaders, 2 );
228 
229  connect( mUi.mNoMDNsWhenEncryptedCheck, SIGNAL(toggled(bool)), SLOT(slotEmitChanged()) );
230  connect( mUi.labelWarning, SIGNAL(linkActivated(QString)),
231  SLOT(slotLinkClicked(QString)) );
232 }
233 
234 void SecurityPageMDNTab::slotLinkClicked( const QString & link )
235 {
236  if ( link == QLatin1String( "whatsthis-mdn" ) )
237  QWhatsThis::showText( QCursor::pos(), mUi.radioIgnore->whatsThis() );
238 }
239 
240 void SecurityPage::MDNTab::doLoadOther()
241 {
242  int num = MessageViewer::GlobalSettings::self()->defaultPolicy();
243  if ( num < 0 || num >= mMDNGroup->buttons().count() ) num = 0;
244  mMDNGroup->button(num)->setChecked(true);
245  num = MessageViewer::GlobalSettings::self()->quoteMessage();
246  if ( num < 0 || num >= mOrigQuoteGroup->buttons().count() ) num = 0;
247  mOrigQuoteGroup->button(num)->setChecked(true);
248  loadWidget(mUi.mNoMDNsWhenEncryptedCheck, MessageViewer::GlobalSettings::self()->notSendWhenEncryptedItem());
249 }
250 
251 void SecurityPage::MDNTab::save()
252 {
253  MessageViewer::GlobalSettings::self()->setDefaultPolicy( mMDNGroup->checkedId() );
254  MessageViewer::GlobalSettings::self()->setQuoteMessage( mOrigQuoteGroup->checkedId() );
255  saveCheckBox(mUi.mNoMDNsWhenEncryptedCheck, MessageViewer::GlobalSettings::self()->notSendWhenEncryptedItem());
256 }
257 
258 QString SecurityPage::ComposerCryptoTab::helpAnchor() const
259 {
260  return QString::fromLatin1("configure-security-composing");
261 }
262 
263 SecurityPageComposerCryptoTab::SecurityPageComposerCryptoTab( QWidget * parent )
264  : ConfigModuleTab( parent )
265 {
266  mWidget = new Ui::ComposerCryptoConfiguration;
267  mWidget->setupUi( this );
268  mWidget->mStoreEncrypted->setEnabled(false);
269  connect( mWidget->mEncToSelf, SIGNAL(toggled(bool)), this, SLOT(slotEmitChanged()) );
270  connect( mWidget->mShowKeyApprovalDlg, SIGNAL(toggled(bool)), this, SLOT(slotEmitChanged()) );
271  connect( mWidget->mAutoEncrypt, SIGNAL(toggled(bool)), this, SLOT(slotEmitChanged()) );
272  connect( mWidget->mNeverEncryptWhenSavingInDrafts, SIGNAL(toggled(bool)), this, SLOT(slotEmitChanged()) );
273  connect( mWidget->mStoreEncrypted, SIGNAL(toggled(bool)), this, SLOT(slotEmitChanged()) );
274  connect( mWidget->mShowEncSignIndicator, SIGNAL(toggled(bool)), this, SLOT(slotEmitChanged()) );
275 }
276 
277 SecurityPageComposerCryptoTab::~SecurityPageComposerCryptoTab()
278 {
279  delete mWidget;
280 }
281 
282 void SecurityPage::ComposerCryptoTab::doLoadOther()
283 {
284  // If you change default values, sync messagecomposer.cpp too
285 
286  loadWidget(mWidget->mEncToSelf, MessageComposer::MessageComposerSettings::self()->cryptoEncryptToSelfItem());
287  loadWidget(mWidget->mShowKeyApprovalDlg, MessageComposer::MessageComposerSettings::self()->cryptoShowKeysForApprovalItem() );
288 
289  loadWidget(mWidget->mAutoEncrypt, MessageComposer::MessageComposerSettings::self()->pgpAutoEncryptItem() ) ;
290  loadWidget(mWidget->mNeverEncryptWhenSavingInDrafts,GlobalSettings::self()->neverEncryptDraftsItem() );
291 
292  loadWidget(mWidget->mStoreEncrypted, GlobalSettings::self()->cryptoStoreEncryptedItem() );
293  loadWidget(mWidget->mShowEncSignIndicator, GlobalSettings::self()->showCryptoLabelIndicatorItem() );
294 }
295 
296 void SecurityPage::ComposerCryptoTab::save()
297 {
298  saveCheckBox(mWidget->mEncToSelf, MessageComposer::MessageComposerSettings::self()->cryptoEncryptToSelfItem());
299  saveCheckBox(mWidget->mShowKeyApprovalDlg, MessageComposer::MessageComposerSettings::self()->cryptoShowKeysForApprovalItem() );
300 
301  saveCheckBox(mWidget->mAutoEncrypt, MessageComposer::MessageComposerSettings::self()->pgpAutoEncryptItem() ) ;
302  saveCheckBox(mWidget->mNeverEncryptWhenSavingInDrafts,GlobalSettings::self()->neverEncryptDraftsItem() );
303  saveCheckBox(mWidget->mStoreEncrypted, GlobalSettings::self()->cryptoStoreEncryptedItem() );
304  saveCheckBox(mWidget->mShowEncSignIndicator, GlobalSettings::self()->showCryptoLabelIndicatorItem() );
305 }
306 
307 void SecurityPage::ComposerCryptoTab::doLoadFromGlobalSettings()
308 {
309  loadWidget(mWidget->mEncToSelf, MessageComposer::MessageComposerSettings::self()->cryptoEncryptToSelfItem());
310  loadWidget(mWidget->mShowKeyApprovalDlg, MessageComposer::MessageComposerSettings::self()->cryptoShowKeysForApprovalItem() );
311 
312  loadWidget(mWidget->mAutoEncrypt, MessageComposer::MessageComposerSettings::self()->pgpAutoEncryptItem() ) ;
313  loadWidget(mWidget->mNeverEncryptWhenSavingInDrafts,GlobalSettings::self()->neverEncryptDraftsItem() );
314  loadWidget(mWidget->mStoreEncrypted, GlobalSettings::self()->cryptoStoreEncryptedItem() );
315  loadWidget(mWidget->mShowEncSignIndicator, GlobalSettings::self()->showCryptoLabelIndicatorItem() );
316 
317 }
318 
319 QString SecurityPage::WarningTab::helpAnchor() const
320 {
321  return QString::fromLatin1("configure-security-warnings");
322 }
323 
324 SecurityPageWarningTab::SecurityPageWarningTab( QWidget * parent )
325  : ConfigModuleTab( parent )
326 {
327  mWidget = new Ui::WarningConfiguration;
328  mWidget->setupUi( this );
329 
330 
331  connect( mWidget->warnGroupBox, SIGNAL(toggled(bool)), SLOT(slotEmitChanged()) );
332  connect( mWidget->mWarnUnsigned, SIGNAL(toggled(bool)), SLOT(slotEmitChanged()) );
333  connect( mWidget->warnUnencryptedCB, SIGNAL(toggled(bool)), SLOT(slotEmitChanged()) );
334  connect( mWidget->warnReceiverNotInCertificateCB, SIGNAL(toggled(bool)), SLOT(slotEmitChanged()) );
335 
336  connect( mWidget->gnupgButton, SIGNAL(clicked()), SLOT(slotConfigureGnupg()) );
337  connect( mWidget->enableAllWarningsPB, SIGNAL(clicked()), SLOT(slotReenableAllWarningsClicked()) );
338 }
339 
340 SecurityPageWarningTab::~SecurityPageWarningTab()
341 {
342  delete mWidget;
343 }
344 
345 void SecurityPage::WarningTab::doLoadFromGlobalSettings()
346 {
347  loadWidget(mWidget->warnUnencryptedCB, MessageComposer::MessageComposerSettings::self()->cryptoWarningUnencryptedItem() );
348  loadWidget(mWidget->mWarnUnsigned, MessageComposer::MessageComposerSettings::self()->cryptoWarningUnsignedItem() );
349  loadWidget(mWidget->warnReceiverNotInCertificateCB, MessageComposer::MessageComposerSettings::self()->cryptoWarnRecvNotInCertItem() );
350 
351  // The "-int" part of the key name is because there used to be a separate boolean
352  // config entry for enabling/disabling. This is done with the single bool value now.
353  mWidget->warnGroupBox->setChecked(
354  MessageComposer::MessageComposerSettings::self()->cryptoWarnWhenNearExpire() );
355 
356  loadWidget(mWidget->mWarnSignKeyExpiresSB, MessageComposer::MessageComposerSettings::self()->cryptoWarnSignKeyNearExpiryThresholdDaysItem() );
357  loadWidget(mWidget->mWarnSignChainCertExpiresSB,MessageComposer::MessageComposerSettings::self()->cryptoWarnSignChaincertNearExpiryThresholdDaysItem() );
358  loadWidget(mWidget->mWarnSignRootCertExpiresSB, MessageComposer::MessageComposerSettings::self()->cryptoWarnSignRootNearExpiryThresholdDaysItem() );
359  loadWidget(mWidget->mWarnEncrKeyExpiresSB, MessageComposer::MessageComposerSettings::self()->cryptoWarnEncrKeyNearExpiryThresholdDaysItem() );
360  loadWidget(mWidget->mWarnEncrChainCertExpiresSB, MessageComposer::MessageComposerSettings::self()->cryptoWarnEncrChaincertNearExpiryThresholdDaysItem() );
361  loadWidget(mWidget->mWarnEncrRootCertExpiresSB, MessageComposer::MessageComposerSettings::self()->cryptoWarnEncrRootNearExpiryThresholdDaysItem() );
362 
363 }
364 
365 void SecurityPage::WarningTab::doLoadOther()
366 {
367  loadWidget(mWidget->warnUnencryptedCB, MessageComposer::MessageComposerSettings::self()->cryptoWarningUnencryptedItem() );
368  loadWidget(mWidget->mWarnUnsigned, MessageComposer::MessageComposerSettings::self()->cryptoWarningUnsignedItem() );
369  loadWidget(mWidget->warnReceiverNotInCertificateCB, MessageComposer::MessageComposerSettings::self()->cryptoWarnRecvNotInCertItem() );
370 
371  // The "-int" part of the key name is because there used to be a separate boolean
372  // config entry for enabling/disabling. This is done with the single bool value now.
373  mWidget->warnGroupBox->setChecked(
374  MessageComposer::MessageComposerSettings::self()->cryptoWarnWhenNearExpire() );
375 
376  loadWidget(mWidget->mWarnSignKeyExpiresSB, MessageComposer::MessageComposerSettings::self()->cryptoWarnSignKeyNearExpiryThresholdDaysItem() );
377  mWidget->mWarnSignKeyExpiresSB->setSuffix(ki18np(" day", " days"));
378 
379  loadWidget(mWidget->mWarnSignChainCertExpiresSB,MessageComposer::MessageComposerSettings::self()->cryptoWarnSignChaincertNearExpiryThresholdDaysItem() );
380  mWidget->mWarnSignChainCertExpiresSB->setSuffix(ki18np(" day", " days"));
381  loadWidget(mWidget->mWarnSignRootCertExpiresSB, MessageComposer::MessageComposerSettings::self()->cryptoWarnSignRootNearExpiryThresholdDaysItem() );
382  mWidget->mWarnSignRootCertExpiresSB->setSuffix(ki18np(" day", " days"));
383  loadWidget(mWidget->mWarnEncrKeyExpiresSB, MessageComposer::MessageComposerSettings::self()->cryptoWarnEncrKeyNearExpiryThresholdDaysItem() );
384  mWidget->mWarnEncrKeyExpiresSB->setSuffix(ki18np(" day", " days"));
385 
386  loadWidget(mWidget->mWarnEncrChainCertExpiresSB, MessageComposer::MessageComposerSettings::self()->cryptoWarnEncrChaincertNearExpiryThresholdDaysItem() );
387  mWidget->mWarnEncrChainCertExpiresSB->setSuffix(ki18np(" day", " days"));
388  loadWidget(mWidget->mWarnEncrRootCertExpiresSB, MessageComposer::MessageComposerSettings::self()->cryptoWarnEncrRootNearExpiryThresholdDaysItem() );
389  mWidget->mWarnEncrRootCertExpiresSB->setSuffix(ki18np(" day", " days"));
390 
391  mWidget->enableAllWarningsPB->setEnabled( true );
392 }
393 
394 void SecurityPage::WarningTab::save()
395 {
396  saveCheckBox(mWidget->warnUnencryptedCB, MessageComposer::MessageComposerSettings::self()->cryptoWarningUnencryptedItem() );
397  saveCheckBox(mWidget->mWarnUnsigned, MessageComposer::MessageComposerSettings::self()->cryptoWarningUnsignedItem() );
398  saveCheckBox(mWidget->warnReceiverNotInCertificateCB, MessageComposer::MessageComposerSettings::self()->cryptoWarnRecvNotInCertItem() );
399 
400  MessageComposer::MessageComposerSettings::self()->setCryptoWarnWhenNearExpire(
401  mWidget->warnGroupBox->isChecked() );
402 
403  saveSpinBox(mWidget->mWarnSignKeyExpiresSB, MessageComposer::MessageComposerSettings::self()->cryptoWarnSignKeyNearExpiryThresholdDaysItem() );
404  saveSpinBox(mWidget->mWarnSignChainCertExpiresSB,MessageComposer::MessageComposerSettings::self()->cryptoWarnSignChaincertNearExpiryThresholdDaysItem() );
405  saveSpinBox(mWidget->mWarnSignRootCertExpiresSB, MessageComposer::MessageComposerSettings::self()->cryptoWarnSignRootNearExpiryThresholdDaysItem() );
406  saveSpinBox(mWidget->mWarnEncrKeyExpiresSB, MessageComposer::MessageComposerSettings::self()->cryptoWarnEncrKeyNearExpiryThresholdDaysItem() );
407  saveSpinBox(mWidget->mWarnEncrChainCertExpiresSB, MessageComposer::MessageComposerSettings::self()->cryptoWarnEncrChaincertNearExpiryThresholdDaysItem() );
408  saveSpinBox(mWidget->mWarnEncrRootCertExpiresSB, MessageComposer::MessageComposerSettings::self()->cryptoWarnEncrRootNearExpiryThresholdDaysItem() );
409 }
410 
411 void SecurityPage::WarningTab::slotReenableAllWarningsClicked()
412 {
413  KMessageBox::enableAllMessages();
414  mWidget->enableAllWarningsPB->setEnabled( false );
415 }
416 
417 void SecurityPage::WarningTab::slotConfigureGnupg()
418 {
419  QPointer<KCMultiDialog> dlg( new KCMultiDialog( this ) );
420  dlg->addModule( QLatin1String("kleopatra_config_gnupgsystem") );
421  dlg->exec();
422  delete dlg;
423 }
424 
425 QString SecurityPage::SMimeTab::helpAnchor() const
426 {
427  return QString::fromLatin1("configure-security-smime-validation");
428 }
429 
430 SecurityPageSMimeTab::SecurityPageSMimeTab( QWidget * parent )
431  : ConfigModuleTab( parent )
432 {
433  mWidget = new Ui::SMimeConfiguration;
434  mWidget->setupUi( this );
435 
436  // Button-group for exclusive radiobuttons
437  QButtonGroup* bg = new QButtonGroup( this );
438  bg->addButton( mWidget->CRLRB );
439  bg->addButton( mWidget->OCSPRB );
440 
441  // Settings for the keyrequester custom widget
442  mWidget->OCSPResponderSignature->setAllowedKeys(
443  Kleo::KeySelectionDialog::SMIMEKeys
444  | Kleo::KeySelectionDialog::TrustedKeys
445  | Kleo::KeySelectionDialog::ValidKeys
446  | Kleo::KeySelectionDialog::SigningKeys
447  | Kleo::KeySelectionDialog::PublicKeys );
448  mWidget->OCSPResponderSignature->setMultipleKeysEnabled( false );
449 
450  mConfig = Kleo::CryptoBackendFactory::instance()->config();
451 
452  connect( mWidget->CRLRB, SIGNAL(toggled(bool)), this, SLOT(slotEmitChanged()) );
453  connect( mWidget->OCSPRB, SIGNAL(toggled(bool)), this, SLOT(slotEmitChanged()) );
454  connect( mWidget->OCSPResponderURL, SIGNAL(textChanged(QString)), this, SLOT(slotEmitChanged()) );
455  connect( mWidget->OCSPResponderSignature, SIGNAL(changed()), this, SLOT(slotEmitChanged()) );
456  connect( mWidget->doNotCheckCertPolicyCB, SIGNAL(toggled(bool)), this, SLOT(slotEmitChanged()) );
457  connect( mWidget->neverConsultCB, SIGNAL(toggled(bool)), this, SLOT(slotEmitChanged()) );
458  connect( mWidget->fetchMissingCB, SIGNAL(toggled(bool)), this, SLOT(slotEmitChanged()) );
459 
460  connect( mWidget->ignoreServiceURLCB, SIGNAL(toggled(bool)), this, SLOT(slotEmitChanged()) );
461  connect( mWidget->ignoreHTTPDPCB, SIGNAL(toggled(bool)), this, SLOT(slotEmitChanged()) );
462  connect( mWidget->disableHTTPCB, SIGNAL(toggled(bool)), this, SLOT(slotEmitChanged()) );
463  connect( mWidget->honorHTTPProxyRB, SIGNAL(toggled(bool)), this, SLOT(slotEmitChanged()) );
464  connect( mWidget->useCustomHTTPProxyRB, SIGNAL(toggled(bool)), this, SLOT(slotEmitChanged()) );
465  connect( mWidget->customHTTPProxy, SIGNAL(textChanged(QString)), this, SLOT(slotEmitChanged()) );
466  connect( mWidget->ignoreLDAPDPCB, SIGNAL(toggled(bool)), this, SLOT(slotEmitChanged()) );
467  connect( mWidget->disableLDAPCB, SIGNAL(toggled(bool)), this, SLOT(slotEmitChanged()) );
468  connect( mWidget->customLDAPProxy, SIGNAL(textChanged(QString)), this, SLOT(slotEmitChanged()) );
469 
470  connect( mWidget->disableHTTPCB, SIGNAL(toggled(bool)),
471  this, SLOT(slotUpdateHTTPActions()) );
472  connect( mWidget->ignoreHTTPDPCB, SIGNAL(toggled(bool)),
473  this, SLOT(slotUpdateHTTPActions()) );
474 
475  // Button-group for exclusive radiobuttons
476  QButtonGroup* bgHTTPProxy = new QButtonGroup( this );
477  bgHTTPProxy->addButton( mWidget->honorHTTPProxyRB );
478  bgHTTPProxy->addButton( mWidget->useCustomHTTPProxyRB );
479 
480  QDBusConnection::sessionBus().connect(QString(), QString(), QLatin1String("org.kde.kleo.CryptoConfig"), QLatin1String("changed"),this, SLOT(load()) );
481 }
482 
483 SecurityPageSMimeTab::~SecurityPageSMimeTab()
484 {
485  delete mWidget;
486 }
487 
488 static void disableDirmngrWidget( QWidget* w )
489 {
490  w->setEnabled( false );
491  w->setWhatsThis( i18n( "This option requires dirmngr >= 0.9.0" ) );
492 }
493 
494 static void initializeDirmngrCheckbox( QCheckBox* cb, Kleo::CryptoConfigEntry* entry )
495 {
496  if ( entry )
497  cb->setChecked( entry->boolValue() );
498  else
499  disableDirmngrWidget( cb );
500 }
501 
502 struct SMIMECryptoConfigEntries {
503  SMIMECryptoConfigEntries( Kleo::CryptoConfig* config )
504  : mConfig( config ) {
505 
506  // Checkboxes
507  mCheckUsingOCSPConfigEntry = configEntry( QLatin1String("gpgsm"), QLatin1String("Security"), QLatin1String("enable-ocsp"), Kleo::CryptoConfigEntry::ArgType_None, false );
508  mEnableOCSPsendingConfigEntry = configEntry( QLatin1String("dirmngr"), QLatin1String("OCSP"), QLatin1String("allow-ocsp"), Kleo::CryptoConfigEntry::ArgType_None, false );
509  mDoNotCheckCertPolicyConfigEntry = configEntry( QLatin1String("gpgsm"), QLatin1String("Security"), QLatin1String("disable-policy-checks"), Kleo::CryptoConfigEntry::ArgType_None, false );
510  mNeverConsultConfigEntry = configEntry( QLatin1String("gpgsm"), QLatin1String("Security"), QLatin1String("disable-crl-checks"), Kleo::CryptoConfigEntry::ArgType_None, false );
511  mFetchMissingConfigEntry = configEntry( QLatin1String("gpgsm"), QLatin1String("Security"), QLatin1String("auto-issuer-key-retrieve"), Kleo::CryptoConfigEntry::ArgType_None, false );
512  // dirmngr-0.9.0 options
513  mIgnoreServiceURLEntry = configEntry( QLatin1String("dirmngr"), QLatin1String("OCSP"), QLatin1String("ignore-ocsp-service-url"), Kleo::CryptoConfigEntry::ArgType_None, false );
514  mIgnoreHTTPDPEntry = configEntry( QLatin1String("dirmngr"), QLatin1String("HTTP"), QLatin1String("ignore-http-dp"), Kleo::CryptoConfigEntry::ArgType_None, false );
515  mDisableHTTPEntry = configEntry(QLatin1String( "dirmngr"), QLatin1String("HTTP"), QLatin1String("disable-http"), Kleo::CryptoConfigEntry::ArgType_None, false );
516  mHonorHTTPProxy = configEntry( QLatin1String("dirmngr"), QLatin1String("HTTP"), QLatin1String("honor-http-proxy"), Kleo::CryptoConfigEntry::ArgType_None, false );
517 
518  mIgnoreLDAPDPEntry = configEntry( QLatin1String("dirmngr"), QLatin1String("LDAP"), QLatin1String("ignore-ldap-dp"), Kleo::CryptoConfigEntry::ArgType_None, false );
519  mDisableLDAPEntry = configEntry( QLatin1String("dirmngr"), QLatin1String("LDAP"), QLatin1String("disable-ldap"), Kleo::CryptoConfigEntry::ArgType_None, false );
520  // Other widgets
521  mOCSPResponderURLConfigEntry = configEntry( QLatin1String("dirmngr"), QLatin1String("OCSP"), QLatin1String("ocsp-responder"), Kleo::CryptoConfigEntry::ArgType_String, false );
522  mOCSPResponderSignature = configEntry( QLatin1String("dirmngr"), QLatin1String("OCSP"), QLatin1String("ocsp-signer"), Kleo::CryptoConfigEntry::ArgType_String, false );
523  mCustomHTTPProxy = configEntry( QLatin1String("dirmngr"), QLatin1String("HTTP"), QLatin1String("http-proxy"), Kleo::CryptoConfigEntry::ArgType_String, false );
524  mCustomLDAPProxy = configEntry( QLatin1String("dirmngr"), QLatin1String("LDAP"), QLatin1String("ldap-proxy"), Kleo::CryptoConfigEntry::ArgType_String, false );
525  }
526 
527  Kleo::CryptoConfigEntry* configEntry(const QString &componentName,
528  const QString &groupName,
529  const QString &entryName,
530  int argType,
531  bool isList );
532 
533  // Checkboxes
534  Kleo::CryptoConfigEntry* mCheckUsingOCSPConfigEntry;
535  Kleo::CryptoConfigEntry* mEnableOCSPsendingConfigEntry;
536  Kleo::CryptoConfigEntry* mDoNotCheckCertPolicyConfigEntry;
537  Kleo::CryptoConfigEntry* mNeverConsultConfigEntry;
538  Kleo::CryptoConfigEntry* mFetchMissingConfigEntry;
539  Kleo::CryptoConfigEntry* mIgnoreServiceURLEntry;
540  Kleo::CryptoConfigEntry* mIgnoreHTTPDPEntry;
541  Kleo::CryptoConfigEntry* mDisableHTTPEntry;
542  Kleo::CryptoConfigEntry* mHonorHTTPProxy;
543  Kleo::CryptoConfigEntry* mIgnoreLDAPDPEntry;
544  Kleo::CryptoConfigEntry* mDisableLDAPEntry;
545  // Other widgets
546  Kleo::CryptoConfigEntry* mOCSPResponderURLConfigEntry;
547  Kleo::CryptoConfigEntry* mOCSPResponderSignature;
548  Kleo::CryptoConfigEntry* mCustomHTTPProxy;
549  Kleo::CryptoConfigEntry* mCustomLDAPProxy;
550 
551  Kleo::CryptoConfig* mConfig;
552 };
553 
554 void SecurityPage::SMimeTab::doLoadOther()
555 {
556  if ( !mConfig ) {
557  setEnabled( false );
558  return;
559  }
560 
561  // Force re-parsing gpgconf data, in case e.g. kleopatra or "configure backend" was used
562  // (which ends up calling us via D-Bus)
563  mConfig->clear();
564 
565  // Create config entries
566  // Don't keep them around, they'll get deleted by clear(), which could be
567  // done by the "configure backend" button even before we save().
568  SMIMECryptoConfigEntries e( mConfig );
569 
570  // Initialize GUI items from the config entries
571 
572  if ( e.mCheckUsingOCSPConfigEntry ) {
573  bool b = e.mCheckUsingOCSPConfigEntry->boolValue();
574  mWidget->OCSPRB->setChecked( b );
575  mWidget->CRLRB->setChecked( !b );
576  mWidget->OCSPGroupBox->setEnabled( b );
577  } else {
578  mWidget->OCSPGroupBox->setEnabled( false );
579  }
580  if ( e.mDoNotCheckCertPolicyConfigEntry )
581  mWidget->doNotCheckCertPolicyCB->setChecked( e.mDoNotCheckCertPolicyConfigEntry->boolValue() );
582  if ( e.mNeverConsultConfigEntry )
583  mWidget->neverConsultCB->setChecked( e.mNeverConsultConfigEntry->boolValue() );
584  if ( e.mFetchMissingConfigEntry )
585  mWidget->fetchMissingCB->setChecked( e.mFetchMissingConfigEntry->boolValue() );
586 
587  if ( e.mOCSPResponderURLConfigEntry )
588  mWidget->OCSPResponderURL->setText( e.mOCSPResponderURLConfigEntry->stringValue() );
589  if ( e.mOCSPResponderSignature ) {
590  mWidget->OCSPResponderSignature->setFingerprint( e.mOCSPResponderSignature->stringValue() );
591  }
592 
593  // dirmngr-0.9.0 options
594  initializeDirmngrCheckbox( mWidget->ignoreServiceURLCB, e.mIgnoreServiceURLEntry );
595  initializeDirmngrCheckbox( mWidget->ignoreHTTPDPCB, e.mIgnoreHTTPDPEntry );
596  initializeDirmngrCheckbox( mWidget->disableHTTPCB, e.mDisableHTTPEntry );
597  initializeDirmngrCheckbox( mWidget->ignoreLDAPDPCB, e.mIgnoreLDAPDPEntry );
598  initializeDirmngrCheckbox( mWidget->disableLDAPCB, e.mDisableLDAPEntry );
599  if ( e.mCustomHTTPProxy ) {
600  QString systemProxy = QString::fromLocal8Bit( qgetenv( "http_proxy" ) );
601  if ( systemProxy.isEmpty() )
602  systemProxy = i18n( "no proxy" );
603  mWidget->systemHTTPProxy->setText( i18n( "(Current system setting: %1)", systemProxy ) );
604  bool honor = e.mHonorHTTPProxy && e.mHonorHTTPProxy->boolValue();
605  mWidget->honorHTTPProxyRB->setChecked( honor );
606  mWidget->useCustomHTTPProxyRB->setChecked( !honor );
607  mWidget->customHTTPProxy->setText( e.mCustomHTTPProxy->stringValue() );
608  } else {
609  disableDirmngrWidget( mWidget->honorHTTPProxyRB );
610  disableDirmngrWidget( mWidget->useCustomHTTPProxyRB );
611  disableDirmngrWidget( mWidget->systemHTTPProxy );
612  disableDirmngrWidget( mWidget->customHTTPProxy );
613  }
614  if ( e.mCustomLDAPProxy )
615  mWidget->customLDAPProxy->setText( e.mCustomLDAPProxy->stringValue() );
616  else {
617  disableDirmngrWidget( mWidget->customLDAPProxy );
618  disableDirmngrWidget( mWidget->customLDAPLabel );
619  }
620  slotUpdateHTTPActions();
621 }
622 
623 void SecurityPage::SMimeTab::slotUpdateHTTPActions()
624 {
625  mWidget->ignoreHTTPDPCB->setEnabled( !mWidget->disableHTTPCB->isChecked() );
626 
627  // The proxy settings only make sense when "Ignore HTTP CRL DPs of certificate" is checked.
628  bool enableProxySettings = !mWidget->disableHTTPCB->isChecked()
629  && mWidget->ignoreHTTPDPCB->isChecked();
630  mWidget->systemHTTPProxy->setEnabled( enableProxySettings );
631  mWidget->useCustomHTTPProxyRB->setEnabled( enableProxySettings );
632  mWidget->honorHTTPProxyRB->setEnabled( enableProxySettings );
633  mWidget->customHTTPProxy->setEnabled( enableProxySettings && mWidget->useCustomHTTPProxyRB->isChecked());
634 
635  if ( !mWidget->useCustomHTTPProxyRB->isChecked() &&
636  !mWidget->honorHTTPProxyRB->isChecked() )
637  mWidget->honorHTTPProxyRB->setChecked( true );
638 }
639 
640 static void saveCheckBoxToKleoEntry( QCheckBox* cb, Kleo::CryptoConfigEntry* entry )
641 {
642  const bool b = cb->isChecked();
643  if ( entry && entry->boolValue() != b )
644  entry->setBoolValue( b );
645 }
646 
647 void SecurityPage::SMimeTab::save()
648 {
649  if ( !mConfig ) {
650  return;
651  }
652  // Create config entries
653  // Don't keep them around, they'll get deleted by clear(), which could be done by the
654  // "configure backend" button.
655  SMIMECryptoConfigEntries e( mConfig );
656 
657  bool b = mWidget->OCSPRB->isChecked();
658  if ( e.mCheckUsingOCSPConfigEntry && e.mCheckUsingOCSPConfigEntry->boolValue() != b )
659  e.mCheckUsingOCSPConfigEntry->setBoolValue( b );
660  // Set allow-ocsp together with enable-ocsp
661  if ( e.mEnableOCSPsendingConfigEntry && e.mEnableOCSPsendingConfigEntry->boolValue() != b )
662  e.mEnableOCSPsendingConfigEntry->setBoolValue( b );
663 
664  saveCheckBoxToKleoEntry( mWidget->doNotCheckCertPolicyCB, e.mDoNotCheckCertPolicyConfigEntry );
665  saveCheckBoxToKleoEntry( mWidget->neverConsultCB, e.mNeverConsultConfigEntry );
666  saveCheckBoxToKleoEntry( mWidget->fetchMissingCB, e.mFetchMissingConfigEntry );
667 
668  QString txt = mWidget->OCSPResponderURL->text();
669  if ( e.mOCSPResponderURLConfigEntry && e.mOCSPResponderURLConfigEntry->stringValue() != txt )
670  e.mOCSPResponderURLConfigEntry->setStringValue( txt );
671 
672  txt = mWidget->OCSPResponderSignature->fingerprint();
673  if ( e.mOCSPResponderSignature && e.mOCSPResponderSignature->stringValue() != txt ) {
674  e.mOCSPResponderSignature->setStringValue( txt );
675  }
676 
677  //dirmngr-0.9.0 options
678  saveCheckBoxToKleoEntry( mWidget->ignoreServiceURLCB, e.mIgnoreServiceURLEntry );
679  saveCheckBoxToKleoEntry( mWidget->ignoreHTTPDPCB, e.mIgnoreHTTPDPEntry );
680  saveCheckBoxToKleoEntry( mWidget->disableHTTPCB, e.mDisableHTTPEntry );
681  saveCheckBoxToKleoEntry( mWidget->ignoreLDAPDPCB, e.mIgnoreLDAPDPEntry );
682  saveCheckBoxToKleoEntry( mWidget->disableLDAPCB, e.mDisableLDAPEntry );
683  if ( e.mCustomHTTPProxy ) {
684  const bool honor = mWidget->honorHTTPProxyRB->isChecked();
685  if ( e.mHonorHTTPProxy && e.mHonorHTTPProxy->boolValue() != honor )
686  e.mHonorHTTPProxy->setBoolValue( honor );
687 
688  QString chosenProxy = mWidget->customHTTPProxy->text();
689  if ( chosenProxy != e.mCustomHTTPProxy->stringValue() )
690  e.mCustomHTTPProxy->setStringValue( chosenProxy );
691  }
692  txt = mWidget->customLDAPProxy->text();
693  if ( e.mCustomLDAPProxy && e.mCustomLDAPProxy->stringValue() != txt )
694  e.mCustomLDAPProxy->setStringValue( mWidget->customLDAPProxy->text() );
695 
696  mConfig->sync( true );
697 }
698 
699 Kleo::CryptoConfigEntry* SMIMECryptoConfigEntries::configEntry( const QString &componentName,
700  const QString &groupName,
701  const QString &entryName,
702  int /*Kleo::CryptoConfigEntry::ArgType*/ argType,
703  bool isList )
704 {
705  Kleo::CryptoConfigEntry* entry = mConfig->entry( componentName, groupName, entryName );
706  if ( !entry ) {
707  kWarning() << QString::fromLatin1("Backend error: gpgconf doesn't seem to know the entry for %1/%2/%3" ).arg( componentName, groupName, entryName );
708  return 0;
709  }
710  if( entry->argType() != argType || entry->isList() != isList ) {
711  kWarning() << QString::fromLatin1("Backend error: gpgconf has wrong type for %1/%2/%3: %4 %5" ).arg( componentName, groupName, entryName ).arg( entry->argType() ).arg( entry->isList() );
712  return 0;
713  }
714  return entry;
715 }
QWhatsThis::showText
void showText(const QPoint &pos, const QString &text, QWidget *w)
disableDirmngrWidget
static void disableDirmngrWidget(QWidget *w)
Definition: configuresecuritypage.cpp:488
globalsettings.h
QWidget
configuresecuritypage.h
SecurityPageWarningTab::save
void save()
Definition: configuresecuritypage.cpp:394
SecurityPageWarningTab::SecurityPageWarningTab
SecurityPageWarningTab(QWidget *parent=0)
Definition: configuresecuritypage.cpp:324
ConfigModuleTab
Definition: configuredialog_p.h:19
SecurityPageMDNTab::save
void save()
Definition: configuresecuritypage.cpp:251
SecurityPageSMimeTab::helpAnchor
QString helpAnchor() const
Definition: configuresecuritypage.cpp:425
SecurityPageAdBlockTab
Definition: configuresecuritypage.h:141
QButtonGroup::addButton
void addButton(QAbstractButton *button)
SecurityPageMDNTab::helpAnchor
QString helpAnchor() const
Definition: configuresecuritypage.cpp:202
SecurityPageMDNTab::SecurityPageMDNTab
SecurityPageMDNTab(QWidget *parent=0)
Definition: configuresecuritypage.cpp:207
initializeDirmngrCheckbox
static void initializeDirmngrCheckbox(QCheckBox *cb, Kleo::CryptoConfigEntry *entry)
Definition: configuresecuritypage.cpp:494
QPointer
QHBoxLayout
QDBusConnection::sessionBus
QDBusConnection sessionBus()
SecurityPageGeneralTab::helpAnchor
QString helpAnchor() const
Definition: configuresecuritypage.cpp:80
QButtonGroup::button
QAbstractButton * button(int id) const
SecurityPageAdBlockTab::SecurityPageAdBlockTab
SecurityPageAdBlockTab(QWidget *parent=0)
Definition: configuresecuritypage.cpp:165
KMKernel::self
static KMKernel * self()
normal control stuff
Definition: kmkernel.cpp:1471
saveCheckBoxToKleoEntry
static void saveCheckBoxToKleoEntry(QCheckBox *cb, Kleo::CryptoConfigEntry *entry)
Definition: configuresecuritypage.cpp:640
QButtonGroup
SecurityPageWarningTab::~SecurityPageWarningTab
~SecurityPageWarningTab()
Definition: configuresecuritypage.cpp:340
QWidget::setEnabled
void setEnabled(bool)
QBoxLayout::addWidget
void addWidget(QWidget *widget, int stretch, QFlags< Qt::AlignmentFlag > alignment)
QString::fromLocal8Bit
QString fromLocal8Bit(const char *str, int size)
QWidget::setLayout
void setLayout(QLayout *layout)
SecurityPage::GeneralTab
SecurityPageGeneralTab GeneralTab
Definition: configuresecuritypage.h:169
ConfigModuleTab::load
void load()
QCheckBox
SecurityPage::WarningTab
SecurityPageWarningTab WarningTab
Definition: configuresecuritypage.h:172
QString::isEmpty
bool isEmpty() const
ConfigModuleTab::slotEmitChanged
void slotEmitChanged()
SecurityPageAdBlockTab::helpAnchor
QString helpAnchor() const
Definition: configuresecuritypage.cpp:159
ConfigModuleWithTabs::addTab
void addTab(ConfigModuleTab *tab, const QString &title)
SecurityPageSMimeTab::SecurityPageSMimeTab
SecurityPageSMimeTab(QWidget *parent=0)
Definition: configuresecuritypage.cpp:430
QString
SecurityPage::SMimeTab
SecurityPageSMimeTab SMimeTab
Definition: configuresecuritypage.h:173
QLayout::setMargin
void setMargin(int margin)
SecurityPageGeneralTab::save
void save()
Definition: configuresecuritypage.cpp:129
kmkernel
#define kmkernel
Definition: kmkernel.h:24
ConfigModuleTab::changed
void changed(bool)
SecurityPageGeneralTab::SecurityPageGeneralTab
SecurityPageGeneralTab(QWidget *parent=0)
Definition: configuresecuritypage.cpp:85
SecurityPageComposerCryptoTab::SecurityPageComposerCryptoTab
SecurityPageComposerCryptoTab(QWidget *parent=0)
Definition: configuresecuritypage.cpp:263
SecurityPageAdBlockTab::save
void save()
Definition: configuresecuritypage.cpp:181
QAbstractButton::setChecked
void setChecked(bool)
QButtonGroup::checkedId
int checkedId() const
GlobalSettings::self
static GlobalSettings * self()
Definition: globalsettings.cpp:30
kmkernel.h
SecurityPageComposerCryptoTab::helpAnchor
QString helpAnchor() const
Definition: configuresecuritypage.cpp:258
QWidget::setWhatsThis
void setWhatsThis(const QString &)
SecurityPageWarningTab::helpAnchor
QString helpAnchor() const
Definition: configuresecuritypage.cpp:319
SecurityPage::ComposerCryptoTab
SecurityPageComposerCryptoTab ComposerCryptoTab
Definition: configuresecuritypage.h:171
QCursor::pos
QPoint pos()
QButtonGroup::buttons
QList< QAbstractButton * > buttons() const
QLatin1String
SecurityPageComposerCryptoTab::save
void save()
Definition: configuresecuritypage.cpp:296
SecurityPageAdBlockTab::~SecurityPageAdBlockTab
~SecurityPageAdBlockTab()
Definition: configuresecuritypage.cpp:177
QString::fromLatin1
QString fromLatin1(const char *str, int size)
KCMultiDialog
ConfigModuleWithTabs
Definition: configuredialog_p.h:54
SecurityPageSMimeTab::~SecurityPageSMimeTab
~SecurityPageSMimeTab()
Definition: configuresecuritypage.cpp:483
QDBusConnection::connect
bool connect(const QString &service, const QString &path, const QString &interface, const QString &name, QObject *receiver, const char *slot)
SecurityPage::SecurityPage
SecurityPage(const KComponentData &instance, QWidget *parent=0)
Definition: configuresecuritypage.cpp:46
QObject::connect
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QString::arg
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
SecurityPage::MDNTab
SecurityPageMDNTab MDNTab
Definition: configuresecuritypage.h:170
SecurityPageSMimeTab::save
void save()
Definition: configuresecuritypage.cpp:647
SecurityPage::helpAnchor
QString helpAnchor() const
Should return the help anchor for this page or tab.
Definition: configuresecuritypage.cpp:41
SecurityPageComposerCryptoTab::~SecurityPageComposerCryptoTab
~SecurityPageComposerCryptoTab()
Definition: configuresecuritypage.cpp:277
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:34:32 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kmail

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