KJobWidgets

kuiserverv2jobtracker.h
1 /*
2  This file is part of the KDE project
3  SPDX-FileCopyrightText: 2021 Kai Uwe Broulik <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7 
8 #ifndef KUISERVERV2JOBTRACKER_H
9 #define KUISERVERV2JOBTRACKER_H
10 
11 #include <kjobwidgets_export.h>
12 #include <kjobtrackerinterface.h>
13 
14 class KJob;
15 class KUiServerV2JobTrackerPrivate;
16 
17 /**
18  * @class KUiServerV2JobTracker kuiserverv2jobtracker.h KUiServerV2JobTracker
19  *
20  * The interface to implement to track the progresses of a job.
21  *
22  * @since 5.81
23  */
24 class KJOBWIDGETS_EXPORT KUiServerV2JobTracker : public KJobTrackerInterface
25 {
26  Q_OBJECT
27 
28 public:
29  /**
30  * Creates a new KJobTrackerInterface
31  *
32  * @param parent the parent object
33  */
34  explicit KUiServerV2JobTracker(QObject *parent = nullptr);
35 
36  /**
37  * Destroys a KJobTrackerInterface
38  */
39  ~KUiServerV2JobTracker() override;
40 
41  /**
42  * Register a new job in this tracker.
43  *
44  * @param job the job to register
45  */
46  void registerJob(KJob *job) override;
47 
48  /**
49  * Unregister a job from this tracker.
50  *
51  * @param job the job to unregister
52  */
53  void unregisterJob(KJob *job) override;
54 
55 protected Q_SLOTS:
56  /**
57  * The following slots are inherited from KJobTrackerInterface.
58  */
59  void finished(KJob *job) override;
60  void suspended(KJob *job) override;
61  void resumed(KJob *job) override;
62  virtual void description(KJob *job, const QString &title,
63  const QPair<QString, QString> &field1,
64  const QPair<QString, QString> &field2) override;
65  void infoMessage(KJob *job, const QString &plain, const QString &rich) override;
66  void totalAmount(KJob *job, KJob::Unit unit, qulonglong amount) override;
67  void processedAmount(KJob *job, KJob::Unit unit, qulonglong amount) override;
68  void percent(KJob *job, unsigned long percent) override;
69  void speed(KJob *job, unsigned long value) override;
70 
71 private:
72  KUiServerV2JobTrackerPrivate *const d;
73 
74 };
75 
76 #endif
virtual void resumed(KJob *job)
The interface to implement to track the progresses of a job.
virtual void suspended(KJob *job)
virtual void totalAmount(KJob *job, KJob::Unit unit, qulonglong amount)
virtual void description(KJob *job, const QString &title, const QPair< QString, QString > &field1, const QPair< QString, QString > &field2)
virtual void finished(KJob *job)
virtual void speed(KJob *job, unsigned long value)
virtual void infoMessage(KJob *job, const QString &plain, const QString &rich)
virtual void percent(KJob *job, unsigned long percent)
virtual void unregisterJob(KJob *job)
virtual void registerJob(KJob *job)
virtual void processedAmount(KJob *job, KJob::Unit unit, qulonglong amount)
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Tue May 11 2021 22:48:07 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.