KIO
kcmssl.cpp
Go to the documentation of this file.
00001 /* This file is part of the KDE project 00002 Copyright (C) 2010 Andreas Hartmetz <ahartmetz@gmail.com> 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Library General Public 00006 License as published by the Free Software Foundation; either 00007 version 2 of the License, or (at your option) any later version. 00008 00009 This program is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 GNU General Public License for more details. 00013 00014 You should have received a copy of the GNU General Public License 00015 along with this program; if not, write to the Free Software 00016 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 00017 02110-1301, USA. 00018 */ 00019 00020 #include "kcmssl.h" 00021 #include "cacertificatespage.h" 00022 00023 #include <kaboutdata.h> 00024 #include <kdeversion.h> 00025 #include <ktabwidget.h> 00026 00027 #include <QVBoxLayout> 00028 #include <kpluginfactory.h> 00029 #include <kpluginloader.h> 00030 00031 00032 K_PLUGIN_FACTORY(KcmSslFactory, registerPlugin<KcmSsl>();) 00033 K_EXPORT_PLUGIN(KcmSslFactory("kcm_ssl")) 00034 00035 00036 KcmSsl::KcmSsl(QWidget *parent, const QVariantList &args) 00037 : KCModule(KcmSslFactory::componentData(), parent, args) 00038 { 00039 KAboutData *about = new KAboutData( 00040 "kcm_ssl", 0, ki18n("SSL Configuration Module"), 00041 KDE_VERSION_STRING, KLocalizedString(), KAboutData::License_GPL, 00042 ki18n("Copyright 2010 Andreas Hartmetz")); 00043 about->addAuthor(ki18n("Andreas Hartmetz"), KLocalizedString(), "ahartmetz@gmail.com"); 00044 setAboutData(about); 00045 setButtons(Apply | Default | Help); 00046 00047 m_tabs = new KTabWidget(this); 00048 // tell the tab widget to resize itself to fill all space, basically... 00049 setLayout(new QVBoxLayout); 00050 layout()->setMargin(0); 00051 layout()->setSpacing(0); 00052 layout()->addWidget(m_tabs); 00053 00054 m_caCertificatesPage = new CaCertificatesPage(m_tabs); 00055 m_tabs->addTab(m_caCertificatesPage, i18n("SSL Signers")); 00056 00057 connect(m_caCertificatesPage, SIGNAL(changed(bool)), SLOT(pageChanged(bool))); 00058 } 00059 00060 void KcmSsl::load() 00061 { 00062 m_caCertificatesPage->load(); 00063 } 00064 00065 void KcmSsl::save() 00066 { 00067 m_caCertificatesPage->save(); 00068 } 00069 00070 void KcmSsl::defaults() 00071 { 00072 m_caCertificatesPage->defaults(); 00073 } 00074 00075 // slot 00076 void KcmSsl::pageChanged(bool isChanged) 00077 { 00078 // HACK 00079 emit changed(isChanged); 00080 } 00081 00082 #include "kcmssl.moc"
KDE 4.6 API Reference