• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kio

KIO::StatusbarProgress

KIO::StatusbarProgress Class Reference

This is a special IO progress widget. More...

#include <statusbarprogress.h>

Inheritance diagram for KIO::StatusbarProgress:

Inheritance graph
[legend]

List of all members.


Public Slots

virtual void slotClean ()
virtual void slotPercent (KIO::Job *job, unsigned long percent)
virtual void slotSpeed (KIO::Job *job, unsigned long speed)
virtual void slotTotalSize (KIO::Job *job, KIO::filesize_t size)

Public Member Functions

void setJob (KIO::Job *job)
 StatusbarProgress (QWidget *parent, bool button=true)
 ~StatusbarProgress ()

Protected Types

enum  Mode { None, Label, Progress }

Protected Member Functions

virtual bool eventFilter (QObject *, QEvent *)
void setMode ()
virtual void virtual_hook (int id, void *data)

Protected Attributes

QBoxLayout * box
bool m_bShowButton
KIO::filesize_t m_iTotalSize
QPushButton * m_pButton
QLabel * m_pLabel
KProgress * m_pProgressBar
uint mode
QWidgetStack * stack

Detailed Description

This is a special IO progress widget.

Similarly to DefaultProgress, it's purpose is to show a progress of the IO operation.

Instead of creating a separate window, this is only a widget that can be easily embedded in a statusbar.

Usage of StatusbarProgress is little different. This dialog will be a part of some application.

 // create a dialog
 StatusbarProgress *statusProgress;
 statusProgress = new StatusbarProgress( statusBar() );
 statusBar()->insertWidget( statusProgress, statusProgress->width() , 0 );
 ...
 // create job and connect it to the progress
 CopyJob* job = KIO::copy(...);
 statusProgress->setJob( job );
 ...

IO progress widget for embedding in a statusbar.

Author:
Matej Koss <koss@miesto.sk>

Definition at line 60 of file statusbarprogress.h.


Member Enumeration Documentation

enum KIO::StatusbarProgress::Mode [protected]

Enumerator:
None 
Label 
Progress 

Definition at line 94 of file statusbarprogress.h.


Constructor & Destructor Documentation

KIO::StatusbarProgress::StatusbarProgress ( QWidget *  parent,
bool  button = true 
)

Creates a new StatusbarProgress.

Parameters:
parent the parent of this widget
button true to add an abort button. The button will be connected to ProgressBase::slotStop()

Definition at line 35 of file statusbarprogress.cpp.

KIO::StatusbarProgress::~StatusbarProgress (  )  [inline]

Definition at line 73 of file statusbarprogress.h.


Member Function Documentation

bool KIO::StatusbarProgress::eventFilter ( QObject *  ,
QEvent *  ev 
) [protected, virtual]

Definition at line 139 of file statusbarprogress.cpp.

void KIO::StatusbarProgress::setJob ( KIO::Job *  job  ) 

Sets the job to monitor.

Parameters:
job the job to monitor

Reimplemented from KIO::ProgressBase.

Definition at line 74 of file statusbarprogress.cpp.

void KIO::StatusbarProgress::setMode (  )  [protected]

Definition at line 83 of file statusbarprogress.cpp.

void KIO::StatusbarProgress::slotClean (  )  [virtual, slot]

This method is called when the widget should be cleaned (after job is finished).

redefine this for custom behavior.

Reimplemented from KIO::ProgressBase.

Definition at line 111 of file statusbarprogress.cpp.

void KIO::StatusbarProgress::slotPercent ( KIO::Job *  job,
unsigned long  percent 
) [virtual, slot]

Called to set the percentage.

Parameters:
job the KIO::Job
percent the percentage

Reimplemented from KIO::ProgressBase.

Definition at line 125 of file statusbarprogress.cpp.

void KIO::StatusbarProgress::slotSpeed ( KIO::Job *  job,
unsigned long  speed 
) [virtual, slot]

Called to set the speed.

Parameters:
job the KIO::Job
speed the speed in bytes/second

Reimplemented from KIO::ProgressBase.

Definition at line 130 of file statusbarprogress.cpp.

void KIO::StatusbarProgress::slotTotalSize ( KIO::Job *  job,
KIO::filesize_t  size 
) [virtual, slot]

Called to set the total size.

Parameters:
job the KIO::Job
size the total size in bytes

Reimplemented from KIO::ProgressBase.

Definition at line 121 of file statusbarprogress.cpp.

void KIO::StatusbarProgress::virtual_hook ( int  id,
void *  data 
) [protected, virtual]

Reimplemented from KIO::ProgressBase.

Definition at line 162 of file statusbarprogress.cpp.


Member Data Documentation

QBoxLayout* KIO::StatusbarProgress::box [protected]

Definition at line 102 of file statusbarprogress.h.

bool KIO::StatusbarProgress::m_bShowButton [protected]

Definition at line 97 of file statusbarprogress.h.

KIO::filesize_t KIO::StatusbarProgress::m_iTotalSize [protected]

Definition at line 92 of file statusbarprogress.h.

QPushButton* KIO::StatusbarProgress::m_pButton [protected]

Definition at line 90 of file statusbarprogress.h.

QLabel* KIO::StatusbarProgress::m_pLabel [protected]

Definition at line 89 of file statusbarprogress.h.

KProgress* KIO::StatusbarProgress::m_pProgressBar [protected]

Definition at line 88 of file statusbarprogress.h.

uint KIO::StatusbarProgress::mode [protected]

Definition at line 96 of file statusbarprogress.h.

QWidgetStack* KIO::StatusbarProgress::stack [protected]

Definition at line 103 of file statusbarprogress.h.


The documentation for this class was generated from the following files:
  • statusbarprogress.h
  • statusbarprogress.cpp

kio

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

API Reference

Skip menu "API Reference"
  • dcop
  • DNSSD
  • interfaces
  • Kate
  • kconf_update
  • KDECore
  • KDED
  • kdefx
  • KDEsu
  • kdeui
  • KDocTools
  • KHTML
  • KImgIO
  • KInit
  • kio
  • kioslave
  • KJS
  • KNewStuff
  • KParts
  • KUtils
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal