KJobWidgets

kuiserverjobtracker.h
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 <KJobTrackerInterface>
12#include <kjobwidgets_export.h>
13
14#include <memory>
15
16class KJob;
17
18/**
19 * @class KUiServerJobTracker kuiserverjobtracker.h KUiServerJobTracker
20 *
21 * The interface to implement to track the progresses of a job.
22 */
23class KJOBWIDGETS_EXPORT KUiServerJobTracker : public KJobTrackerInterface
24{
25 Q_OBJECT
26
27public:
28 /**
29 * Creates a new KJobTrackerInterface
30 *
31 * @param parent the parent object
32 */
33 explicit KUiServerJobTracker(QObject *parent = nullptr);
34
35 /**
36 * Destroys a KJobTrackerInterface
37 */
38 ~KUiServerJobTracker() override;
39
40 /**
41 * Register a new job in this tracker.
42 *
43 * @param job the job to register
44 */
45 void registerJob(KJob *job) override;
46
47 /**
48 * Unregister a job from this tracker.
49 *
50 * @param job the job to unregister
51 */
52 void unregisterJob(KJob *job) override;
53
54protected Q_SLOTS:
55 /**
56 * The following slots are inherited from KJobTrackerInterface.
57 */
58 void finished(KJob *job) override;
59 void suspended(KJob *job) override;
60 void resumed(KJob *job) override;
61 virtual void description(KJob *job, const QString &title, const QPair<QString, QString> &field1, const QPair<QString, QString> &field2) override;
62 void infoMessage(KJob *job, const QString &message) override;
63 void totalAmount(KJob *job, KJob::Unit unit, qulonglong amount) override;
64 void processedAmount(KJob *job, KJob::Unit unit, qulonglong amount) override;
65 void percent(KJob *job, unsigned long percent) override;
66 void speed(KJob *job, unsigned long value) override;
67
68private:
69 class Private;
70 std::unique_ptr<Private> const d;
71
72 Q_PRIVATE_SLOT(d, void _k_killJob())
73};
74
75#endif
virtual void registerJob(KJob *job)
virtual void speed(KJob *job, unsigned long value)
virtual void finished(KJob *job)
virtual void totalAmount(KJob *job, KJob::Unit unit, qulonglong amount)
virtual void resumed(KJob *job)
virtual void percent(KJob *job, unsigned long percent)
virtual void suspended(KJob *job)
virtual void infoMessage(KJob *job, const QString &message)
virtual void unregisterJob(KJob *job)
virtual void processedAmount(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)
The interface to implement to track the progresses of a job.
Q_SLOTSQ_SLOTS
T qobject_cast(QObject *object)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:13:04 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.