KJobWidgets

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

KDE's Doxygen guidelines are available online.