svn path=/branches/KDE_3_3_BRANCH/kdepim/; revision=355853
wilder-work
Marc Mutz 22 years ago
parent 4dfdd34d81
commit d7317d53d7
  1. 3
      Makefile.am
  2. 170
      certificatehandlingdialogimpl.cpp
  3. 373
      certificatewizard.ui
  4. 36
      certificatewizardimpl.cpp

@ -72,9 +72,6 @@ libkmailprivate_la_SOURCES = kmmessage.cpp kmmainwin.cpp configuredialog.cpp \
vacationdialog.cpp vacation.cpp sieveconfig.cpp sievejob.cpp \
kmpopheaders.cpp kmpopfiltercnfrmdlg.cpp \
kmmimeparttree.cpp \
certificatehandlingdialog.ui \
certificatehandlingdialogimpl.cpp \
certificatewizard.ui certificatewizardimpl.cpp \
mailinglist-magic.cpp kmacctmaildir.cpp \
attachmentstrategy.cpp \
headerstrategy.cpp headerstyle.cpp khtmlparthtmlwriter.cpp \

@ -1,170 +0,0 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "certificatehandlingdialogimpl.h"
#include "certificatewizardimpl.h"
#include <qlistview.h>
#include <qpopupmenu.h>
#include <qpushbutton.h>
#include <qlabel.h>
#include <klocale.h>
#include <kdebug.h>
/*
* Constructs a CertificateHandlingDialogImpl which is a child of 'parent', with the
* name 'name' and widget flags set to 'f'
*/
CertificateHandlingDialogImpl::CertificateHandlingDialogImpl( QWidget* parent, const char* name, WFlags fl )
: CertificateHandlingDialog( parent, name, fl )
{
}
/*
* Destroys the object and frees any allocated resources
*/
CertificateHandlingDialogImpl::~CertificateHandlingDialogImpl()
{
// no need to delete child widgets, Qt does it all for us
}
/*
* protected slot
*/
void CertificateHandlingDialogImpl::slotDeleteCertificate()
{
// PENDING(khz) Add code to delete certificate.
QListViewItem* item = certificatesLV->selectedItem();
Q_ASSERT( item );
delete item;
}
/*
* protected slot
*/
void CertificateHandlingDialogImpl::slotCertificateSelectionChanged( QListViewItem* item )
{
if( item ) {
requestPopup->setItemEnabled(1, true);
requestPopup->setItemEnabled(2, true);
deletePB->setEnabled( true );
if( item->text( 2 ) == i18n( "Sign/Encrypt" ) ) {
useForSigningPB->setEnabled( true );
useForEncryptingPB->setEnabled( true );
} else if( item->text( 2 ) == i18n( "Sign" ) ) {
useForSigningPB->setEnabled( true );
useForEncryptingPB->setEnabled( false );
} else if( item->text( 2 ) == i18n( "Encrypt" ) ) {
useForSigningPB->setEnabled( false );
useForEncryptingPB->setEnabled( true );
} else {
// should not happen, such a certificate would be pretty useless
useForSigningPB->setEnabled( false );
useForEncryptingPB->setEnabled( false );
}
} else {
useForSigningPB->setEnabled( false );
useForEncryptingPB->setEnabled( false );
requestPopup->setItemEnabled(1, false);
requestPopup->setItemEnabled(2, true);
deletePB->setEnabled( false );
}
}
/*
* protected slot
*/
void CertificateHandlingDialogImpl::slotRequestChangedCertificate()
{
// PENDING(khz) Send change request to CA
kdWarning() << "CertificateHandlingDialogImpl::slotRequestChangedCertificate() not yet implemented!" << endl;
}
/*
* protected slot
*/
void CertificateHandlingDialogImpl::slotRequestExtendedCertificate()
{
// PENDING(khz) Send extension request CA
kdWarning() << "CertificateHandlingDialogImpl::slotRequestExtendedCertificate() not yet implemented!" << endl;
}
/*
* protected slot
*/
void CertificateHandlingDialogImpl::slotRequestNewCertificate()
{
CertificateWizardImpl wizard;
if( wizard.exec() == QDialog::Accepted ) {
// PENDING(khz) Handle the created certificates.
// Insert a dummy certificate.
// PENDING(khz) Remove this code.
new QListViewItem( certificatesLV, "BlahCertificate", "0x58643BFE", i18n( "Sign/Encrypt" ) );
}
}
/*
* protected slot
*/
void CertificateHandlingDialogImpl::slotUseForEncrypting()
{
QListViewItem* item = certificatesLV->selectedItem();
Q_ASSERT( item );
if( item ) {
// show the used certificate in label
encryptCertLA->setText( item->text( 0 ) );
// iterate over the listview and reset all usage markings
QListViewItemIterator it( certificatesLV );
QListViewItem* current;
while( ( current = it.current() ) ) {
if( current->text( 3 ) == i18n( "Sign/Encrypt" ) )
current->setText( 3, i18n( "Sign" ) );
else if( current->text( 3 ) == i18n( "Encrypt" ) )
current->setText( 3, "" );
++it;
}
// mark the current one as used
if( item->text( 3 ) == i18n( "Sign" ) )
item->setText( 3, i18n( "Sign/Encrypt" ) );
else if( item->text( 3 ).isEmpty() )
item->setText( 3, i18n( "Encrypt" ) );
}
}
/*
* protected slot
*/
void CertificateHandlingDialogImpl::slotUseForSigning()
{
QListViewItem* item = certificatesLV->selectedItem();
Q_ASSERT( item );
if( item ) {
// show the used certificate in label
signCertLA->setText( item->text( 0 ) );
// iterate over the listview and reset all usage markings
QListViewItemIterator it( certificatesLV );
QListViewItem* current;
while( ( current = it.current() ) ) {
++it;
if( current->text( 3 ) == i18n( "Sign/Encrypt" ) )
current->setText( 3, i18n( "Encrypt" ) );
else if( current->text( 3 ) == i18n( "Sign" ) )
current->setText( 3, "" );
}
// mark the current one as used
if( item->text( 3 ) == i18n( "Encrypt" ) )
item->setText( 3, i18n( "Sign/Encrypt" ) );
else if( item->text( 3 ).isEmpty() )
item->setText( 3, i18n( "Sign" ) );
}
}
#include "certificatehandlingdialogimpl.moc"

@ -1,373 +0,0 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>CertificateWizard</class>
<widget class="QWizard">
<property name="name">
<cstring>CertificateWizard</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>705</width>
<height>444</height>
</rect>
</property>
<property name="caption">
<string>Certificate Wizard</string>
</property>
<property name="titleFont">
<font>
<pointsize>16</pointsize>
<bold>1</bold>
</font>
</property>
<widget class="QWidget">
<property name="name">
<cstring>page</cstring>
</property>
<attribute name="title">
<string>Certificate Wizard</string>
</attribute>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>11</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLabel">
<property name="name">
<cstring>TextLabel1</cstring>
</property>
<property name="text">
<string>&lt;b&gt;Welcome to the Certificate Wizard.&lt;/b&gt;
&lt;br&gt;
&lt;br&gt;
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.
&lt;p&gt;
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.</string>
</property>
</widget>
</vbox>
</widget>
<widget class="QWidget">
<property name="name">
<cstring>page</cstring>
</property>
<attribute name="title">
<string>Your Personal Data</string>
</attribute>
<widget class="QLabel">
<property name="name">
<cstring>TextLabel2</cstring>
</property>
<property name="geometry">
<rect>
<x>11</x>
<y>11</y>
<width>456</width>
<height>123</height>
</rect>
</property>
<property name="text">
<string>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.</string>
</property>
<property name="alignment">
<set>WordBreak|AlignVCenter</set>
</property>
</widget>
<widget class="QLineEdit">
<property name="name">
<cstring>nameED</cstring>
</property>
<property name="geometry">
<rect>
<x>130</x>
<y>143</y>
<width>336</width>
<height>22</height>
</rect>
</property>
<property name="toolTip" stdset="0">
<string>Enter your name here</string>
</property>
<property name="whatsThis" stdset="0">
<string>Enter your name here as it should be shown in the certificate.</string>
</property>
</widget>
<widget class="QLineEdit">
<property name="name">
<cstring>organizationED</cstring>
</property>
<property name="geometry">
<rect>
<x>130</x>
<y>173</y>
<width>336</width>
<height>22</height>
</rect>
</property>
<property name="toolTip" stdset="0">
<string>Enter your organization here</string>
</property>
<property name="whatsThis" stdset="0">
<string>Enter your organization (e.g. your company, your department, or your authority) here as it should appear on the certificate.</string>
</property>
</widget>
<widget class="QLineEdit">
<property name="name">
<cstring>departmentED</cstring>
</property>
<property name="geometry">
<rect>
<x>130</x>
<y>203</y>
<width>336</width>
<height>22</height>
</rect>
</property>
</widget>
<widget class="QLineEdit">
<property name="name">
<cstring>emailED</cstring>
</property>
<property name="geometry">
<rect>
<x>130</x>
<y>233</y>
<width>336</width>
<height>22</height>
</rect>
</property>
<property name="toolTip" stdset="0">
<string>Enter your email address here</string>
</property>
<property name="whatsThis" stdset="0">
<string>Enter the email address here which you want to use in connection with the certificate.</string>
</property>
</widget>
<widget class="QLabel">
<property name="name">
<cstring>nameLA</cstring>
</property>
<property name="geometry">
<rect>
<x>12</x>
<y>143</y>
<width>110</width>
<height>22</height>
</rect>
</property>
<property name="text">
<string>&amp;Name:</string>
</property>
<property name="buddy" stdset="0">
<cstring>nameED</cstring>
</property>
</widget>
<widget class="QLabel">
<property name="name">
<cstring>departmentLA</cstring>
</property>
<property name="geometry">
<rect>
<x>12</x>
<y>203</y>
<width>110</width>
<height>22</height>
</rect>
</property>
<property name="text">
<string>&amp;Department:</string>
</property>
<property name="buddy" stdset="0">
<cstring>departmentED</cstring>
</property>
</widget>
<widget class="QLabel">
<property name="name">
<cstring>emailLA</cstring>
</property>
<property name="geometry">
<rect>
<x>12</x>
<y>233</y>
<width>110</width>
<height>22</height>
</rect>
</property>
<property name="text">
<string>&amp;Email address:</string>
</property>
<property name="buddy" stdset="0">
<cstring>emailED</cstring>
</property>
</widget>
<widget class="QLabel">
<property name="name">
<cstring>organizationLA</cstring>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>170</y>
<width>110</width>
<height>22</height>
</rect>
</property>
<property name="text">
<string>&amp;Organization:</string>
</property>
<property name="buddy" stdset="0">
<cstring>organizationED</cstring>
</property>
</widget>
</widget>
<widget class="QWidget">
<property name="name">
<cstring>page</cstring>
</property>
<attribute name="title">
<string>Certificate Generation</string>
</attribute>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>11</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLabel">
<property name="name">
<cstring>TextLabel4</cstring>
</property>
<property name="text">
<string>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.</string>
</property>
<property name="alignment">
<set>WordBreak|AlignVCenter</set>
</property>
</widget>
<widget class="QButtonGroup">
<property name="name">
<cstring>ButtonGroup7</cstring>
</property>
<property name="title">
<string>Certificate &amp;Generation</string>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>11</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QRadioButton">
<property name="name">
<cstring>centralizedRB</cstring>
</property>
<property name="text">
<string>&amp;Centralized generation</string>
</property>
</widget>
<widget class="QRadioButton">
<property name="name">
<cstring>decentralizedRB</cstring>
</property>
<property name="text">
<string>&amp;Decentralized generation</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
<widget class="QLayoutWidget">
<property name="name">
<cstring>Layout9</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLabel">
<property name="name">
<cstring>TextLabel5</cstring>
</property>
<property name="text">
<string>&amp;Email address of the CA that issues certificates:</string>
</property>
<property name="buddy" stdset="0">
<cstring>caEmailED</cstring>
</property>
</widget>
<widget class="QLineEdit">
<property name="name">
<cstring>caEmailED</cstring>
</property>
</widget>
</hbox>
</widget>
</vbox>
</widget>
</vbox>
</widget>
<widget class="QWidget">
<property name="name">
<cstring>page</cstring>
</property>
<attribute name="title">
<string>Your Certificate is Ready to Be Sent</string>
</attribute>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>11</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLabel">
<property name="name">
<cstring>TextLabel7</cstring>
</property>
<property name="text">
<string>&lt;qt&gt;
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.
&lt;p&gt;
If you want to change anything, press Back and make your changes. Otherwise press Finish to send the signature key pair to the CA.
&lt;/qt&gt;</string>
</property>
<property name="alignment">
<set>WordBreak|AlignVCenter</set>
</property>
</widget>
<widget class="QTextEdit">
<property name="name">
<cstring>certificateTE</cstring>
</property>
</widget>
</vbox>
</widget>
</widget>
<slots>
<slot access="protected">slotCreatePSE()</slot>
</slots>
<layoutdefaults spacing="6" margin="11"/>
</UI>

@ -1,36 +0,0 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "certificatewizardimpl.h"
#include <kdebug.h>
/*
* Constructs a CertificateWizardImpl which is a child of 'parent', with the
* name 'name' and widget flags set to 'f'
*
* The wizard will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal wizard.
*/
CertificateWizardImpl::CertificateWizardImpl( QWidget* parent, const char* name, bool modal, WFlags fl )
: CertificateWizard( parent, name, modal, fl )
{
}
/*
* Destroys the object and frees any allocated resources
*/
CertificateWizardImpl::~CertificateWizardImpl()
{
// no need to delete child widgets, Qt does it all for us
}
/*
* protected slot
*/
void CertificateWizardImpl::slotCreatePSE()
{
kdWarning() << "CertificateWizardImpl::slotCreatePSE() not yet implemented!" << endl;
}
#include "certificatewizardimpl.moc"
Loading…
Cancel
Save