• Skip to content
  • Skip to link menu
KDE 4.6 API Reference
  • KDE API Reference
  • kdelibs
  • KDE Home
  • Contact Us
 

KIO

joburlcache.cpp

Go to the documentation of this file.
00001 /*****************************************************************************
00002 *  This file is part of the KDE libraries                                    *
00003 *  Copyright (C) 2009 by Shaun Reich <shaun.reich@kdemail.net>               *
00004 *                                                                            *
00005 *  This library is free software; you can redistribute it and/or modify      *
00006 *  it under the terms of the GNU Lesser General Public License as published  *
00007 *  by the Free Software Foundation; either version 2 of the License or (at   *
00008 *  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 Lesser General Public License  *
00016 *  along with this library; see the file COPYING.LIB.                        *
00017 *  If not, see <http://www.gnu.org/licenses/>.                               *
00018 *****************************************************************************/
00019 
00020 #include "joburlcache_p.h"
00021 #include "kuiserver_interface.h"
00022 
00023 #include <kglobal.h>
00024 
00025 
00026 class JobUrlCacheSingleton
00027 {
00028 public:
00029     JobUrlCache instance;
00030 };
00031 
00032 K_GLOBAL_STATIC(JobUrlCacheSingleton, s_jobUrlCache)
00033 
00034 JobUrlCache& JobUrlCache::instance()
00035 {
00036     return s_jobUrlCache->instance;
00037 }
00038 
00039 JobUrlCache::JobUrlCache() : QObject(0)
00040 {
00041     org::kde::kuiserver *interface = new
00042         org::kde::kuiserver("org.kde.kuiserver", "/JobViewServer", QDBusConnection::sessionBus(), this);
00043 
00044     //connect to receive updates about the job urls
00045     connect(interface, SIGNAL(jobUrlsChanged(QStringList)),
00046     this, SLOT(slotJobUrlsChanged(QStringList)));
00047 
00048     //force signal emission
00049     interface->emitJobUrlsChanged();
00050 }
00051 
00052 JobUrlCache::~JobUrlCache()
00053 {
00054 }
00055 
00056 void JobUrlCache::slotJobUrlsChanged(QStringList urlList)
00057 {
00058     m_destUrls = urlList;
00059     emit jobUrlsChanged(urlList);
00060 }
00061 
00062 void JobUrlCache::requestJobUrlsChanged()
00063 {
00064     emit jobUrlsChanged(m_destUrls);
00065 }
00066 
00067 #include "joburlcache_p.moc"

KIO

Skip menu "KIO"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.7.3
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal