certmanager

certificatewizardimpl.h

00001 /*
00002     certificatewizardimpl.h
00003 
00004     This file is part of Kleopatra, the KDE keymanager
00005     Copyright (c) 2001,2002,2004 Klarälvdalens Datakonsult AB
00006 
00007     Kleopatra is free software; you can redistribute it and/or modify
00008     it under the terms of the GNU General Public License as published by
00009     the Free Software Foundation; either version 2 of the License, or
00010     (at your option) any later version.
00011 
00012     Kleopatra is distributed in the hope that it will be useful,
00013     but WITHOUT ANY WARRANTY; without even the implied warranty of
00014     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015     General Public License for more details.
00016 
00017     You should have received a copy of the GNU General Public License
00018     along with this program; if not, write to the Free Software
00019     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00020 
00021     In addition, as a special exception, the copyright holders give
00022     permission to link the code of this program with any edition of
00023     the Qt library by Trolltech AS, Norway (or with modified versions
00024     of Qt that use the same license as Qt), and distribute linked
00025     combinations including the two.  You must obey the GNU General
00026     Public License in all respects for all of the code used other than
00027     Qt.  If you modify this file, you may extend this exception to
00028     your version of the file, but you are not obligated to do so.  If
00029     you do not wish to do so, delete this exception statement from
00030     your version.
00031 */
00032 
00033 #ifndef CERTIFICATEWIZARDIMPL_H
00034 #define CERTIFICATEWIZARDIMPL_H
00035 #include "certificatewizard.h"
00036 
00037 #include <qcstring.h>
00038 #include <qvaluevector.h>
00039 #include <qlineedit.h>
00040 #include <kurl.h>
00041 
00042 namespace GpgME {
00043   class KeyGenerationResult;
00044 }
00045 namespace KIO {
00046   class Job;
00047 }
00048 
00049 class CertificateWizardImpl : public CertificateWizard
00050 {
00051     Q_OBJECT
00052 
00053 public:
00054     CertificateWizardImpl( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
00055     ~CertificateWizardImpl();
00056 
00057     bool sendToCA() const;
00058     QString caEMailAddress() const;
00059     KURL saveFileUrl() const;
00060 
00061     typedef QPair<QString, QLineEdit*> StringLEPair;
00062     typedef QValueVector< StringLEPair > AttrPairList;
00063 
00064 public:
00065     virtual void showPage( QWidget * page );
00066     virtual void accept();
00067 
00068 private slots:
00069     void slotGenerateCertificate();
00070     void slotResult( const GpgME::KeyGenerationResult & res, const QByteArray & keyData );
00071     void slotSetValuesFromWhoAmI();
00072     void slotEnablePersonalDataPageExit();
00073     void slotURLSelected( const QString& );
00074 
00075     void slotHelpClicked();
00076 
00077     void slotUploadResult( KIO::Job* );
00078 
00079 private:
00080     void createPersonalDataPage();
00081     void sendCertificate( const QString& email, const QByteArray& certificateData );
00082 
00083 private:
00084     AttrPairList _attrPairList;
00085     QByteArray _keyData;
00086 };
00087 
00088 #endif // CERTIFICATEWIZARDIMPL_H
KDE Home | KDE Accessibility Home | Description of Access Keys