KJobWidgets 5.109.0
Public Types | Public Slots | Public Member Functions | List of all members
KStatusBarJobTracker

This class implements a job tracker with a widget suited for embedding in a status bar. More...

#include <KStatusBarJobTracker>

Public Types

enum  StatusBarMode { NoInformation = 0x0000 , LabelOnly = 0x0001 , ProgressOnly = 0x0002 }
 
typedef QFlags< StatusBarModeStatusBarModes
 Stores a combination of #StatusBarMode values.
 

Public Slots

virtual void description (KJob *job, const QString &title, const QPair< QString, QString > &field1, const QPair< QString, QString > &field2) override
 The following slots are inherited from KJobTrackerInterface.
 
void percent (KJob *job, unsigned long percent) override
 
void slotClean (KJob *job) override
 
void speed (KJob *job, unsigned long value) override
 
void totalAmount (KJob *job, KJob::Unit unit, qulonglong amount) override
 
- Public Slots inherited from KAbstractWidgetJobTracker
void registerJob (KJob *job) override
 Register a new job in this tracker.
 
void unregisterJob (KJob *job) override
 Unregister a job from this tracker.
 

Public Member Functions

 KStatusBarJobTracker (QWidget *parent=nullptr, bool button=true)
 Creates a new KStatusBarJobTracker.
 
 ~KStatusBarJobTracker () override
 Destroys a KStatusBarJobTracker.
 
void registerJob (KJob *job) override
 Register a new job in this tracker.
 
void setStatusBarMode (StatusBarModes statusBarMode)
 Sets the mode of the status bar.
 
void unregisterJob (KJob *job) override
 Unregister a job from this tracker.
 
QWidget * widget (KJob *job) override
 The widget associated to this tracker.
 
- Public Member Functions inherited from KAbstractWidgetJobTracker
 KAbstractWidgetJobTracker (QWidget *parent=nullptr)
 Creates a new KAbstractWidgetJobTracker.
 
 ~KAbstractWidgetJobTracker () override
 Destroys a KAbstractWidgetJobTracker.
 
bool autoDelete (KJob *job) const
 Checks whether the dialog should be deleted or cleaned.
 
void setAutoDelete (KJob *job, bool autoDelete)
 This controls whether the dialog should be deleted or only cleaned when the KJob is finished (or canceled).
 
void setStopOnClose (KJob *job, bool stopOnClose)
 This controls whether the job should be canceled if the dialog is closed.
 
bool stopOnClose (KJob *job) const
 Checks whether the job will be killed when the dialog is closed.
 
virtual QWidget * widget (KJob *job)=0
 The widget associated to this tracker.
 

Additional Inherited Members

- Signals inherited from KAbstractWidgetJobTracker
void resume (KJob *job)
 Emitted when the user resumed the operation.
 
void stopped (KJob *job)
 Emitted when the user aborted the operation.
 
void suspend (KJob *job)
 Emitted when the user suspended the operation.
 
- Protected Slots inherited from KAbstractWidgetJobTracker
void finished (KJob *job) override
 Called when a job is finished, in any case.
 
virtual void slotClean (KJob *job)
 This method is called when the widget should be cleaned (after job is finished).
 
virtual void slotResume (KJob *job)
 This method should be called for pause/resume Connect this to the progress widgets buttons etc.
 
virtual void slotStop (KJob *job)
 This method should be called for correct cancellation of IO operation Connect this to the progress widgets buttons etc.
 
virtual void slotSuspend (KJob *job)
 This method should be called for pause/resume Connect this to the progress widgets buttons etc.
 
- Protected Member Functions inherited from KAbstractWidgetJobTracker
 __attribute__ ((visibility("hidden"))) explicit KAbstractWidgetJobTracker(KAbstractWidgetJobTrackerPrivate &dd
 
- Protected Attributes inherited from KAbstractWidgetJobTracker
std::unique_ptr< KAbstractWidgetJobTrackerPrivate > const d
 
QWidget * parent = nullptr)
 

Detailed Description

This class implements a job tracker with a widget suited for embedding in a status bar.

Member Typedef Documentation

◆ StatusBarModes

Stores a combination of #StatusBarMode values.

Member Enumeration Documentation

◆ StatusBarMode

See also
StatusBarModes
Enumerator
NoInformation 

Does not show any information.

LabelOnly 

Shows an informative label for job progress.

ProgressOnly 

Shows a progress bar with the job completion.

Constructor & Destructor Documentation

◆ KStatusBarJobTracker()

KStatusBarJobTracker::KStatusBarJobTracker ( QWidget *  parent = nullptr,
bool  button = true 
)
explicit

Creates a new KStatusBarJobTracker.

Parameters
parentthe parent of this object and of the widget displaying the job progresses
buttontrue to display a stop button allowing to kill the job, false otherwise

◆ ~KStatusBarJobTracker()

KStatusBarJobTracker::~KStatusBarJobTracker ( )
override

Destroys a KStatusBarJobTracker.

Member Function Documentation

◆ description

virtual void KStatusBarJobTracker::description ( KJob *  job,
const QString &  title,
const QPair< QString, QString > &  field1,
const QPair< QString, QString > &  field2 
)
overridevirtualslot

The following slots are inherited from KJobTrackerInterface.

◆ registerJob()

void KStatusBarJobTracker::registerJob ( KJob *  job)
override

Register a new job in this tracker.

Parameters
jobthe job to register

◆ setStatusBarMode()

void KStatusBarJobTracker::setStatusBarMode ( StatusBarModes  statusBarMode)

Sets the mode of the status bar.

Parameters
statusBarModewhat information the status bar will show (see StatusBarMode). LabelOnly by default

◆ unregisterJob()

void KStatusBarJobTracker::unregisterJob ( KJob *  job)
override

Unregister a job from this tracker.

Parameters
jobthe job to unregister

◆ widget()

QWidget * KStatusBarJobTracker::widget ( KJob *  job)
overridevirtual

The widget associated to this tracker.

Returns
the widget displaying the job progresses

Implements KAbstractWidgetJobTracker.