00001
#include <kdialog.h>
00002
#include <klocale.h>
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
#include "certificatewizard.h"
00013
00014
#include <qvariant.h>
00015
#include <qpushbutton.h>
00016
#include <qwidget.h>
00017
#include <qlabel.h>
00018
#include <qlineedit.h>
00019
#include <qbuttongroup.h>
00020
#include <qradiobutton.h>
00021
#include <qtextedit.h>
00022
#include <qlayout.h>
00023
#include <qtooltip.h>
00024
#include <qwhatsthis.h>
00025
00026
00027
00028
00029
00030
00031
00032
00033 CertificateWizard::CertificateWizard(
QWidget* parent,
const char* name,
bool modal, WFlags fl )
00034 :
QWizard( parent, name, modal, fl )
00035 {
00036
if ( !name )
00037 setName(
"CertificateWizard" );
00038
QFont f( font() );
00039 f.setPointSize( 16 );
00040 f.setBold( TRUE );
00041 setTitleFont( f );
00042
00043 page =
new QWidget(
this,
"page" );
00044 pageLayout =
new QVBoxLayout( page, 11, 6,
"pageLayout");
00045
00046 TextLabel1 =
new QLabel( page,
"TextLabel1" );
00047 pageLayout->addWidget( TextLabel1 );
00048 addPage( page,
QString(
"") );
00049
00050 page_2 =
new QWidget(
this,
"page_2" );
00051
00052 TextLabel2 =
new QLabel( page_2,
"TextLabel2" );
00053 TextLabel2->setGeometry(
QRect( 11, 11, 456, 123 ) );
00054 TextLabel2->setAlignment(
int( QLabel::WordBreak | QLabel::AlignVCenter ) );
00055
00056 nameED =
new QLineEdit( page_2,
"nameED" );
00057 nameED->setGeometry(
QRect( 130, 143, 336, 22 ) );
00058
00059 organizationED =
new QLineEdit( page_2,
"organizationED" );
00060 organizationED->setGeometry(
QRect( 130, 173, 336, 22 ) );
00061
00062 departmentED =
new QLineEdit( page_2,
"departmentED" );
00063 departmentED->setGeometry(
QRect( 130, 203, 336, 22 ) );
00064
00065 emailED =
new QLineEdit( page_2,
"emailED" );
00066 emailED->setGeometry(
QRect( 130, 233, 336, 22 ) );
00067
00068 nameLA =
new QLabel( page_2,
"nameLA" );
00069 nameLA->setGeometry(
QRect( 12, 143, 110, 22 ) );
00070
00071 departmentLA =
new QLabel( page_2,
"departmentLA" );
00072 departmentLA->setGeometry(
QRect( 12, 203, 110, 22 ) );
00073
00074 emailLA =
new QLabel( page_2,
"emailLA" );
00075 emailLA->setGeometry(
QRect( 12, 233, 110, 22 ) );
00076
00077 organizationLA =
new QLabel( page_2,
"organizationLA" );
00078 organizationLA->setGeometry(
QRect( 10, 170, 110, 22 ) );
00079 addPage( page_2,
QString(
"") );
00080
00081 page_3 =
new QWidget(
this,
"page_3" );
00082 pageLayout_2 =
new QVBoxLayout( page_3, 11, 6,
"pageLayout_2");
00083
00084 TextLabel4 =
new QLabel( page_3,
"TextLabel4" );
00085 TextLabel4->setAlignment(
int( QLabel::WordBreak | QLabel::AlignVCenter ) );
00086 pageLayout_2->addWidget( TextLabel4 );
00087
00088 ButtonGroup7 =
new QButtonGroup( page_3,
"ButtonGroup7" );
00089 ButtonGroup7->setColumnLayout(0, Qt::Vertical );
00090 ButtonGroup7->layout()->setSpacing( 6 );
00091 ButtonGroup7->layout()->setMargin( 11 );
00092 ButtonGroup7Layout =
new QVBoxLayout( ButtonGroup7->layout() );
00093 ButtonGroup7Layout->setAlignment( Qt::AlignTop );
00094
00095 centralizedRB =
new QRadioButton( ButtonGroup7,
"centralizedRB" );
00096 ButtonGroup7Layout->addWidget( centralizedRB );
00097
00098 decentralizedRB =
new QRadioButton( ButtonGroup7,
"decentralizedRB" );
00099 decentralizedRB->setChecked( TRUE );
00100 ButtonGroup7Layout->addWidget( decentralizedRB );
00101
00102 Layout9 =
new QHBoxLayout( 0, 0, 6,
"Layout9");
00103
00104 TextLabel5 =
new QLabel( ButtonGroup7,
"TextLabel5" );
00105 Layout9->addWidget( TextLabel5 );
00106
00107 caEmailED =
new QLineEdit( ButtonGroup7,
"caEmailED" );
00108 Layout9->addWidget( caEmailED );
00109 ButtonGroup7Layout->addLayout( Layout9 );
00110 pageLayout_2->addWidget( ButtonGroup7 );
00111 addPage( page_3,
QString(
"") );
00112
00113 page_4 =
new QWidget(
this,
"page_4" );
00114 pageLayout_3 =
new QVBoxLayout( page_4, 11, 6,
"pageLayout_3");
00115
00116 TextLabel7 =
new QLabel( page_4,
"TextLabel7" );
00117 TextLabel7->setAlignment(
int( QLabel::WordBreak | QLabel::AlignVCenter ) );
00118 pageLayout_3->addWidget( TextLabel7 );
00119
00120 certificateTE =
new QTextEdit( page_4,
"certificateTE" );
00121 pageLayout_3->addWidget( certificateTE );
00122 addPage( page_4,
QString(
"") );
00123 languageChange();
00124 resize(
QSize(705, 444).expandedTo(minimumSizeHint()) );
00125 clearWState( WState_Polished );
00126
00127
00128 nameLA->setBuddy( nameED );
00129 departmentLA->setBuddy( departmentED );
00130 emailLA->setBuddy( emailED );
00131 organizationLA->setBuddy( organizationED );
00132 TextLabel5->setBuddy( caEmailED );
00133 }
00134
00135
00136
00137
00138 CertificateWizard::~CertificateWizard()
00139 {
00140
00141 }
00142
00143
00144
00145
00146
00147
void CertificateWizard::languageChange()
00148 {
00149 setCaption( tr2i18n(
"Certificate Wizard" ) );
00150 TextLabel1->setText( tr2i18n(
"<b>Welcome to the Certificate Wizard.</b>\n"
00151
"<br>\n"
00152
"<br>\n"
00153
"In a few easy steps, this wizard will help you with the creation of a certificate. You use your certificates in order to sign messages, to encrypt messages and to decrypt messages that other people send to you in encrypted form.\n"
00154
"<p>\n"
00155
"The certificates can either be generated in a centralized or a decentralized manner. Please contact your local help desk if you are unsure how to create a certificate in your organization." ) );
00156 setTitle( page, tr2i18n(
"Certificate Wizard" ) );
00157 TextLabel2->setText( tr2i18n(
"On this page, you will enter some personal data that will be stored in your certificate and that will help other people to determine that it is actually you who is sending a message." ) );
00158 QToolTip::add( nameED, tr2i18n(
"Enter your name here" ) );
00159 QWhatsThis::add( nameED, tr2i18n(
"Enter your name here as it should be shown in the certificate." ) );
00160 QToolTip::add( organizationED, tr2i18n(
"Enter your organization here" ) );
00161 QWhatsThis::add( organizationED, tr2i18n(
"Enter your organization (e.g. your company, your department, or your authority) here as it should appear on the certificate." ) );
00162 QToolTip::add( emailED, tr2i18n(
"Enter your email address here" ) );
00163 QWhatsThis::add( emailED, tr2i18n(
"Enter the email address here which you want to use in connection with the certificate." ) );
00164 nameLA->setText( tr2i18n(
"&Name:" ) );
00165 departmentLA->setText( tr2i18n(
"&Department:" ) );
00166 emailLA->setText( tr2i18n(
"&Email address:" ) );
00167 organizationLA->setText( tr2i18n(
"&Organization:" ) );
00168 setTitle( page_2, tr2i18n(
"Your Personal Data" ) );
00169 TextLabel4->setText( tr2i18n(
"On this page, you will select whether certificate generation is done centralized or decentralized. Please check with your local help desk if you are unsure what to select here." ) );
00170 ButtonGroup7->setTitle( tr2i18n(
"Certificate &Generation" ) );
00171 centralizedRB->setText( tr2i18n(
"&Centralized generation" ) );
00172 decentralizedRB->setText( tr2i18n(
"&Decentralized generation" ) );
00173 TextLabel5->setText( tr2i18n(
"&Email address of the CA that issues certificates:" ) );
00174 setTitle( page_3, tr2i18n(
"Certificate Generation" ) );
00175 TextLabel7->setText( tr2i18n(
"<qt>\n"
00176
"Your signature key pair is now ready to be sent to the CA (certification authority) which will generate a certificate for you and send it back via email. Please review the certificate shown below. You should also write down the checksum so that you can match it against the certificate sent back by the CA.\n"
00177
"<p>\n"
00178
"If you want to change anything, press Back and make your changes. Otherwise press Finish to send the signature key pair to the CA.\n"
00179
"</qt>" ) );
00180 setTitle( page_4, tr2i18n(
"Your Certificate is Ready to Be Sent" ) );
00181 }
00182
00183
void CertificateWizard::slotCreatePSE()
00184 {
00185 qWarning(
"CertificateWizard::slotCreatePSE(): Not implemented yet" );
00186 }
00187
00188
#include "certificatewizard.moc"