kmail
encryptionconfigurationdialogimpl.cpp
00001 #ifdef HAVE_CONFIG_H 00002 #include <config.h> 00003 #endif 00004 00005 #include "encryptionconfigurationdialogimpl.h" 00006 #include "cryptplugwrapper.h" 00007 00008 #include <qbuttongroup.h> 00009 #include <qradiobutton.h> 00010 #include <qcheckbox.h> 00011 #include <qspinbox.h> 00012 00013 00014 00015 00016 #define FULLTEST false 00017 00018 00019 00020 00021 /* 00022 * Constructs a EncryptionConfigurationDialogImpl which is a child of 'parent', with the 00023 * name 'name' and widget flags set to 'f' 00024 */ 00025 EncryptionConfigurationDialogImpl::EncryptionConfigurationDialogImpl( QWidget* parent, const char* name, WFlags fl ) 00026 : EncryptionConfigurationDialog( parent, name, fl ) 00027 { 00028 } 00029 00030 /* 00031 * Destroys the object and frees any allocated resources 00032 */ 00033 EncryptionConfigurationDialogImpl::~EncryptionConfigurationDialogImpl() 00034 { 00035 // no need to delete child widgets, Qt does it all for us 00036 } 00037 00038 00043 void EncryptionConfigurationDialogImpl::enableDisable( CryptPlugWrapper* cryptPlug ) 00044 { 00045 // disable the whole page if the plugin does not support encryption 00046 setEnabled( cryptPlug->hasFeature( Feature_EncryptMessages ) ); 00047 00048 // enable/disable individual components depending on the plugin features 00049 crlBG->setEnabled( cryptPlug->hasFeature( Feature_EncryptionCRLs ) ); 00050 warnReceiverCertificateExpiresCB->setEnabled( cryptPlug->hasFeature( Feature_WarnEncryptCertificateExpiry ) ); 00051 warnReceiverCertificateExpiresSB->setEnabled( cryptPlug->hasFeature( Feature_WarnEncryptCertificateExpiry ) ); 00052 warnChainCertificateExpiresCB->setEnabled( cryptPlug->hasFeature( Feature_WarnEncryptCertificateExpiry ) ); 00053 warnChainCertificateExpiresSB->setEnabled( cryptPlug->hasFeature( Feature_WarnEncryptCertificateExpiry ) ); 00054 warnReceiverNotInCertificateCB->setEnabled( cryptPlug->hasFeature( Feature_WarnEncryptEmailNotInCertificate ) ); 00055 storeEncryptedCB->setEnabled( cryptPlug->hasFeature( Feature_StoreMessagesEncrypted ) ); 00056 certificatePathCheckBG->setEnabled( cryptPlug->hasFeature( Feature_CheckCertificatePath ) ); 00057 00058 if( ! FULLTEST ) { 00059 askEachPartRB ->hide(); // We won't implement that. 00060 00061 // encryptionSettingsBG ->hide(); // Will implement that later. 00062 00063 certBG ->hide(); // Will implement that later. 00064 00065 warnCRLExpireCB ->hide(); // Will implement that later. 00066 warnCRLExpireSB ->hide(); // Will implement that later. 00067 00068 // warnReceiverCertificateExpiresCB->hide();//Will implement that later. 00069 // warnReceiverCertificateExpiresSB->hide();//Will implement that later. 00070 00071 warnChainCertificateExpiresCB ->hide(); // Will implement that later. 00072 warnChainCertificateExpiresSB ->hide(); // Will implement that later. 00073 warnReceiverNotInCertificateCB->hide(); // Will implement that later. 00074 00075 alwaysCheckRootRB ->hide(); // Will implement that later. 00076 00077 /*enable:*/ 00078 pathMayEndLocallyCB ->setEnabled( true ); 00079 00080 } 00081 } 00082 00083 #include "encryptionconfigurationdialogimpl.moc"