KJobWidgets

kabstractwidgetjobtracker.h
1 /* This file is part of the KDE project
2  Copyright (C) 2000 Matej Koss <[email protected]>
3  Copyright (C) 2007 Kevin Ottens <[email protected]>
4  Copyright (C) 2008 Rafael Fernández López <[email protected]>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Library General Public
8  License version 2 as published by the Free Software Foundation.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Library General Public License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to
17  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  Boston, MA 02110-1301, USA.
19 
20 */
21 
22 #ifndef KABSTRACTWIDGETJOBTRACKER_H
23 #define KABSTRACTWIDGETJOBTRACKER_H
24 
25 #include <kjobwidgets_export.h>
26 #include <kjobtrackerinterface.h>
27 
28 class KJob;
29 class QWidget;
30 
36 class KJOBWIDGETS_EXPORT KAbstractWidgetJobTracker : public KJobTrackerInterface
37 {
38  Q_OBJECT
39 
40 public:
46  explicit KAbstractWidgetJobTracker(QWidget *parent = nullptr);
47 
51  ~KAbstractWidgetJobTracker() override;
52 
53 // KDE5: move this two virtual methods to be placed correctly (ereslibre)
54 public Q_SLOTS:
62  void registerJob(KJob *job) override;
63 
69  void unregisterJob(KJob *job) override;
70 
71 public:
78  virtual QWidget *widget(KJob *job) = 0;
79 
88  void setStopOnClose(KJob *job, bool stopOnClose);
89 
97  bool stopOnClose(KJob *job) const;
98 
111  void setAutoDelete(KJob *job, bool autoDelete);
112 
121  bool autoDelete(KJob *job) const;
122 
123 protected Q_SLOTS:
130  void finished(KJob *job) override;
131 
138  virtual void slotStop(KJob *job);
139 
146  virtual void slotSuspend(KJob *job);
147 
154  virtual void slotResume(KJob *job);
155 
162  virtual void slotClean(KJob *job);
163 
164 Q_SIGNALS:
170  void stopped(KJob *job);
171 
177  void suspend(KJob *job);
178 
184  void resume(KJob *job);
185 
186 protected:
187  class Private;
188  Private *const d;
189 };
190 
191 #endif
The base class for widget based job trackers.
virtual void finished(KJob *job)
virtual void unregisterJob(KJob *job)
virtual void registerJob(KJob *job)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Thu Jun 4 2020 22:38:34 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.