From 4aed2c8219774f5d797760606b8489a92ddc5163 Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kcontrol/kio/main.cpp | 158 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 158 insertions(+) create mode 100644 kcontrol/kio/main.cpp (limited to 'kcontrol/kio/main.cpp') diff --git a/kcontrol/kio/main.cpp b/kcontrol/kio/main.cpp new file mode 100644 index 000000000..dfe2eb0f8 --- /dev/null +++ b/kcontrol/kio/main.cpp @@ -0,0 +1,158 @@ +// (c) Torben Weis 1998 +// (c) David Faure 1998 +/* + * main.cpp for lisa,reslisa,kio_lan and kio_rlan kcm module + * + * Copyright (C) 2000,2001 Alexander Neundorf + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +#include +#include + +#include "kcookiesmain.h" +#include "netpref.h" +#include "smbrodlg.h" +#include "useragentdlg.h" +#include "kproxydlg.h" +#include "cache.h" + +#include "main.h" + +extern "C" +{ + + KDE_EXPORT KCModule *create_cookie(QWidget *parent, const char /**name*/) + { + return new KCookiesMain(parent); + } + + KDE_EXPORT KCModule *create_smb(QWidget *parent, const char /**name*/) + { + return new SMBRoOptions(parent); + } + + KDE_EXPORT KCModule *create_useragent(QWidget *parent, const char /**name*/) + { + return new UserAgentDlg(parent); + } + + KDE_EXPORT KCModule *create_proxy(QWidget *parent, const char /**name*/) + { + return new KProxyOptions(parent); + } + + KDE_EXPORT KCModule *create_cache(QWidget *parent, const char /**name*/) + { + return new KCacheConfigDialog( parent ); + } + + KDE_EXPORT KCModule *create_netpref(QWidget *parent, const char /**name*/) + { + return new KIOPreferences(parent); + } + + KDE_EXPORT KCModule *create_lanbrowser(QWidget *parent, const char *) + { + return new LanBrowser(parent); + } + +} + +LanBrowser::LanBrowser(QWidget *parent) +:KCModule(parent,"kcmkio") +,layout(this) +,tabs(this) +{ + setQuickHelp( i18n("

Local Network Browsing

Here you setup your " + "\"Network Neighborhood\". You " + "can use either the LISa daemon and the lan:/ ioslave, or the " + "ResLISa daemon and the rlan:/ ioslave.

" + "About the LAN ioslave configuration:
If you select it, the " + "ioslave, if available, will check whether the host " + "supports this service when you open this host. Please note " + "that paranoid people might consider even this to be an attack.
" + "Always means that you will always see the links for the " + "services, regardless of whether they are actually offered by the host. " + "Never means that you will never have the links to the services. " + "In both cases you will not contact the host, so nobody will ever regard " + "you as an attacker.

More information about LISa " + "can be found at " + "the LISa Homepage or contact Alexander Neundorf " + "<neundorf@kde.org>.")); + + layout.addWidget(&tabs); + + smbPage = create_smb(&tabs, 0); + tabs.addTab(smbPage, i18n("&Windows Shares")); + connect(smbPage,SIGNAL(changed(bool)), SLOT( changed() )); + + lisaPage = KCModuleLoader::loadModule("kcmlisa", KCModuleLoader::None, &tabs); + if (lisaPage) + { + tabs.addTab(lisaPage,i18n("&LISa Daemon")); + connect(lisaPage,SIGNAL(changed()), SLOT( changed() )); + } + +// resLisaPage = KCModuleLoader::loadModule("kcmreslisa", &tabs); +// if (resLisaPage) +// { +// tabs.addTab(resLisaPage,i18n("R&esLISa Daemon")); +// connect(resLisaPage,SIGNAL(changed()), SLOT( changed() )); +// } + + kioLanPage = KCModuleLoader::loadModule("kcmkiolan", KCModuleLoader::None, &tabs); + if (kioLanPage) + { + tabs.addTab(kioLanPage,i18n("lan:/ Iosla&ve")); + connect(kioLanPage,SIGNAL(changed()), SLOT( changed() )); + } + + setButtons(Apply|Help); + load(); +} + +void LanBrowser::load() +{ + smbPage->load(); + if (lisaPage) + lisaPage->load(); +// if (resLisaPage) +// resLisaPage->load(); + if (kioLanPage) + kioLanPage->load(); + emit changed(false); +} + +void LanBrowser::save() +{ + smbPage->save(); +// if (resLisaPage) +// resLisaPage->save(); + if (kioLanPage) + kioLanPage->save(); + if (lisaPage) + lisaPage->save(); + emit changed(false); +} + +#include "main.moc" + -- cgit v1.2.1