1 | /* |
2 | This file is part of the KDE project |
3 | SPDX-FileCopyrightText: 2007 Kevin Ottens <ervin@kde.org> |
4 | |
5 | SPDX-License-Identifier: LGPL-2.0-only |
6 | */ |
7 | |
8 | #ifndef KUISERVERJOBTRACKER_H |
9 | #define KUISERVERJOBTRACKER_H |
10 | |
11 | #include <kjobwidgets_export.h> |
12 | |
13 | #if KJOBWIDGETS_ENABLE_DEPRECATED_SINCE(6, 17) |
14 | |
15 | #include <KJobTrackerInterface> |
16 | |
17 | class KJob; |
18 | |
19 | /*! |
20 | * \class KUiServerJobTracker |
21 | * |
22 | * \inmodule KJobWidgets |
23 | * |
24 | * \brief The interface to implement to track the progresses of a job. |
25 | * \deprecated[6.17] |
26 | * Use KUiServerV2JobTracker |
27 | */ |
28 | class KJOBWIDGETS_EXPORT KJOBWIDGETS_DEPRECATED_VERSION(6, 17, "Use KUiServerV2JobTracker" ) KUiServerJobTracker : public KJobTrackerInterface |
29 | { |
30 | Q_OBJECT |
31 | |
32 | public: |
33 | /*! |
34 | * Creates a new KJobTrackerInterface |
35 | * |
36 | * \a parent the parent object |
37 | */ |
38 | explicit KUiServerJobTracker(QObject *parent = nullptr); |
39 | |
40 | ~KUiServerJobTracker() override; |
41 | |
42 | /*! |
43 | * Register a new job in this tracker. |
44 | * |
45 | * \a job the job to register |
46 | */ |
47 | void registerJob(KJob *job) override; |
48 | |
49 | /*! |
50 | * Unregister a job from this tracker. |
51 | * |
52 | * \a job the job to unregister |
53 | */ |
54 | void unregisterJob(KJob *job) override; |
55 | |
56 | protected Q_SLOTS: |
57 | void finished(KJob *job) override; |
58 | void suspended(KJob *job) override; |
59 | void resumed(KJob *job) override; |
60 | void description(KJob *job, const QString &title, const QPair<QString, QString> &field1, const QPair<QString, QString> &field2) override; |
61 | void infoMessage(KJob *job, const QString &message) override; |
62 | void totalAmount(KJob *job, KJob::Unit unit, qulonglong amount) override; |
63 | void processedAmount(KJob *job, KJob::Unit unit, qulonglong amount) override; |
64 | void percent(KJob *job, unsigned long percent) override; |
65 | void speed(KJob *job, unsigned long value) override; |
66 | |
67 | private: |
68 | class Private; |
69 | std::unique_ptr<Private> const d; |
70 | |
71 | Q_PRIVATE_SLOT(d, void _k_killJob()) |
72 | }; |
73 | #endif // KWIDGETS_ENABLE_DEPRECATED_SINCE |
74 | |
75 | #endif |
76 | |