KDED
kdedadaptor.cpp
Go to the documentation of this file.00001 /* This file is part of the KDE libraries 00002 * Copyright (C) 1999 David Faure <faure@kde.org> 00003 * Copyright (C) 2000 Waldo Bastian <bastian@kde.org> 00004 * 00005 * This library is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU Library General Public 00007 * License as published by the Free Software Foundation; either 00008 * version 2 of the License, or (at your option) any later version. 00009 * 00010 * This library is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 * Library General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU Library General Public License 00016 * along with this library; see the file COPYING.LIB. If not, write to 00017 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00018 * Boston, MA 02110-1301, USA. 00019 **/ 00020 00021 #include "kdedadaptor.h" 00022 #include "kded.h" 00023 #include <kglobal.h> 00024 #include <kconfig.h> 00025 #include <QCoreApplication> 00026 00027 KdedAdaptor::KdedAdaptor(QObject *parent) 00028 : QDBusAbstractAdaptor(parent) 00029 { 00030 } 00031 00032 bool KdedAdaptor::loadModule(const QString &module) 00033 { 00034 return Kded::self()->loadModule(module, false) != 0; 00035 } 00036 00037 bool KdedAdaptor::unloadModule(const QString &module) 00038 { 00039 return Kded::self()->unloadModule(module); 00040 } 00041 00042 void KdedAdaptor::registerWindowId(qlonglong windowId, const QDBusMessage &msg) 00043 { 00044 Kded::self()->registerWindowId(windowId, msg.service()); 00045 } 00046 00047 void KdedAdaptor::unregisterWindowId(qlonglong windowId, const QDBusMessage &msg) 00048 { 00049 Kded::self()->unregisterWindowId(windowId, msg.service()); 00050 } 00051 00052 QStringList KdedAdaptor::loadedModules() 00053 { 00054 return Kded::self()->loadedModules(); 00055 } 00056 00057 void KdedAdaptor::reconfigure() 00058 { 00059 KGlobal::config()->reparseConfiguration(); 00060 Kded::self()->initModules(); 00061 } 00062 00063 void KdedAdaptor::loadSecondPhase() 00064 { 00065 Kded::self()->loadSecondPhase(); 00066 } 00067 00068 void KdedAdaptor::quit() 00069 { 00070 QCoreApplication::instance()->quit(); 00071 } 00072 00073 #include "kdedadaptor.moc"