kmail Library API Documentation

certificatehandlingdialog.cpp

00001 #include <kdialog.h> 00002 #include <klocale.h> 00003 /**************************************************************************** 00004 ** Form implementation generated from reading ui file './certificatehandlingdialog.ui' 00005 ** 00006 ** Created: Fri Oct 1 15:06:18 2004 00007 ** by: The User Interface Compiler ($Id: qt/main.cpp 3.3.3 edited Nov 24 2003 $) 00008 ** 00009 ** WARNING! All changes made in this file will be lost! 00010 ****************************************************************************/ 00011 00012 #include "certificatehandlingdialog.h" 00013 00014 #include <qvariant.h> 00015 #include <qpopupmenu.h> 00016 #include <qlabel.h> 00017 #include <qheader.h> 00018 #include <qlistview.h> 00019 #include <qpushbutton.h> 00020 #include <qlayout.h> 00021 #include <qtooltip.h> 00022 #include <qwhatsthis.h> 00023 #include "./certificatehandlingdialog.ui.h" 00024 00025 /* 00026 * Constructs a CertificateHandlingDialog as a child of 'parent', with the 00027 * name 'name' and widget flags set to 'f'. 00028 */ 00029 CertificateHandlingDialog::CertificateHandlingDialog( QWidget* parent, const char* name, WFlags fl ) 00030 : QWidget( parent, name, fl ) 00031 { 00032 if ( !name ) 00033 setName( "CertificateHandlingDialog" ); 00034 CertificateHandlingDialogLayout = new QGridLayout( this, 1, 1, 11, 6, "CertificateHandlingDialogLayout"); 00035 00036 TextLabel8 = new QLabel( this, "TextLabel8" ); 00037 00038 CertificateHandlingDialogLayout->addMultiCellWidget( TextLabel8, 0, 0, 0, 1 ); 00039 00040 encryptCertLA = new QLabel( this, "encryptCertLA" ); 00041 encryptCertLA->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)5, 0, 0, encryptCertLA->sizePolicy().hasHeightForWidth() ) ); 00042 encryptCertLA->setFrameShape( QLabel::WinPanel ); 00043 encryptCertLA->setFrameShadow( QLabel::Sunken ); 00044 00045 CertificateHandlingDialogLayout->addMultiCellWidget( encryptCertLA, 1, 1, 2, 4 ); 00046 00047 signCertLA = new QLabel( this, "signCertLA" ); 00048 signCertLA->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)5, 0, 0, signCertLA->sizePolicy().hasHeightForWidth() ) ); 00049 signCertLA->setFrameShape( QLabel::WinPanel ); 00050 signCertLA->setFrameShadow( QLabel::Sunken ); 00051 00052 CertificateHandlingDialogLayout->addMultiCellWidget( signCertLA, 0, 0, 2, 4 ); 00053 00054 TextLabel10 = new QLabel( this, "TextLabel10" ); 00055 00056 CertificateHandlingDialogLayout->addMultiCellWidget( TextLabel10, 1, 1, 0, 1 ); 00057 00058 certificatesLV = new QListView( this, "certificatesLV" ); 00059 certificatesLV->addColumn( tr2i18n( "Certificate" ) ); 00060 certificatesLV->addColumn( tr2i18n( "Checksum" ) ); 00061 certificatesLV->addColumn( tr2i18n( "Possible Usage" ) ); 00062 certificatesLV->addColumn( tr2i18n( "Current Usage" ) ); 00063 00064 CertificateHandlingDialogLayout->addMultiCellWidget( certificatesLV, 2, 2, 0, 4 ); 00065 00066 useForEncryptingPB = new QPushButton( this, "useForEncryptingPB" ); 00067 useForEncryptingPB->setEnabled( FALSE ); 00068 00069 CertificateHandlingDialogLayout->addWidget( useForEncryptingPB, 3, 0 ); 00070 00071 useForSigningPB = new QPushButton( this, "useForSigningPB" ); 00072 useForSigningPB->setEnabled( FALSE ); 00073 00074 CertificateHandlingDialogLayout->addMultiCellWidget( useForSigningPB, 3, 3, 1, 2 ); 00075 00076 requestPB = new QPushButton( this, "requestPB" ); 00077 00078 CertificateHandlingDialogLayout->addWidget( requestPB, 3, 3 ); 00079 00080 deletePB = new QPushButton( this, "deletePB" ); 00081 deletePB->setEnabled( FALSE ); 00082 00083 CertificateHandlingDialogLayout->addWidget( deletePB, 3, 4 ); 00084 languageChange(); 00085 resize( QSize(533, 330).expandedTo(minimumSizeHint()) ); 00086 clearWState( WState_Polished ); 00087 00088 // signals and slots connections 00089 connect( certificatesLV, SIGNAL( selectionChanged(QListViewItem*) ), this, SLOT( slotCertificateSelectionChanged(QListViewItem*) ) ); 00090 connect( useForSigningPB, SIGNAL( clicked() ), this, SLOT( slotUseForSigning() ) ); 00091 connect( useForEncryptingPB, SIGNAL( clicked() ), this, SLOT( slotUseForEncrypting() ) ); 00092 connect( deletePB, SIGNAL( clicked() ), this, SLOT( slotDeleteCertificate() ) ); 00093 init(); 00094 } 00095 00096 /* 00097 * Destroys the object and frees any allocated resources 00098 */ 00099 CertificateHandlingDialog::~CertificateHandlingDialog() 00100 { 00101 // no need to delete child widgets, Qt does it all for us 00102 } 00103 00104 /* 00105 * Sets the strings of the subwidgets using the current 00106 * language. 00107 */ 00108 void CertificateHandlingDialog::languageChange() 00109 { 00110 setCaption( tr2i18n( "Certificate Management" ) ); 00111 TextLabel8->setText( tr2i18n( "Certificate used for signing messages:" ) ); 00112 encryptCertLA->setText( tr2i18n( "---" ) ); 00113 signCertLA->setText( tr2i18n( "---" ) ); 00114 TextLabel10->setText( tr2i18n( "Certificate used for encrypting messages:" ) ); 00115 certificatesLV->header()->setLabel( 0, tr2i18n( "Certificate" ) ); 00116 certificatesLV->header()->setLabel( 1, tr2i18n( "Checksum" ) ); 00117 certificatesLV->header()->setLabel( 2, tr2i18n( "Possible Usage" ) ); 00118 certificatesLV->header()->setLabel( 3, tr2i18n( "Current Usage" ) ); 00119 useForEncryptingPB->setText( tr2i18n( "Use for &Encrypting" ) ); 00120 useForSigningPB->setText( tr2i18n( "Use for &Signing" ) ); 00121 requestPB->setText( tr2i18n( "&Request..." ) ); 00122 deletePB->setText( tr2i18n( "&Delete" ) ); 00123 } 00124 00125 #include "certificatehandlingdialog.moc"
KDE Logo
This file is part of the documentation for kmail Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Oct 1 15:19:14 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003