kmail

warningconfiguration.cpp

00001 #include <kdialog.h>
00002 #include <klocale.h>
00003 /****************************************************************************
00004 ** Form implementation generated from reading ui file './warningconfiguration.ui'
00005 **
00006 ** Created: Mon Apr 23 15:05:28 2012
00007 **
00008 ** WARNING! All changes made in this file will be lost!
00009 ****************************************************************************/
00010 
00011 #include "warningconfiguration.h"
00012 
00013 #include <qvariant.h>
00014 #include <qcheckbox.h>
00015 #include <qgroupbox.h>
00016 #include <qlabel.h>
00017 #include <qspinbox.h>
00018 #include <qpushbutton.h>
00019 #include <qlayout.h>
00020 #include <qtooltip.h>
00021 #include <qwhatsthis.h>
00022 
00023 /*
00024  *  Constructs a WarningConfiguration as a child of 'parent', with the
00025  *  name 'name' and widget flags set to 'f'.
00026  */
00027 WarningConfiguration::WarningConfiguration( QWidget* parent, const char* name, WFlags fl )
00028     : QWidget( parent, name, fl )
00029 {
00030     if ( !name )
00031     setName( "WarningConfiguration" );
00032     WarningConfigurationLayout = new QVBoxLayout( this, 11, 6, "WarningConfigurationLayout"); 
00033 
00034     mWarnUnsigned = new QCheckBox( this, "mWarnUnsigned" );
00035     mWarnUnsigned->setChecked( TRUE );
00036     WarningConfigurationLayout->addWidget( mWarnUnsigned );
00037 
00038     warnUnencryptedCB = new QCheckBox( this, "warnUnencryptedCB" );
00039     warnUnencryptedCB->setChecked( TRUE );
00040     WarningConfigurationLayout->addWidget( warnUnencryptedCB );
00041 
00042     warnReceiverNotInCertificateCB = new QCheckBox( this, "warnReceiverNotInCertificateCB" );
00043     warnReceiverNotInCertificateCB->setChecked( TRUE );
00044     WarningConfigurationLayout->addWidget( warnReceiverNotInCertificateCB );
00045 
00046     warnGroupBox = new QGroupBox( this, "warnGroupBox" );
00047     warnGroupBox->setCheckable( TRUE );
00048     warnGroupBox->setColumnLayout(0, Qt::Vertical );
00049     warnGroupBox->layout()->setSpacing( 6 );
00050     warnGroupBox->layout()->setMargin( 11 );
00051     warnGroupBoxLayout = new QGridLayout( warnGroupBox->layout() );
00052     warnGroupBoxLayout->setAlignment( Qt::AlignTop );
00053 
00054     textLabel2 = new QLabel( warnGroupBox, "textLabel2" );
00055     textLabel2->setAlignment( int( QLabel::AlignCenter ) );
00056 
00057     warnGroupBoxLayout->addWidget( textLabel2, 0, 1 );
00058 
00059     textLabel2_2 = new QLabel( warnGroupBox, "textLabel2_2" );
00060     textLabel2_2->setAlignment( int( QLabel::AlignCenter ) );
00061 
00062     warnGroupBoxLayout->addWidget( textLabel2_2, 0, 2 );
00063 
00064     mWarnSignKeyExpiresSB = new QSpinBox( warnGroupBox, "mWarnSignKeyExpiresSB" );
00065     mWarnSignKeyExpiresSB->setMaxValue( 999 );
00066     mWarnSignKeyExpiresSB->setMinValue( 1 );
00067     mWarnSignKeyExpiresSB->setValue( 14 );
00068 
00069     warnGroupBoxLayout->addWidget( mWarnSignKeyExpiresSB, 1, 1 );
00070 
00071     mWarnEncrKeyExpiresSB = new QSpinBox( warnGroupBox, "mWarnEncrKeyExpiresSB" );
00072     mWarnEncrKeyExpiresSB->setMaxValue( 999 );
00073     mWarnEncrKeyExpiresSB->setMinValue( 1 );
00074     mWarnEncrKeyExpiresSB->setValue( 14 );
00075 
00076     warnGroupBoxLayout->addWidget( mWarnEncrKeyExpiresSB, 1, 2 );
00077 
00078     mWarnEncrChainCertExpiresSB = new QSpinBox( warnGroupBox, "mWarnEncrChainCertExpiresSB" );
00079     mWarnEncrChainCertExpiresSB->setMaxValue( 999 );
00080     mWarnEncrChainCertExpiresSB->setMinValue( 1 );
00081     mWarnEncrChainCertExpiresSB->setValue( 14 );
00082 
00083     warnGroupBoxLayout->addWidget( mWarnEncrChainCertExpiresSB, 2, 2 );
00084 
00085     mWarnSignChainCertExpiresSB = new QSpinBox( warnGroupBox, "mWarnSignChainCertExpiresSB" );
00086     mWarnSignChainCertExpiresSB->setMaxValue( 999 );
00087     mWarnSignChainCertExpiresSB->setMinValue( 1 );
00088     mWarnSignChainCertExpiresSB->setValue( 14 );
00089 
00090     warnGroupBoxLayout->addWidget( mWarnSignChainCertExpiresSB, 2, 1 );
00091 
00092     mWarnSignRootCertExpiresSB = new QSpinBox( warnGroupBox, "mWarnSignRootCertExpiresSB" );
00093     mWarnSignRootCertExpiresSB->setMaxValue( 999 );
00094     mWarnSignRootCertExpiresSB->setMinValue( 1 );
00095     mWarnSignRootCertExpiresSB->setValue( 14 );
00096 
00097     warnGroupBoxLayout->addWidget( mWarnSignRootCertExpiresSB, 3, 1 );
00098 
00099     mWarnEncrRootCertExpiresSB = new QSpinBox( warnGroupBox, "mWarnEncrRootCertExpiresSB" );
00100     mWarnEncrRootCertExpiresSB->setMaxValue( 999 );
00101     mWarnEncrRootCertExpiresSB->setMinValue( 1 );
00102     mWarnEncrRootCertExpiresSB->setValue( 14 );
00103 
00104     warnGroupBoxLayout->addWidget( mWarnEncrRootCertExpiresSB, 3, 2 );
00105 
00106     textLabel1_2_2 = new QLabel( warnGroupBox, "textLabel1_2_2" );
00107 
00108     warnGroupBoxLayout->addWidget( textLabel1_2_2, 3, 0 );
00109 
00110     textLabel1_2 = new QLabel( warnGroupBox, "textLabel1_2" );
00111 
00112     warnGroupBoxLayout->addWidget( textLabel1_2, 2, 0 );
00113 
00114     textLabel1 = new QLabel( warnGroupBox, "textLabel1" );
00115 
00116     warnGroupBoxLayout->addWidget( textLabel1, 1, 0 );
00117     spacer5 = new QSpacerItem( 40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00118     warnGroupBoxLayout->addItem( spacer5, 2, 3 );
00119     WarningConfigurationLayout->addWidget( warnGroupBox );
00120     spacer23 = new QSpacerItem( 20, 90, QSizePolicy::Minimum, QSizePolicy::Expanding );
00121     WarningConfigurationLayout->addItem( spacer23 );
00122 
00123     layout1 = new QHBoxLayout( 0, 0, 6, "layout1"); 
00124     spacer4 = new QSpacerItem( 40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00125     layout1->addItem( spacer4 );
00126 
00127     enableAllWarningsPB = new QPushButton( this, "enableAllWarningsPB" );
00128     layout1->addWidget( enableAllWarningsPB );
00129     WarningConfigurationLayout->addLayout( layout1 );
00130     languageChange();
00131     resize( QSize(552, 325).expandedTo(minimumSizeHint()) );
00132     clearWState( WState_Polished );
00133 
00134     // tab order
00135     setTabOrder( mWarnUnsigned, warnUnencryptedCB );
00136     setTabOrder( warnUnencryptedCB, warnReceiverNotInCertificateCB );
00137     setTabOrder( warnReceiverNotInCertificateCB, mWarnSignKeyExpiresSB );
00138     setTabOrder( mWarnSignKeyExpiresSB, mWarnSignChainCertExpiresSB );
00139     setTabOrder( mWarnSignChainCertExpiresSB, mWarnSignRootCertExpiresSB );
00140     setTabOrder( mWarnSignRootCertExpiresSB, mWarnEncrKeyExpiresSB );
00141     setTabOrder( mWarnEncrKeyExpiresSB, mWarnEncrChainCertExpiresSB );
00142     setTabOrder( mWarnEncrChainCertExpiresSB, mWarnEncrRootCertExpiresSB );
00143     setTabOrder( mWarnEncrRootCertExpiresSB, enableAllWarningsPB );
00144 
00145     // buddies
00146     textLabel1_2_2->setBuddy( mWarnSignRootCertExpiresSB );
00147     textLabel1_2->setBuddy( mWarnSignChainCertExpiresSB );
00148     textLabel1->setBuddy( mWarnSignKeyExpiresSB );
00149 }
00150 
00151 /*
00152  *  Destroys the object and frees any allocated resources
00153  */
00154 WarningConfiguration::~WarningConfiguration()
00155 {
00156     // no need to delete child widgets, Qt does it all for us
00157 }
00158 
00159 /*
00160  *  Sets the strings of the subwidgets using the current
00161  *  language.
00162  */
00163 void WarningConfiguration::languageChange()
00164 {
00165     mWarnUnsigned->setText( tr2i18n( "Warn when trying to send &unsigned messages" ) );
00166     QToolTip::add( mWarnUnsigned, tr2i18n( "Check to be warned when sending unsigned messages." ) );
00167     QWhatsThis::add( mWarnUnsigned, tr2i18n( "<qt>\n"
00168 "<h1>Warn When Trying To Send Unsigned Messages</h1>\n"
00169 "If this box is checked, you will be warned when you try to send parts of or the whole message unsigned.\n"
00170 "<p>\n"
00171 "It is recommended to leave this option turned on for maximum integrity.\n"
00172 "</qt>" ) );
00173     warnUnencryptedCB->setText( tr2i18n( "&Warn when trying to send unencrypted messages" ) );
00174     QToolTip::add( warnUnencryptedCB, tr2i18n( "Check to be warned when sending unencrypted messages." ) );
00175     QWhatsThis::add( warnUnencryptedCB, tr2i18n( "<qt>\n"
00176 "<h1>Warn When Trying To Send Unencrypted Messages</h1>\n"
00177 "If this box is checked, you will be warned when you try to send parts of or the whole message unencrypted.\n"
00178 "<p>\n"
00179 "It is recommended to leave this option turned on for maximum integrity.\n"
00180 "</qt>" ) );
00181     warnReceiverNotInCertificateCB->setText( tr2i18n( "Warn if &Receiver's Email Address is Not in Certificate" ) );
00182     QToolTip::add( warnReceiverNotInCertificateCB, tr2i18n( "Check to be warned if the address is not in the certificate" ) );
00183     QWhatsThis::add( warnReceiverNotInCertificateCB, tr2i18n( "<qt>\n"
00184 "<h1>Warn If Receiver's Email Address Is Not In Certificate</h1>\n"
00185 "If this option is checked, a warning is issued if the email address of the receiver is not contained in the certificate used for encrypting.\n"
00186 "<p>\n"
00187 "It is recommended to leave this option turned on for maximum security.\n"
00188 "</qt>" ) );
00189     warnGroupBox->setTitle( tr2i18n( "Warn if certificates/keys expire soon (configure thresholds below)" ) );
00190     textLabel2->setText( tr2i18n( "For signing" ) );
00191     textLabel2_2->setText( tr2i18n( "For encryption" ) );
00192     mWarnSignKeyExpiresSB->setSuffix( tr2i18n( " days" ) );
00193     QToolTip::add( mWarnSignKeyExpiresSB, tr2i18n( "Select the number of days here" ) );
00194     QWhatsThis::add( mWarnSignKeyExpiresSB, tr2i18n( "<qt>\n"
00195 "<h1>Warn If Signature Certificate Expires</h1>\n"
00196 "Select the minimum number of days the signature certificate should be valid without issuing a warning.\n"
00197 "<p>\n"
00198 "The recommended SPHINX setting is 14 days.\n"
00199 "</qt>" ) );
00200     mWarnEncrKeyExpiresSB->setSuffix( tr2i18n( " days" ) );
00201     QToolTip::add( mWarnEncrKeyExpiresSB, tr2i18n( "Select the number of days here" ) );
00202     QWhatsThis::add( mWarnEncrKeyExpiresSB, tr2i18n( "<qt>\n"
00203 "<h1>Warn If Encryption Certificate Expires</h1>\n"
00204 "Select the minimum number of days the encryption certificate should be valid without issuing a warning.\n"
00205 "<p>\n"
00206 "The recommended SPHINX setting is 14 days.\n"
00207 "</qt>" ) );
00208     mWarnEncrChainCertExpiresSB->setSuffix( tr2i18n( " days" ) );
00209     QToolTip::add( mWarnEncrChainCertExpiresSB, tr2i18n( "Select the number of days here" ) );
00210     QWhatsThis::add( mWarnEncrChainCertExpiresSB, tr2i18n( "<qt>\n"
00211 "<h1>Warn If A Certificate In The Chain Expires</h1>\n"
00212 "Select the minimum number of days all certificates in the chain should be valid without issuing a warning.\n"
00213 "<p>\n"
00214 "The recommended SPHINX setting is 14 days.\n"
00215 "</qt>" ) );
00216     mWarnSignChainCertExpiresSB->setSuffix( tr2i18n( " days" ) );
00217     QToolTip::add( mWarnSignChainCertExpiresSB, tr2i18n( "Select the number of days here" ) );
00218     QWhatsThis::add( mWarnSignChainCertExpiresSB, tr2i18n( "<qt>\n"
00219 "<h1>Warn If CA Certificate Expires</h1>\n"
00220 "Select the minimum number of days the CA certificate should be valid without issuing a warning.\n"
00221 "<p>\n"
00222 "The recommended SPHINX setting is 14 days.\n"
00223 "</qt>" ) );
00224     mWarnSignRootCertExpiresSB->setSuffix( tr2i18n( " days" ) );
00225     QToolTip::add( mWarnSignRootCertExpiresSB, tr2i18n( "Select the number of days here" ) );
00226     QWhatsThis::add( mWarnSignRootCertExpiresSB, tr2i18n( "<qt>\n"
00227 "<h1>Warn If Root Certificate Expires</h1>\n"
00228 "Select the minimum number of days the root certificate should be valid without issuing a warning.\n"
00229 "<p>\n"
00230 "The recommended SPHINX setting is 14 days.\n"
00231 "</qt>" ) );
00232     mWarnEncrRootCertExpiresSB->setSuffix( tr2i18n( " days" ) );
00233     QToolTip::add( mWarnEncrRootCertExpiresSB, tr2i18n( "Select the number of days here" ) );
00234     QWhatsThis::add( mWarnEncrRootCertExpiresSB, tr2i18n( "<qt>\n"
00235 "<h1>Warn If Root Certificate Expires</h1>\n"
00236 "Select the minimum number of days the root certificate should be valid without issuing a warning.\n"
00237 "<p>\n"
00238 "The recommended SPHINX setting is 14 days.\n"
00239 "</qt>" ) );
00240     textLabel1_2_2->setText( tr2i18n( "For root certificates:" ) );
00241     textLabel1_2->setText( tr2i18n( "For intermediate CA certificates:" ) );
00242     textLabel1->setText( tr2i18n( "For end-user certificates/keys:" ) );
00243     enableAllWarningsPB->setText( tr2i18n( "Re-enable All \"Don't Ask Again\" Warnings" ) );
00244 }
00245 
00246 #include "warningconfiguration.moc"
KDE Home | KDE Accessibility Home | Description of Access Keys