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

KDECore

kjobtrackerinterface.cpp

Go to the documentation of this file.
00001 /*  This file is part of the KDE project
00002     Copyright (C) 2007 Kevin Ottens <ervin@kde.org>
00003 
00004     This library is free software; you can redistribute it and/or
00005     modify it under the terms of the GNU Library General Public
00006     License version 2 as published by the Free Software Foundation.
00007 
00008     This library is distributed in the hope that it will be useful,
00009     but WITHOUT ANY WARRANTY; without even the implied warranty of
00010     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011     Library General Public License for more details.
00012 
00013     You should have received a copy of the GNU Library General Public License
00014     along with this library; see the file COPYING.LIB.  If not, write to
00015     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00016     Boston, MA 02110-1301, USA.
00017 
00018 */
00019 
00020 #include "kjobtrackerinterface.h"
00021 
00022 #include "kjob.h"
00023 
00024 class KJobTrackerInterface::Private
00025 {
00026 public:
00027     Private(KJobTrackerInterface *interface) : q(interface)
00028     {
00029 
00030     }
00031 
00032     KJobTrackerInterface *const q;
00033 };
00034 
00035 KJobTrackerInterface::KJobTrackerInterface(QObject *parent)
00036     : QObject(parent), d(new Private(this))
00037 {
00038 
00039 }
00040 
00041 KJobTrackerInterface::~KJobTrackerInterface()
00042 {
00043     delete d;
00044 }
00045 
00046 void KJobTrackerInterface::registerJob(KJob *job)
00047 {
00048     QObject::connect(job, SIGNAL(finished(KJob*)),
00049                      this, SLOT(unregisterJob(KJob*)));
00050     QObject::connect(job, SIGNAL(finished(KJob*)),
00051                      this, SLOT(finished(KJob*)));
00052 
00053     QObject::connect(job, SIGNAL(suspended(KJob*)),
00054                      this, SLOT(suspended(KJob*)));
00055     QObject::connect(job, SIGNAL(resumed(KJob*)),
00056                      this, SLOT(resumed(KJob*)));
00057 
00058     QObject::connect(job, SIGNAL(description(KJob*, const QString&,
00059                                              const QPair<QString, QString>&,
00060                                              const QPair<QString, QString>&)),
00061                      this, SLOT(description(KJob*, const QString&,
00062                                             const QPair<QString, QString>&,
00063                                             const QPair<QString, QString>&)));
00064     QObject::connect(job, SIGNAL(infoMessage(KJob*, const QString&, const QString&)),
00065                      this, SLOT(infoMessage(KJob*, const QString&, const QString&)));
00066     QObject::connect(job, SIGNAL(warning(KJob*, const QString&, const QString&)),
00067                      this, SLOT(warning(KJob*, const QString&, const QString&)));
00068 
00069     QObject::connect(job, SIGNAL(totalAmount(KJob*, KJob::Unit, qulonglong)),
00070                      this, SLOT(totalAmount(KJob*, KJob::Unit, qulonglong)));
00071     QObject::connect(job, SIGNAL(processedAmount(KJob*, KJob::Unit, qulonglong)),
00072                      this, SLOT(processedAmount(KJob*, KJob::Unit, qulonglong)));
00073     QObject::connect(job, SIGNAL(percent(KJob*, unsigned long)),
00074                      this, SLOT(percent(KJob*, unsigned long)));
00075     QObject::connect(job, SIGNAL(speed(KJob*, unsigned long)),
00076                      this, SLOT(speed(KJob*, unsigned long)));
00077 }
00078 
00079 void KJobTrackerInterface::unregisterJob(KJob *job)
00080 {
00081     QObject::disconnect(job, SIGNAL(finished(KJob*)),
00082                         this, SLOT(unregisterJob(KJob*)));
00083     QObject::disconnect(job, SIGNAL(finished(KJob*)),
00084                         this, SLOT(finished(KJob*)));
00085 
00086     QObject::disconnect(job, SIGNAL(suspended(KJob*)),
00087                         this, SLOT(suspended(KJob*)));
00088     QObject::disconnect(job, SIGNAL(resumed(KJob*)),
00089                         this, SLOT(resumed(KJob*)));
00090 
00091     QObject::disconnect(job, SIGNAL(description(KJob*, const QString&,
00092                                                 const QPair<QString, QString>&,
00093                                                 const QPair<QString, QString>&)),
00094                         this, SLOT(description(KJob*, const QString&,
00095                                                const QPair<QString, QString>&,
00096                                                const QPair<QString, QString>&)));
00097     QObject::disconnect(job, SIGNAL(infoMessage(KJob*, const QString&, const QString&)),
00098                         this, SLOT(infoMessage(KJob*, const QString&, const QString&)));
00099     QObject::disconnect(job, SIGNAL(warning(KJob*, const QString&, const QString&)),
00100                         this, SLOT(warning(KJob*, const QString&, const QString&)));
00101 
00102     QObject::disconnect(job, SIGNAL(totalAmount(KJob*, KJob::Unit, qulonglong)),
00103                         this, SLOT(totalAmount(KJob*, KJob::Unit, qulonglong)));
00104     QObject::disconnect(job, SIGNAL(processedAmount(KJob*, KJob::Unit, qulonglong)),
00105                         this, SLOT(processedAmount(KJob*, KJob::Unit, qulonglong)));
00106     QObject::disconnect(job, SIGNAL(percent(KJob*, unsigned long)),
00107                         this, SLOT(percent(KJob*, unsigned long)));
00108     QObject::disconnect(job, SIGNAL(speed(KJob*, unsigned long)),
00109                         this, SLOT(speed(KJob*, unsigned long)));
00110 }
00111 
00112 void KJobTrackerInterface::finished(KJob *job)
00113 {
00114     Q_UNUSED(job)
00115 }
00116 
00117 void KJobTrackerInterface::suspended(KJob *job)
00118 {
00119     Q_UNUSED(job)
00120 }
00121 
00122 void KJobTrackerInterface::resumed(KJob *job)
00123 {
00124     Q_UNUSED(job)
00125 }
00126 
00127 void KJobTrackerInterface::description(KJob *job, const QString &title,
00128                                        const QPair<QString, QString> &field1,
00129                                        const QPair<QString, QString> &field2)
00130 {
00131     Q_UNUSED(job)
00132     Q_UNUSED(title)
00133     Q_UNUSED(field1)
00134     Q_UNUSED(field2)
00135 
00136 }
00137 
00138 void KJobTrackerInterface::infoMessage(KJob *job, const QString &plain, const QString &rich)
00139 {
00140     Q_UNUSED(job)
00141     Q_UNUSED(plain)
00142     Q_UNUSED(rich)
00143 }
00144 
00145 void KJobTrackerInterface::warning(KJob *job, const QString &plain, const QString &rich)
00146 {
00147     Q_UNUSED(job)
00148     Q_UNUSED(plain)
00149     Q_UNUSED(rich)
00150 }
00151 
00152 void KJobTrackerInterface::totalAmount(KJob *job, KJob::Unit unit, qulonglong amount)
00153 {
00154     Q_UNUSED(job)
00155     Q_UNUSED(unit)
00156     Q_UNUSED(amount)
00157 }
00158 
00159 void KJobTrackerInterface::processedAmount(KJob *job, KJob::Unit unit, qulonglong amount)
00160 {
00161     Q_UNUSED(job)
00162     Q_UNUSED(unit)
00163     Q_UNUSED(amount)
00164 }
00165 
00166 void KJobTrackerInterface::percent(KJob *job, unsigned long percent)
00167 {
00168     Q_UNUSED(job)
00169     Q_UNUSED(percent)
00170 }
00171 
00172 void KJobTrackerInterface::speed(KJob *job, unsigned long value)
00173 {
00174     Q_UNUSED(job)
00175     Q_UNUSED(value)
00176 }
00177 
00178 #include "kjobtrackerinterface.moc"

KDECore

Skip menu "KDECore"
  • Main Page
  • Modules
  • 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
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
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