kmail Library API Documentation

signatureconfigurationdialogimpl.cpp

00001 #include <config.h>
00002 #include "signatureconfigurationdialogimpl.h"
00003 #include "cryptplugwrapper.h"
00004 
00005 #include <qbuttongroup.h>
00006 #include <qradiobutton.h>
00007 #include <qcheckbox.h>
00008 #include <qspinbox.h>
00009 
00010 
00011 
00012 
00013 #define FULLTEST false
00014 
00015 
00016 
00017 
00018 /*
00019  *  Constructs a SignatureConfigurationDialogImpl which is a child of 'parent', with the
00020  *  name 'name' and widget flags set to 'f'
00021  */
00022 SignatureConfigurationDialogImpl::SignatureConfigurationDialogImpl( QWidget* parent,  const char* name, WFlags fl )
00023     : SignatureConfigurationDialog( parent, name, fl )
00024 {
00025 }
00026 
00027 /*
00028  *  Destroys the object and frees any allocated resources
00029  */
00030 SignatureConfigurationDialogImpl::~SignatureConfigurationDialogImpl()
00031 {
00032     // no need to delete child widgets, Qt does it all for us
00033 }
00034 
00035 
00040 void SignatureConfigurationDialogImpl::enableDisable( CryptPlugWrapper* cryptPlug )
00041 {
00042     // disable the whole page if the plugin does not support
00043     // signatures (e.g. encryption only)
00044     setEnabled( cryptPlug->hasFeature( Feature_SignMessages ) );
00045 
00046     // enable and disable the various components depending on the
00047     // availability of a feature in the crypto plugin
00048     sendCertificatesBG->setEnabled( cryptPlug->hasFeature( Feature_SendCertificates ) );
00049     sigCompoundModeBG->setEnabled( cryptPlug->hasFeature( Feature_SendCertificates ) );
00050     warnSignatureCertificateExpiresCB->setEnabled( cryptPlug->hasFeature( Feature_WarnSignCertificateExpiry ) );
00051     warnSignatureCertificateExpiresSB->setEnabled( cryptPlug->hasFeature( Feature_WarnSignCertificateExpiry ) );
00052     warnCACertificateExpiresCB->setEnabled( cryptPlug->hasFeature( Feature_WarnSignCertificateExpiry ) );
00053     warnCACertificateExpiresSB->setEnabled( cryptPlug->hasFeature( Feature_WarnSignCertificateExpiry ) );
00054     warnRootCertificateExpiresCB->setEnabled( cryptPlug->hasFeature( Feature_WarnSignCertificateExpiry ) );
00055     warnRootCertificateExpiresSB->setEnabled( cryptPlug->hasFeature( Feature_WarnSignCertificateExpiry ) );
00056     warnAddressNotInCertificateCB->setEnabled( cryptPlug->hasFeature( Feature_WarnSignEmailNotInCertificate ) );
00057     pinEntryBG->setEnabled( cryptPlug->hasFeature( Feature_PinEntrySettings ) );
00058     saveSentSigsCB->setEnabled( cryptPlug->hasFeature( Feature_StoreMessagesWithSigs ) );
00059     
00060     if( ! FULLTEST ){
00061         askEachPartRB                ->hide(); // We won't implement that.
00062         
00063         sendCertificatesBG           ->hide(); // Will implement that later
00064         
00065         pinEntryBG                   ->hide(); // Will implement that later
00066         
00067         saveSentSigsCB->hide(); // We won't implement that.
00068         
00069         dontSendCertificatesRB       ->hide(); // Will implement that later.
00070         sendChainWithoutRootRB       ->hide(); // Will implement that later.
00071         sendChainWithRootRB          ->hide(); // Will implement that later.
00072         
00073         pinOncePerSessionRB          ->hide(); // Will implement that later.
00074         pinAddCertificatesRB         ->hide(); // Will implement that later.
00075         pinAlwaysWhenSigningRB       ->hide(); // Will implement that later.
00076         pinIntervalRB                ->hide(); // Will implement that later.
00077         pinIntervalSB                ->hide(); // Will implement that later.
00078         
00079         saveSentSigsCB               ->hide(); // We won't implement that.
00080     }
00081 }
00082 
00083 #include "signatureconfigurationdialogimpl.moc"
KDE Logo
This file is part of the documentation for kmail Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat May 1 11:37:35 2004 by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2003