• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KDEUI

  • sources
  • kde-4.12
  • kdelibs
  • kdeui
  • jobs
kabstractwidgetjobtracker.cpp
Go to the documentation of this file.
1 /* This file is part of the KDE project
2  Copyright (C) 2000 Matej Koss <koss@miesto.sk>
3  Copyright (C) 2007 Kevin Ottens <ervin@kde.org>
4  Copyright (C) 2007 Rafael Fernández López <ereslibre@kde.org>
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 #include "kabstractwidgetjobtracker.h"
23 #include "kabstractwidgetjobtracker_p.h"
24 
25 #include <QWidget>
26 #include <QTimer>
27 #include <QEvent>
28 #include <QMap>
29 
30 #include <kdebug.h>
31 
32 KAbstractWidgetJobTracker::KAbstractWidgetJobTracker(QWidget *parent)
33  : KJobTrackerInterface(parent)
34  , d(new Private(this))
35 {
36 }
37 
38 KAbstractWidgetJobTracker::~KAbstractWidgetJobTracker()
39 {
40  delete d;
41 }
42 
43 void KAbstractWidgetJobTracker::registerJob(KJob *job)
44 {
45  KJobTrackerInterface::registerJob(job);
46 }
47 
48 void KAbstractWidgetJobTracker::unregisterJob(KJob *job)
49 {
50  KJobTrackerInterface::unregisterJob(job);
51 }
52 
53 void KAbstractWidgetJobTracker::setStopOnClose(KJob *job, bool stopOnClose)
54 {
55  d->setStopOnClose(job, stopOnClose);
56 }
57 
58 bool KAbstractWidgetJobTracker::stopOnClose(KJob *job) const
59 {
60  return d->stopOnClose(job);
61 }
62 
63 void KAbstractWidgetJobTracker::setAutoDelete(KJob *job, bool autoDelete)
64 {
65  d->setAutoDelete(job, autoDelete);
66 }
67 
68 bool KAbstractWidgetJobTracker::autoDelete(KJob *job) const
69 {
70  return d->autoDelete(job);
71 }
72 
73 void KAbstractWidgetJobTracker::finished(KJob *job)
74 {
75  Q_UNUSED(job);
76 }
77 
78 void KAbstractWidgetJobTracker::slotStop(KJob *job)
79 {
80  if (job) {
81  job->kill(KJob::EmitResult); // notify that the job has been killed
82  emit stopped(job);
83  }
84 }
85 
86 void KAbstractWidgetJobTracker::slotSuspend(KJob *job)
87 {
88  if (job) {
89  job->suspend();
90  emit suspend(job);
91  }
92 }
93 
94 void KAbstractWidgetJobTracker::slotResume(KJob *job)
95 {
96  if (job) {
97  job->resume();
98  emit resume(job);
99  }
100 }
101 
102 void KAbstractWidgetJobTracker::slotClean(KJob *job)
103 {
104  Q_UNUSED(job);
105 }
106 
107 #include "kabstractwidgetjobtracker.moc"
kdebug.h
KAbstractWidgetJobTracker::setAutoDelete
void setAutoDelete(KJob *job, bool autoDelete)
This controls whether the dialog should be deleted or only cleaned when the KJob is finished (or canc...
Definition: kabstractwidgetjobtracker.cpp:63
QWidget
KAbstractWidgetJobTracker::slotSuspend
virtual void slotSuspend(KJob *job)
This method should be called for pause/resume Connect this to the progress widgets buttons etc...
Definition: kabstractwidgetjobtracker.cpp:86
KAbstractWidgetJobTracker::setStopOnClose
void setStopOnClose(KJob *job, bool stopOnClose)
This controls whether the job should be canceled if the dialog is closed.
Definition: kabstractwidgetjobtracker.cpp:53
KAbstractWidgetJobTracker::slotClean
virtual void slotClean(KJob *job)
This method is called when the widget should be cleaned (after job is finished).
Definition: kabstractwidgetjobtracker.cpp:102
KAbstractWidgetJobTracker::autoDelete
bool autoDelete(KJob *job) const
Checks whether the dialog should be deleted or cleaned.
Definition: kabstractwidgetjobtracker.cpp:68
KAbstractWidgetJobTracker::resume
void resume(KJob *job)
Emitted when the user resumed the operation.
KAbstractWidgetJobTracker::finished
virtual void finished(KJob *job)
Called when a job is finished, in any case.
Definition: kabstractwidgetjobtracker.cpp:73
kabstractwidgetjobtracker.h
KAbstractWidgetJobTracker::KAbstractWidgetJobTracker
KAbstractWidgetJobTracker(QWidget *parent=0)
Creates a new KAbstractWidgetJobTracker.
Definition: kabstractwidgetjobtracker.cpp:32
KAbstractWidgetJobTracker::registerJob
virtual void registerJob(KJob *job)
Register a new job in this tracker.
Definition: kabstractwidgetjobtracker.cpp:43
KJobTrackerInterface
KAbstractWidgetJobTracker::~KAbstractWidgetJobTracker
virtual ~KAbstractWidgetJobTracker()
Destroys a KAbstractWidgetJobTracker.
Definition: kabstractwidgetjobtracker.cpp:38
KAbstractWidgetJobTracker::d
Private *const d
Definition: kabstractwidgetjobtracker.h:185
KAbstractWidgetJobTracker::slotResume
virtual void slotResume(KJob *job)
This method should be called for pause/resume Connect this to the progress widgets buttons etc...
Definition: kabstractwidgetjobtracker.cpp:94
KAbstractWidgetJobTracker::suspend
void suspend(KJob *job)
Emitted when the user suspended the operation.
KAbstractWidgetJobTracker::stopped
void stopped(KJob *job)
Emitted when the user aborted the operation.
KAbstractWidgetJobTracker::slotStop
virtual void slotStop(KJob *job)
This method should be called for correct cancellation of IO operation Connect this to the progress wi...
Definition: kabstractwidgetjobtracker.cpp:78
KJobTrackerInterface::unregisterJob
virtual void unregisterJob(KJob *job)
KJobTrackerInterface::registerJob
virtual void registerJob(KJob *job)
KAbstractWidgetJobTracker::stopOnClose
bool stopOnClose(KJob *job) const
Checks whether the job will be killed when the dialog is closed.
Definition: kabstractwidgetjobtracker.cpp:58
KAbstractWidgetJobTracker::unregisterJob
virtual void unregisterJob(KJob *job)
Unregister a job from this tracker.
Definition: kabstractwidgetjobtracker.cpp:48
KJob
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:13 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal