kmail Library API Documentation

smimeconfiguration.cpp

00001 #include <kdialog.h>
00002 #include <klocale.h>
00003 /****************************************************************************
00004 ** Form implementation generated from reading ui file './smimeconfiguration.ui'
00005 **
00006 ** Created: Mon Apr 4 04:34:22 2005
00007 **      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.4   edited Nov 24 2003 $)
00008 **
00009 ** WARNING! All changes made in this file will be lost!
00010 ****************************************************************************/
00011 
00012 #include "smimeconfiguration.h"
00013 
00014 #include <qvariant.h>
00015 #include <qpushbutton.h>
00016 #include <qradiobutton.h>
00017 #include <qgroupbox.h>
00018 #include <qlabel.h>
00019 #include <qlineedit.h>
00020 #include <qcheckbox.h>
00021 #include <qlayout.h>
00022 #include <qtooltip.h>
00023 #include <qwhatsthis.h>
00024 #include "../certmanager/lib/ui/keyrequester.h"
00025 
00026 /*
00027  *  Constructs a SMimeConfiguration as a child of 'parent', with the
00028  *  name 'name' and widget flags set to 'f'.
00029  */
00030 SMimeConfiguration::SMimeConfiguration( QWidget* parent, const char* name, WFlags fl )
00031     : QWidget( parent, name, fl )
00032 {
00033     if ( !name )
00034     setName( "SMimeConfiguration" );
00035     SMimeConfigurationLayout = new QVBoxLayout( this, 11, 6, "SMimeConfigurationLayout"); 
00036 
00037     CRLRB = new QRadioButton( this, "CRLRB" );
00038     CRLRB->setChecked( TRUE );
00039     SMimeConfigurationLayout->addWidget( CRLRB );
00040 
00041     OCSPRB = new QRadioButton( this, "OCSPRB" );
00042     SMimeConfigurationLayout->addWidget( OCSPRB );
00043 
00044     OCSPGroupBox = new QGroupBox( this, "OCSPGroupBox" );
00045     OCSPGroupBox->setColumnLayout(0, Qt::Vertical );
00046     OCSPGroupBox->layout()->setSpacing( 6 );
00047     OCSPGroupBox->layout()->setMargin( 11 );
00048     OCSPGroupBoxLayout = new QVBoxLayout( OCSPGroupBox->layout() );
00049     OCSPGroupBoxLayout->setAlignment( Qt::AlignTop );
00050 
00051     layout4 = new QHBoxLayout( 0, 0, 6, "layout4"); 
00052 
00053     textLabel1 = new QLabel( OCSPGroupBox, "textLabel1" );
00054     layout4->addWidget( textLabel1 );
00055 
00056     OCSPResponderURL = new QLineEdit( OCSPGroupBox, "OCSPResponderURL" );
00057     layout4->addWidget( OCSPResponderURL );
00058     OCSPGroupBoxLayout->addLayout( layout4 );
00059 
00060     layout5 = new QHBoxLayout( 0, 0, 6, "layout5"); 
00061 
00062     textLabel2 = new QLabel( OCSPGroupBox, "textLabel2" );
00063     layout5->addWidget( textLabel2 );
00064 
00065     OCSPResponderSignature = new Kleo::KeyRequester( OCSPGroupBox, "OCSPResponderSignature" );
00066     layout5->addWidget( OCSPResponderSignature );
00067     spacer7 = new QSpacerItem( 150, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00068     layout5->addItem( spacer7 );
00069     OCSPGroupBoxLayout->addLayout( layout5 );
00070     SMimeConfigurationLayout->addWidget( OCSPGroupBox );
00071 
00072     doNotCheckCertPolicyCB = new QCheckBox( this, "doNotCheckCertPolicyCB" );
00073     SMimeConfigurationLayout->addWidget( doNotCheckCertPolicyCB );
00074 
00075     neverConsultCB = new QCheckBox( this, "neverConsultCB" );
00076     SMimeConfigurationLayout->addWidget( neverConsultCB );
00077 
00078     fetchMissingCB = new QCheckBox( this, "fetchMissingCB" );
00079     SMimeConfigurationLayout->addWidget( fetchMissingCB );
00080     spacer23 = new QSpacerItem( 20, 90, QSizePolicy::Minimum, QSizePolicy::Expanding );
00081     SMimeConfigurationLayout->addItem( spacer23 );
00082     languageChange();
00083     resize( QSize(571, 402).expandedTo(minimumSizeHint()) );
00084     clearWState( WState_Polished );
00085 
00086     // signals and slots connections
00087     connect( CRLRB, SIGNAL( toggled(bool) ), OCSPGroupBox, SLOT( setDisabled(bool) ) );
00088     connect( OCSPRB, SIGNAL( toggled(bool) ), OCSPGroupBox, SLOT( setEnabled(bool) ) );
00089 }
00090 
00091 /*
00092  *  Destroys the object and frees any allocated resources
00093  */
00094 SMimeConfiguration::~SMimeConfiguration()
00095 {
00096     // no need to delete child widgets, Qt does it all for us
00097 }
00098 
00099 /*
00100  *  Sets the strings of the subwidgets using the current
00101  *  language.
00102  */
00103 void SMimeConfiguration::languageChange()
00104 {
00105     CRLRB->setText( tr2i18n( "Validate certificates using CRLs" ) );
00106     QWhatsThis::add( CRLRB, tr2i18n( "If this option is selected, S/MIME certificates are validated using Certificate Revocation Lists (CRLs)." ) );
00107     OCSPRB->setText( tr2i18n( "Validate certificates online (OCSP)" ) );
00108     QWhatsThis::add( OCSPRB, tr2i18n( "If this option is selected, S/MIME certificates are validated online using the Online Certificates Status Protocol (OCSP). Fill in the URL of the OCSP responder below." ) );
00109     OCSPGroupBox->setTitle( tr2i18n( "Online Certificate Validation" ) );
00110     textLabel1->setText( tr2i18n( "OCSP responder URL:" ) );
00111     QWhatsThis::add( OCSPResponderURL, tr2i18n( "Enter here the address of the server for online validation of certificates (OCSP responder). The URL is usually starting with http://." ) );
00112     textLabel2->setText( tr2i18n( "OCSP responder signature:" ) );
00113     doNotCheckCertPolicyCB->setText( tr2i18n( "Do not check certificate policies" ) );
00114     QWhatsThis::add( doNotCheckCertPolicyCB, tr2i18n( "By default GnuPG uses the file ~/.gnupg/policies.txt to check if a certificate policy is allowed. If this option is selected, policies are not checked." ) );
00115     neverConsultCB->setText( tr2i18n( "Never consult a CRL" ) );
00116     QWhatsThis::add( neverConsultCB, tr2i18n( "If this option is checked, Certificate Revocation Lists are never used to validate S/MIME certificates." ) );
00117     fetchMissingCB->setText( tr2i18n( "Fetch missing issuer certificates" ) );
00118     QWhatsThis::add( fetchMissingCB, tr2i18n( "If this option is checked, missing issuer certificates are fetched when necessary (this applies to both validation methods, CRLs and OCSP)" ) );
00119 }
00120 
00121 #include "smimeconfiguration.moc"
KDE Logo
This file is part of the documentation for kmail Library Version 3.3.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Mon Apr 4 04:48:30 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003