KJobWidgets

kuiserverjobtracker.h
1 /* This file is part of the KDE project
2  Copyright (C) 2007 Kevin Ottens <[email protected]>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License version 2 as published by the Free Software Foundation.
7 
8  This library is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  Library General Public License for more details.
12 
13  You should have received a copy of the GNU Library General Public License
14  along with this library; see the file COPYING.LIB. If not, write to
15  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  Boston, MA 02110-1301, USA.
17 
18 */
19 
20 #ifndef KUISERVERJOBTRACKER_H
21 #define KUISERVERJOBTRACKER_H
22 
23 #include <kjobwidgets_export.h>
24 #include <kjobtrackerinterface.h>
25 
26 class KJob;
27 
33 class KJOBWIDGETS_EXPORT KUiServerJobTracker : public KJobTrackerInterface
34 {
35  Q_OBJECT
36 
37 public:
43  explicit KUiServerJobTracker(QObject *parent = nullptr);
44 
48  ~KUiServerJobTracker() override;
49 
55  void registerJob(KJob *job) override;
56 
62  void unregisterJob(KJob *job) override;
63 
64 protected Q_SLOTS:
68  void finished(KJob *job) override;
69  void suspended(KJob *job) override;
70  void resumed(KJob *job) override;
71  virtual void description(KJob *job, const QString &title,
72  const QPair<QString, QString> &field1,
73  const QPair<QString, QString> &field2) override;
74  void infoMessage(KJob *job, const QString &plain, const QString &rich) override;
75  void totalAmount(KJob *job, KJob::Unit unit, qulonglong amount) override;
76  void processedAmount(KJob *job, KJob::Unit unit, qulonglong amount) override;
77  void percent(KJob *job, unsigned long percent) override;
78  void speed(KJob *job, unsigned long value) override;
79 
80 private:
81  class Private;
82  Private *const d;
83 
84  Q_PRIVATE_SLOT(d, void _k_killJob())
85 };
86 
87 #endif
virtual void resumed(KJob *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)
The interface to implement to track the progresses of a job.
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-2020 The KDE developers.
Generated on Wed Jul 1 2020 22:46:46 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.