kmail

composercryptoconfiguration.cpp

00001 #include <kdialog.h>
00002 #include <klocale.h>
00003 /****************************************************************************
00004 ** Form implementation generated from reading ui file './composercryptoconfiguration.ui'
00005 **
00006 ** Created: Thu Mar 29 06:04:03 2007
00007 **      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.8   edited Jan 11 14:47 $)
00008 **
00009 ** WARNING! All changes made in this file will be lost!
00010 ****************************************************************************/
00011 
00012 #include "composercryptoconfiguration.h"
00013 
00014 #include <qvariant.h>
00015 #include <qpushbutton.h>
00016 #include <qgroupbox.h>
00017 #include <qcheckbox.h>
00018 #include <qlayout.h>
00019 #include <qtooltip.h>
00020 #include <qwhatsthis.h>
00021 
00022 /*
00023  *  Constructs a ComposerCryptoConfiguration as a child of 'parent', with the
00024  *  name 'name' and widget flags set to 'f'.
00025  */
00026 ComposerCryptoConfiguration::ComposerCryptoConfiguration( QWidget* parent, const char* name, WFlags fl )
00027     : QWidget( parent, name, fl )
00028 {
00029     if ( !name )
00030     setName( "ComposerCryptoConfiguration" );
00031     ComposerCryptoConfigurationLayout = new QVBoxLayout( this, 11, 6, "ComposerCryptoConfigurationLayout"); 
00032 
00033     optionsGroup_2 = new QGroupBox( this, "optionsGroup_2" );
00034     optionsGroup_2->setColumnLayout(0, Qt::Vertical );
00035     optionsGroup_2->layout()->setSpacing( 6 );
00036     optionsGroup_2->layout()->setMargin( 11 );
00037     optionsGroup_2Layout = new QVBoxLayout( optionsGroup_2->layout() );
00038     optionsGroup_2Layout->setAlignment( Qt::AlignTop );
00039 
00040     mAutoSignature = new QCheckBox( optionsGroup_2, "mAutoSignature" );
00041     optionsGroup_2Layout->addWidget( mAutoSignature );
00042     ComposerCryptoConfigurationLayout->addWidget( optionsGroup_2 );
00043 
00044     optionsGroup = new QGroupBox( this, "optionsGroup" );
00045     optionsGroup->setColumnLayout(0, Qt::Vertical );
00046     optionsGroup->layout()->setSpacing( 6 );
00047     optionsGroup->layout()->setMargin( 11 );
00048     optionsGroupLayout = new QVBoxLayout( optionsGroup->layout() );
00049     optionsGroupLayout->setAlignment( Qt::AlignTop );
00050 
00051     mEncToSelf = new QCheckBox( optionsGroup, "mEncToSelf" );
00052     optionsGroupLayout->addWidget( mEncToSelf );
00053 
00054     mShowEncryptionResult = new QCheckBox( optionsGroup, "mShowEncryptionResult" );
00055     optionsGroupLayout->addWidget( mShowEncryptionResult );
00056 
00057     mStoreEncrypted = new QCheckBox( optionsGroup, "mStoreEncrypted" );
00058     mStoreEncrypted->setChecked( FALSE );
00059     optionsGroupLayout->addWidget( mStoreEncrypted );
00060 
00061     mShowKeyApprovalDlg = new QCheckBox( optionsGroup, "mShowKeyApprovalDlg" );
00062     optionsGroupLayout->addWidget( mShowKeyApprovalDlg );
00063 
00064     mAutoEncrypt = new QCheckBox( optionsGroup, "mAutoEncrypt" );
00065     optionsGroupLayout->addWidget( mAutoEncrypt );
00066 
00067     mNeverEncryptWhenSavingInDrafts = new QCheckBox( optionsGroup, "mNeverEncryptWhenSavingInDrafts" );
00068     optionsGroupLayout->addWidget( mNeverEncryptWhenSavingInDrafts );
00069     ComposerCryptoConfigurationLayout->addWidget( optionsGroup );
00070     spacer22 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
00071     ComposerCryptoConfigurationLayout->addItem( spacer22 );
00072     languageChange();
00073     resize( QSize(581, 318).expandedTo(minimumSizeHint()) );
00074     clearWState( WState_Polished );
00075 
00076     // tab order
00077     setTabOrder( mEncToSelf, mShowEncryptionResult );
00078     setTabOrder( mShowEncryptionResult, mStoreEncrypted );
00079     setTabOrder( mStoreEncrypted, mShowKeyApprovalDlg );
00080     setTabOrder( mShowKeyApprovalDlg, mAutoEncrypt );
00081     setTabOrder( mAutoEncrypt, mNeverEncryptWhenSavingInDrafts );
00082 }
00083 
00084 /*
00085  *  Destroys the object and frees any allocated resources
00086  */
00087 ComposerCryptoConfiguration::~ComposerCryptoConfiguration()
00088 {
00089     // no need to delete child widgets, Qt does it all for us
00090 }
00091 
00092 /*
00093  *  Sets the strings of the subwidgets using the current
00094  *  language.
00095  */
00096 void ComposerCryptoConfiguration::languageChange()
00097 {
00098     optionsGroup_2->setTitle( tr2i18n( "Signing" ) );
00099     mAutoSignature->setText( tr2i18n( "&Automatically sign messages" ) );
00100     QWhatsThis::add( mAutoSignature, tr2i18n( "When this option is enabled, all messages you send will be signed by default; of course, it is still possible to disable signing for each message individually." ) );
00101     optionsGroup->setTitle( tr2i18n( "Encrypting" ) );
00102     mEncToSelf->setText( tr2i18n( "Always encr&ypt to self" ) );
00103     QWhatsThis::add( mEncToSelf, tr2i18n( "When this option is enabled, the message/file will not only be encrypted with the receiver's public key, but also with your key. This will enable you to decrypt the message/file at a later time. This is generally a good idea." ) );
00104     mShowEncryptionResult->setText( tr2i18n( "Show s&igned/encrypted text after composing" ) );
00105     QWhatsThis::add( mShowEncryptionResult, tr2i18n( "When this option is enabled, the signed/encrypted text will be shown in a separate window, enabling you to know how it will look before it is sent. This is a good idea when you are verifying that your encryption system works." ) );
00106     mStoreEncrypted->setText( tr2i18n( "Store sent messages encry&pted" ) );
00107     QToolTip::add( mStoreEncrypted, tr2i18n( "Check to store messages encrypted " ) );
00108     QWhatsThis::add( mStoreEncrypted, tr2i18n( "<qt>\n"
00109 "<h1>Store Messages Encrypted</h1>\n"
00110 "When this box is checked, sent messages are stored encrypted like they were sent. This is not recommended, as you will not be able to read the messages any longer if a necessary certificate expires.\n"
00111 "<p>\n"
00112 "However, there may be local rules that require you to turn this option on. When in doubt, check with your local administrator.\n"
00113 "</qt>" ) );
00114     mShowKeyApprovalDlg->setText( tr2i18n( "Always show the encryption keys &for approval" ) );
00115     QWhatsThis::add( mShowKeyApprovalDlg, tr2i18n( "When this option is enabled, the application will always show you a list of public keys from which you can choose the one it will use for encryption. If it is off, the application will only show the dialog if it cannot find the right key or if there are several which could be used." ) );
00116     mAutoEncrypt->setText( tr2i18n( "Automatically encrypt &messages whenever possible" ) );
00117     QWhatsThis::add( mAutoEncrypt, tr2i18n( "When this option is enabled, every message you send will be encrypted whenever encryption is possible and desired; of course, it is still possible to disable the automatic encryption for each message individually." ) );
00118     mNeverEncryptWhenSavingInDrafts->setText( tr2i18n( "Never sign/encrypt when sa&ving as draft" ) );
00119 }
00120 
00121 #include "composercryptoconfiguration.moc"
KDE Home | KDE Accessibility Home | Description of Access Keys