KCoreAddons

kjobtrackerinterface.cpp
1 /*
2  This file is part of the KDE project
3 
4  SPDX-FileCopyrightText: 2007 Kevin Ottens <[email protected]>
5 
6  SPDX-License-Identifier: LGPL-2.0-or-later
7 */
8 
9 #include "kjobtrackerinterface.h"
10 
11 #include "kjob.h"
12 
13 class KJobTrackerInterfacePrivate
14 {
15 public:
16  KJobTrackerInterfacePrivate(KJobTrackerInterface *interface)
17  : q(interface)
18  {
19  }
20 
21  KJobTrackerInterface *const q;
22 };
23 
25  : QObject(parent)
26  , d(new KJobTrackerInterfacePrivate(this))
27 {
28  qRegisterMetaType<QPair<QString, QString>>();
29 }
30 
32 
34 {
39 
47 }
48 
50 {
51  job->disconnect(this);
52 }
53 
55 {
56  Q_UNUSED(job)
57 }
58 
60 {
61  Q_UNUSED(job)
62 }
63 
65 {
66  Q_UNUSED(job)
67 }
68 
70 {
71  Q_UNUSED(job)
72  Q_UNUSED(title)
73  Q_UNUSED(field1)
74  Q_UNUSED(field2)
75 }
76 
77 void KJobTrackerInterface::infoMessage(KJob *job, const QString &plain, const QString &rich)
78 {
79  Q_UNUSED(job)
80  Q_UNUSED(plain)
81  Q_UNUSED(rich)
82 }
83 
84 void KJobTrackerInterface::warning(KJob *job, const QString &plain, const QString &rich)
85 {
86  Q_UNUSED(job)
87  Q_UNUSED(plain)
88  Q_UNUSED(rich)
89 }
90 
91 void KJobTrackerInterface::totalAmount(KJob *job, KJob::Unit unit, qulonglong amount)
92 {
93  Q_UNUSED(job)
94  Q_UNUSED(unit)
95  Q_UNUSED(amount)
96 }
97 
98 void KJobTrackerInterface::processedAmount(KJob *job, KJob::Unit unit, qulonglong amount)
99 {
100  Q_UNUSED(job)
101  Q_UNUSED(unit)
102  Q_UNUSED(amount)
103 }
104 
105 void KJobTrackerInterface::percent(KJob *job, unsigned long percent)
106 {
107  Q_UNUSED(job)
108  Q_UNUSED(percent)
109 }
110 
111 void KJobTrackerInterface::speed(KJob *job, unsigned long value)
112 {
113  Q_UNUSED(job)
114  Q_UNUSED(value)
115 }
116 
117 #include "moc_kjobtrackerinterface.cpp"
virtual void resumed(KJob *job)
Called when a job is resumed.
KJobTrackerInterface(QObject *parent=nullptr)
Creates a new KJobTrackerInterface.
void totalAmountChanged(KJob *job, KJob::Unit unit, qulonglong amount)
Emitted when we know the amount the job will have to process.
void resumed(KJob *job)
Emitted when the job is resumed.
virtual void suspended(KJob *job)
Called when a job is suspended.
virtual void totalAmount(KJob *job, KJob::Unit unit, qulonglong amount)
Called when we know the amount a job will have to process.
void description(KJob *job, const QString &title, const QPair< QString, QString > &field1=QPair< QString, QString >(), const QPair< QString, QString > &field2=QPair< QString, QString >())
Emitted to display general description of this job.
bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
virtual void description(KJob *job, const QString &title, const QPair< QString, QString > &field1, const QPair< QString, QString > &field2)
Called to display general description of a job.
virtual void finished(KJob *job)
Called when a job is finished, in any case.
virtual void speed(KJob *job, unsigned long value)
Called to show the speed of the job.
void speed(KJob *job, unsigned long speed)
Emitted to display information about the speed of this job.
void finished(KJob *job)
Emitted when the job is finished, in any case.
Unit
Describes the unit used in the methods that handle reporting the job progress info.
Definition: kjob.h:90
virtual void warning(KJob *job, const QString &plain, const QString &rich)
Emitted to display a warning about a job.
The interface to implement to track the progresses of a job.
void processedAmountChanged(KJob *job, KJob::Unit unit, qulonglong amount)
Regularly emitted to show the progress of this job by giving the current amount.
void warning(KJob *job, const QString &plain, const QString &rich=QString())
Emitted to display a warning about this job.
void suspended(KJob *job)
Emitted when the job is suspended.
virtual void infoMessage(KJob *job, const QString &plain, const QString &rich)
Called to display state information about a job.
virtual void percent(KJob *job, unsigned long percent)
Called to show the overall progress of the job.
virtual void unregisterJob(KJob *job)
Unregister a job from this tracker.
virtual void registerJob(KJob *job)
Register a new job in this tracker.
virtual void processedAmount(KJob *job, KJob::Unit unit, qulonglong amount)
Regularly called to show the progress of a job by giving the current amount.
void percentChanged(KJob *job, unsigned long percent)
Progress signal showing the overall progress of the job.
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
void infoMessage(KJob *job, const QString &plain, const QString &rich=QString())
Emitted to display state information about this job.
The base class for all jobs.
Definition: kjob.h:76
~KJobTrackerInterface() override
Destroys a KJobTrackerInterface.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Fri Nov 26 2021 23:03:44 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.