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 job->disconnect(this); 00082 } 00083 00084 void KJobTrackerInterface::finished(KJob *job) 00085 { 00086 Q_UNUSED(job) 00087 } 00088 00089 void KJobTrackerInterface::suspended(KJob *job) 00090 { 00091 Q_UNUSED(job) 00092 } 00093 00094 void KJobTrackerInterface::resumed(KJob *job) 00095 { 00096 Q_UNUSED(job) 00097 } 00098 00099 void KJobTrackerInterface::description(KJob *job, const QString &title, 00100 const QPair<QString, QString> &field1, 00101 const QPair<QString, QString> &field2) 00102 { 00103 Q_UNUSED(job) 00104 Q_UNUSED(title) 00105 Q_UNUSED(field1) 00106 Q_UNUSED(field2) 00107 00108 } 00109 00110 void KJobTrackerInterface::infoMessage(KJob *job, const QString &plain, const QString &rich) 00111 { 00112 Q_UNUSED(job) 00113 Q_UNUSED(plain) 00114 Q_UNUSED(rich) 00115 } 00116 00117 void KJobTrackerInterface::warning(KJob *job, const QString &plain, const QString &rich) 00118 { 00119 Q_UNUSED(job) 00120 Q_UNUSED(plain) 00121 Q_UNUSED(rich) 00122 } 00123 00124 void KJobTrackerInterface::totalAmount(KJob *job, KJob::Unit unit, qulonglong amount) 00125 { 00126 Q_UNUSED(job) 00127 Q_UNUSED(unit) 00128 Q_UNUSED(amount) 00129 } 00130 00131 void KJobTrackerInterface::processedAmount(KJob *job, KJob::Unit unit, qulonglong amount) 00132 { 00133 Q_UNUSED(job) 00134 Q_UNUSED(unit) 00135 Q_UNUSED(amount) 00136 } 00137 00138 void KJobTrackerInterface::percent(KJob *job, unsigned long percent) 00139 { 00140 Q_UNUSED(job) 00141 Q_UNUSED(percent) 00142 } 00143 00144 void KJobTrackerInterface::speed(KJob *job, unsigned long value) 00145 { 00146 Q_UNUSED(job) 00147 Q_UNUSED(value) 00148 } 00149 00150 #include "kjobtrackerinterface.moc"
KDE 4.6 API Reference