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

KIO

  • kio
  • kio
joburlcache.cpp
Go to the documentation of this file.
1/*****************************************************************************
2* This file is part of the KDE libraries *
3* Copyright (C) 2009 by Shaun Reich <shaun.reich@kdemail.net> *
4* *
5* This library is free software; you can redistribute it and/or modify *
6* it under the terms of the GNU Lesser General Public License as published *
7* by the Free Software Foundation; either version 2 of the License or (at *
8* your option) any later version. *
9* *
10* This library 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 GNU *
13* Library General Public License for more details. *
14* *
15* You should have received a copy of the GNU Lesser General Public License *
16* along with this library; see the file COPYING.LIB. *
17* If not, see <http://www.gnu.org/licenses/>. *
18*****************************************************************************/
19
20#include "joburlcache_p.h"
21#include "kuiserver_interface.h"
22
23#include <kglobal.h>
24
25
26class JobUrlCacheSingleton
27{
28public:
29 JobUrlCache instance;
30};
31
32K_GLOBAL_STATIC(JobUrlCacheSingleton, s_jobUrlCache)
33
34JobUrlCache& JobUrlCache::instance()
35{
36 return s_jobUrlCache->instance;
37}
38
39JobUrlCache::JobUrlCache() : QObject(0)
40{
41 org::kde::kuiserver *interface = new
42 org::kde::kuiserver("org.kde.kuiserver", "/JobViewServer", QDBusConnection::sessionBus(), this);
43
44 //connect to receive updates about the job urls
45 connect(interface, SIGNAL(jobUrlsChanged(QStringList)),
46 this, SLOT(slotJobUrlsChanged(QStringList)));
47
48 //force signal emission
49 interface->emitJobUrlsChanged();
50}
51
52JobUrlCache::~JobUrlCache()
53{
54}
55
56void JobUrlCache::slotJobUrlsChanged(QStringList urlList)
57{
58 m_destUrls = urlList;
59 emit jobUrlsChanged(urlList);
60}
61
62void JobUrlCache::requestJobUrlsChanged()
63{
64 emit jobUrlsChanged(m_destUrls);
65}
66
67#include "joburlcache_p.moc"
JobUrlCache
Definition: joburlcache_p.h:27
JobUrlCache::requestJobUrlsChanged
void requestJobUrlsChanged()
Definition: joburlcache.cpp:62
JobUrlCache::jobUrlsChanged
void jobUrlsChanged(QStringList)
JobUrlCache::instance
static JobUrlCache & instance()
Definition: joburlcache.cpp:34
QObject
K_GLOBAL_STATIC
#define K_GLOBAL_STATIC(TYPE, NAME)
joburlcache_p.h
kglobal.h
org
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KIO

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

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • 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
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal