KIO
Go to the documentation of this file.
25 #include <QtGui/QLayout>
26 #include <QtGui/QRadioButton>
27 #include <QtGui/QCheckBox>
28 #include <QtGui/QFrame>
29 #include <QtGui/QLabel>
30 #include <QtGui/QListWidget>
39 class KSSLCertDialog::KSSLCertDialogPrivate {
48 :
KDialog(parent), d(new KSSLCertDialogPrivate) {
52 QBoxLayout * grid =
new QVBoxLayout(
this );
55 grid->addWidget(d->p_message);
59 grid->addWidget(lblCertificate);
63 _certs->setMinimumHeight(4*fm.height());
64 grid->addWidget(_certs);
66 _save =
new QCheckBox(
i18n(
"Save selection for this host."),
this);
67 grid->addWidget(_save);
69 grid->addWidget(
new KSeparator(Qt::Horizontal,
this));
71 QBoxLayout * h =
new QHBoxLayout(
this);
77 connect(_ok, SIGNAL(clicked()), SLOT(slotSend()));
79 d->p_pb_dontsend =
new KPushButton(
i18n(
"Do not send a certificate"),
this);
80 h->addWidget(d->p_pb_dontsend);
81 connect(d->p_pb_dontsend, SIGNAL(clicked()), SLOT(slotDont()));
83 #ifndef QT_NO_WIDGET_TOPEXTRA
84 setCaption(
i18n(
"KDE SSL Certificate Dialog"));
94 #ifndef KDE_NO_DEPRECATED
101 _save->setChecked(saveChecked);
102 d->p_send_flag = sendChecked;
105 _ok->setDefault(
true);
107 d->p_pb_dontsend->setDefault(
true);
109 for (QStringList::ConstIterator i = certs.begin(); i != certs.end(); ++i) {
113 new QListWidgetItem(*i, _certs);
116 _certs->setCurrentItem(_certs->item(0));
121 return _save->isChecked();
126 return d->p_send_flag;
131 QListWidgetItem *selected = _certs->currentItem();
132 if (selected && d->p_send_flag)
133 return selected->text();
141 d->p_message->setText(
i18n(
"The server <b>%1</b> requests a certificate.<br /><br />"
142 "Select a certificate to use from the list below:",
147 void KSSLCertDialog::slotSend() {
148 d->p_send_flag =
true;
153 void KSSLCertDialog::slotDont() {
154 d->p_send_flag =
false;
167 s >> tmp; r.
ok = (tmp == 1);
169 s >> tmp; r.
save = (tmp == 1);
170 s >> tmp; r.
send = (tmp == 1);
175 #include "ksslcertdialog.moc"
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Fri Jul 12 2013 08:54:03 by
doxygen 1.8.3.1 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.