delay a few things on startup, such as setting the visibility mode, which ensures...
[personal-kdebase.git] / runtime / kcontrol / dnssd / kcmdnssd.cpp
blobeb10d8088a128b3df719d8c53112846eb8316520
1 /***************************************************************************
2 * Copyright (C) 2004,2005 by Jakub Stachowski *
3 * qbast@go2.pl *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
19 ***************************************************************************/
21 #include <sys/stat.h>
22 #include <config-runtime.h>
24 #include <QLayout>
25 #include <QFile>
26 #include <QRadioButton>
27 #include <QTimer>
28 #include <QTabWidget>
29 //Added by qt3to4:
30 #include <QTextStream>
32 #include <klocale.h>
33 #include <kaboutdata.h>
34 #include <kglobal.h>
35 #include <kpluginfactory.h>
36 #include <kpluginloader.h>
37 #include <klineedit.h>
38 #include <kpassworddialog.h>
39 #include <kconfig.h>
41 #include "kcmdnssd.h"
42 #include <dnssd/settings.h>
43 #include <dnssd/domainbrowser.h>
44 #include <QtDBus/QtDBus>
46 #define MDNSD_CONF "/etc/mdnsd.conf"
47 #define MDNSD_PID "/var/run/mdnsd.pid"
49 K_PLUGIN_FACTORY(KCMDnssdFactory, registerPlugin<KCMDnssd>();)
50 K_EXPORT_PLUGIN(KCMDnssdFactory("kcmkdnssd"))
52 KCMDnssd::KCMDnssd(QWidget *parent, const QVariantList&)
53 : KCModule( KCMDnssdFactory::componentData(), parent)
56 widget = new Ui_ConfigDialog();
57 widget->setupUi(this);
58 setAboutData(new KAboutData("kcm_kdnssd", 0,
59 ki18n("ZeroConf configuration"),0,KLocalizedString(),KAboutData::License_GPL,
60 ki18n("(C) 2004-2007 Jakub Stachowski")));
61 setQuickHelp(i18n("Setup services browsing with ZeroConf"));
62 addConfig(DNSSD::Configuration::self(),this);
63 setButtons( Default|Apply );
66 KCMDnssd::~KCMDnssd()
70 void KCMDnssd::save()
72 KCModule::save();
74 // Send signal to all kde applications which have a DNSSD::DomainBrowserPrivate instance
75 QDBusMessage message =
76 QDBusMessage::createSignal("/libdnssd", "org.kde.DNSSD.DomainBrowser", "domainListChanged");
77 QDBusConnection::sessionBus().send(message);
81 #include "kcmdnssd.moc"