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

KIO

  • sources
  • kde-4.14
  • kdelibs
  • 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 
26 class JobUrlCacheSingleton
27 {
28 public:
29  JobUrlCache instance;
30 };
31 
32 K_GLOBAL_STATIC(JobUrlCacheSingleton, s_jobUrlCache)
33 
34 JobUrlCache& JobUrlCache::instance()
35 {
36  return s_jobUrlCache->instance;
37 }
38 
39 JobUrlCache::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 
52 JobUrlCache::~JobUrlCache()
53 {
54 }
55 
56 void JobUrlCache::slotJobUrlsChanged(QStringList urlList)
57 {
58  m_destUrls = urlList;
59  emit jobUrlsChanged(urlList);
60 }
61 
62 void JobUrlCache::requestJobUrlsChanged()
63 {
64  emit jobUrlsChanged(m_destUrls);
65 }
66 
67 #include "joburlcache_p.moc"
K_GLOBAL_STATIC
#define K_GLOBAL_STATIC(TYPE, NAME)
JobUrlCache::requestJobUrlsChanged
void requestJobUrlsChanged()
Definition: joburlcache.cpp:62
JobUrlCache::instance
static JobUrlCache & instance()
Definition: joburlcache.cpp:34
kglobal.h
QObject
QStringList
JobUrlCache::jobUrlsChanged
void jobUrlsChanged(QStringList)
joburlcache_p.h
QObject::connect
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
JobUrlCache
Definition: joburlcache_p.h:26
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:52 by doxygen 1.8.7 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 API Reference

Skip menu "kdelibs 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

Search



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