# kio Library API Documentation

Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Namespaces | Source Files

# progressbase.h

    00001 /* This file is part of the KDE libraries
    00002    Copyright (C) 2000 Matej Koss <koss@miesto.sk>
    00003
    00004    This library is free software; you can redistribute it and/or
    00005    modify it under the terms of the GNU Library General Public
    00006    License version 2 as published by the Free Software Foundation.
    00007
    00008    This library is distributed in the hope that it will be useful,
    00009    but WITHOUT ANY WARRANTY; without even the implied warranty of
    00010    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00011    Library General Public License for more details.
    00012
    00013    You should have received a copy of the GNU Library General Public License
    00014    along with this library; see the file COPYING.LIB.  If not, write to
    00015    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00016    Boston, MA 02111-1307, USA.
    00017 */
    00018 #ifndef __progressbase_h__
    00019 #define __progressbase_h__
    00020
    00021
    00022 #include <qwidget.h>
    00023
    00024 #include <kio/global.h>
    00025
    00026 class KURL;
    00027 namespace KIO {
    00028   class Job;
    00029   class CopyJob;
    00030   class DeleteJob;
    00031 }
    00032
    00033 namespace KIO
    00034 {
    00035   enum Progress {
    00036     DEFAULT = 1,
    00037     STATUSBAR = 2,
    00038     LIST = 3
    00039   };
    00040
    00070 class KIO_EXPORT ProgressBase : public QWidget {
    00071
    00072   Q_OBJECT
    00073
    00074 public:
    00075
    00080   ProgressBase( QWidget *parent );
    00081   ~ProgressBase() {}
    00082
    00087   void setJob( KIO::Job *job );
    00092   void setJob( KIO::CopyJob *job );
    00097   void setJob( KIO::DeleteJob *job );
    00098
    00099   // should we stop the job when the dialog is closed ?
    00100   void setStopOnClose( bool stopOnClose ) { m_bStopOnClose = stopOnClose; }
    00101   bool stopOnClose() const { return m_bStopOnClose; }
    00102
    00103   // should we delete the dialog or just clean it when the job is finished ?
    00115   void setOnlyClean( bool onlyClean ) { m_bOnlyClean = onlyClean; }
    00116
    00123   bool onlyClean() const { return m_bOnlyClean; }
    00124
    00129   void finished();
    00130
    00131 public slots:
    00136   void slotStop();
    00141   virtual void slotClean();
    00142
    00143   // progress slots
    00149   virtual void slotTotalSize( KIO::Job* job, KIO::filesize_t bytes ) {
    00150     Q_UNUSED(job);Q_UNUSED(bytes);}
    00156   virtual void slotTotalFiles( KIO::Job* job, unsigned long files ) {
    00157     Q_UNUSED(job);Q_UNUSED(files);}
    00163   virtual void slotTotalDirs( KIO::Job* job, unsigned long dirs ) {
    00164     Q_UNUSED(job);Q_UNUSED(dirs);}
    00165
    00171   virtual void slotProcessedSize( KIO::Job* job, KIO::filesize_t bytes ) {
    00172     Q_UNUSED(job);Q_UNUSED(bytes);}
    00178   virtual void slotProcessedFiles( KIO::Job* job, unsigned long files ) {
    00179     Q_UNUSED(job);Q_UNUSED(files);}
    00185   virtual void slotProcessedDirs( KIO::Job* job, unsigned long dirs ) {
    00186     Q_UNUSED(job);Q_UNUSED(dirs);}
    00187
    00193   virtual void slotSpeed( KIO::Job* job, unsigned long speed ) {
    00194     Q_UNUSED(job);Q_UNUSED(speed);}
    00195
    00201   virtual void slotPercent( KIO::Job* job, unsigned long percent ) {
    00202     Q_UNUSED(job);Q_UNUSED(percent);}
    00203
    00210   virtual void slotCopying( KIO::Job* job, const KURL& src, const KURL& dest ) {
    00211     Q_UNUSED(job);Q_UNUSED(src);Q_UNUSED(dest);}
    00218   virtual void slotMoving( KIO::Job* job, const KURL& src, const KURL& dest ) {
    00219     Q_UNUSED(job);Q_UNUSED(src);Q_UNUSED(dest);}
    00225   virtual void slotDeleting( KIO::Job* job, const KURL& url) {
    00226     Q_UNUSED(job);Q_UNUSED(url);}
    00232   virtual void slotCreatingDir( KIO::Job* job, const KURL& dir ) {
    00233     Q_UNUSED(job);Q_UNUSED(dir);}
    00234
    00240   virtual void slotCanResume( KIO::Job* job, KIO::filesize_t from) {
    00241     Q_UNUSED(job);Q_UNUSED(from);}
    00242
    00243 signals:
    00247   void stopped();
    00248
    00249 protected slots:
    00250   void slotFinished( KIO::Job* );
    00251
    00252 protected:
    00253
    00254   virtual void closeEvent( QCloseEvent * );
    00255
    00256   KIO::Job* m_pJob;
    00257
    00258 private:
    00259   bool m_bOnlyClean;
    00260   bool m_bStopOnClose;
    00261
    00262
    00263 protected:
    00264     virtual void virtual_hook( int id, void* data );
    00265 private:
    00266     class ProgressBasePrivate* d;
    00267 };
    00268
    00269 } /* namespace */
    00270
    00271 #endif // __progressbase_h__

This file is part of the documentation for kio Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jun 11 20:24:06 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003