[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/network/kvpnc/src
From: Fathi Boudra <fabo () kde ! org>
Date: 2009-08-21 12:57:49
Message-ID: 1250859469.422537.8139.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1014103 by fabo:
Cleanup current wizard pages
add introduction page
M +58 -38 ciscocertificateenrollment.cpp
M +17 -4 ciscocertificateenrollment.h
--- trunk/playground/network/kvpnc/src/ciscocertificateenrollment.cpp \
#1014102:1014103 @@ -31,12 +31,16 @@
#include "utils.h"
#if defined(QWIZARD_QT4_PORT)
-CiscoCertificateEnrollment::CiscoCertificateEnrollment(const QString &text, \
KVpncConfig *GlobalConfig, QWidget *parent) \
+CiscoCertificateEnrollment::CiscoCertificateEnrollment(const QString &text, + \
KVpncConfig *GlobalConfig, + \
QWidget *parent) : QWizard(parent)
{
+ addPage(new IntroductionPage);
addPage(new EnrollmentMethodPage);
addPage(new CertificateDataPage);
- addPage(new FinishPage);
+ addPage(new ConclusionPage);
+
setWindowTitle(text);
}
@@ -49,26 +53,39 @@
QDialog::accept();
}
+IntroductionPage::IntroductionPage(QWidget *parent)
+ : QWizardPage(parent)
+{
+ setTitle(i18n("Introduction"));
+
+ label = new QLabel(i18n("This wizard will help you to enroll your Cisco \
certificates.")); + label->setWordWrap(true);
+
+ QVBoxLayout *layout = new QVBoxLayout;
+ layout->addWidget(label);
+ setLayout(layout);
+}
+
EnrollmentMethodPage::EnrollmentMethodPage(QWidget *parent)
: QWizardPage(parent)
{
setTitle(i18n("Enrollment Method"));
setSubTitle(i18n("Select your enrollment method"));
- onlineRadioButton = new QRadioButton(i18n("&Online"), this);
+ onlineRadioButton = new QRadioButton(i18n("&Online"));
onlineRadioButton->setChecked(true);
- caLabel = new QLabel(i18n("Certificate authority"), this);
- caComboBox = new KComboBox(this);
+ caLabel = new QLabel(i18n("Certificate authority"));
+ caComboBox = new KComboBox();
- caUrlLabel = new QLabel(i18n("CA Url"), this);
- caUrlLineEdit = new KLineEdit(this);
+ caUrlLabel = new QLabel(i18n("CA Url"));
+ caUrlLineEdit = new KLineEdit();
- caDomainLabel = new QLabel(i18n("CA domain"), this);
- caDomainLineEdit = new KLineEdit(this);
+ caDomainLabel = new QLabel(i18n("CA domain"));
+ caDomainLineEdit = new KLineEdit();
- caChallengePasswordLabel = new QLabel(i18n("Challenge password"), this);
- caChallengePasswordLineEdit = new KLineEdit(this);
+ caChallengePasswordLabel = new QLabel(i18n("Challenge password"));
+ caChallengePasswordLineEdit = new KLineEdit();
caChallengePasswordLineEdit->setPasswordMode(true);
connect(onlineRadioButton, SIGNAL(toggled(bool)),
@@ -88,24 +105,24 @@
connect(onlineRadioButton, SIGNAL(toggled(bool)),
caChallengePasswordLineEdit, SLOT(setEnabled(bool)));
- fileRadioButton = new QRadioButton("Fi&le", this);
+ fileRadioButton = new QRadioButton("Fi&le");
- fileEncodingLabel = new QLabel(i18n("File encoding"), this);
+ fileEncodingLabel = new QLabel(i18n("File encoding"));
fileEncodingLabel->setEnabled(false);
QStringList fileEncodingList;
fileEncodingList << i18n("Binary") << i18n("Base64");
- fileEncodingComboBox = new KComboBox(this);
+ fileEncodingComboBox = new KComboBox();
fileEncodingComboBox->insertItems(0, fileEncodingList);
fileEncodingComboBox->setEnabled(false);
- filenameLabel = new QLabel(i18n("Filename"), this);
+ filenameLabel = new QLabel(i18n("Filename"));
filenameLabel->setEnabled(false);
- filenameUrlRequester = new KUrlRequester(this);
+ filenameUrlRequester = new KUrlRequester();
filenameUrlRequester->setEnabled(false);
- newPasswordLabel = new QLabel(i18n("New password"), this);
+ newPasswordLabel = new QLabel(i18n("New password"));
newPasswordLabel->setEnabled(false);
- newPasswordLineEdit = new KLineEdit(this);
+ newPasswordLineEdit = new KLineEdit();
newPasswordLineEdit->setEnabled(false);
connect(fileRadioButton, SIGNAL(toggled(bool)),
@@ -147,22 +164,22 @@
setTitle(i18n("Certificate Data"));
setSubTitle(i18n("Enter your certificate data details"));
- nameLabel = new QLabel(i18n("Name (CN)"), this);
- nameLineEdit = new KLineEdit(this);
- departmentLabel = new QLabel(i18n("Department (OU)"), this);
- departmentLineEdit = new KLineEdit(this);
- companyLabel = new QLabel(i18n("Company"), this);
- companyLineEdit = new KLineEdit(this);
- stateLabel = new QLabel(i18n("State (ST)"), this);
- stateLineEdit = new KLineEdit(this);
- countryLabel = new QLabel(i18n("Country (C)"), this);
- countryLineEdit = new KLineEdit(this);
- emailLabel = new QLabel(i18n("Email (E)"), this);
- emailLineEdit = new KLineEdit(this);
- ipAddressLabel = new QLabel(i18n("IP adress"), this);
- ipAddressLineEdit = new KLineEdit(this);
- domainLabel = new QLabel(i18n("Domain"), this);
- domainLineEdit = new KLineEdit(this);
+ nameLabel = new QLabel(i18n("Name (CN)"));
+ nameLineEdit = new KLineEdit();
+ departmentLabel = new QLabel(i18n("Department (OU)"));
+ departmentLineEdit = new KLineEdit();
+ companyLabel = new QLabel(i18n("Company"));
+ companyLineEdit = new KLineEdit();
+ stateLabel = new QLabel(i18n("State (ST)"));
+ stateLineEdit = new KLineEdit();
+ countryLabel = new QLabel(i18n("Country (C)"));
+ countryLineEdit = new KLineEdit();
+ emailLabel = new QLabel(i18n("Email (E)"));
+ emailLineEdit = new KLineEdit();
+ ipAddressLabel = new QLabel(i18n("IP adress"));
+ ipAddressLineEdit = new KLineEdit();
+ domainLabel = new QLabel(i18n("Domain"));
+ domainLineEdit = new KLineEdit();
QGridLayout *layout = new QGridLayout;
layout->addWidget(nameLabel, 0, 0);
@@ -184,13 +201,16 @@
setLayout(layout);
}
-FinishPage::FinishPage(QWidget *parent)
+ConclusionPage::ConclusionPage(QWidget *parent)
: QWizardPage(parent)
{
- resultLabel = new QLabel(i18n("OK"), this);
+ setTitle(i18n("Conclusion"));
- QGridLayout *layout = new QGridLayout;
- layout->addWidget(resultLabel, 0, 0);
+ label = new QLabel(i18n("OK"));
+ label->setWordWrap(true);
+
+ QVBoxLayout *layout = new QVBoxLayout;
+ layout->addWidget(label);
setLayout(layout);
}
#else
--- trunk/playground/network/kvpnc/src/ciscocertificateenrollment.h #1014102:1014103
@@ -47,12 +47,25 @@
class KUrlRequester;
#if defined(QWIZARD_QT4_PORT)
+class IntroductionPage : public QWizardPage
+{
+ Q_OBJECT
+
+public:
+ IntroductionPage(QWidget *parent = 0);
+
+private:
+ QLabel *label;
+};
+
class CiscoCertificateEnrollment : public QWizard
{
Q_OBJECT
public:
- CiscoCertificateEnrollment(const QString &text, KVpncConfig *GlobalConfig = 0, \
QWidget *parent = 0); + CiscoCertificateEnrollment(const QString &text,
+ KVpncConfig *GlobalConfig = 0,
+ QWidget *parent = 0);
~CiscoCertificateEnrollment();
void accept();
@@ -110,15 +123,15 @@
KLineEdit *domainLineEdit;
};
-class FinishPage : public QWizardPage
+class ConclusionPage : public QWizardPage
{
Q_OBJECT
public:
- FinishPage(QWidget *parent = 0);
+ ConclusionPage(QWidget *parent = 0);
private:
- QLabel *resultLabel;
+ QLabel *label;
};
#else
class CiscoCertificateEnrollment : public Q3Wizard
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic