# kio Library API Documentation

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

# defaultprogress.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 __defaultprogress_h__
    00019 #define __defaultprogress_h__
    00020
    00021 #include <qlabel.h>
    00022
    00023 #include <kio/global.h>
    00024
    00025 #include <kprogress.h>
    00026
    00027 #include "progressbase.h"
    00028
    00029 class KLineEdit;
    00030
    00031 namespace KIO {
    00032
    00033 /*
    00034  * A default implementation of the progress dialog ProgressBase.
    00035  * ProgressBase
    00036  */
    00037 class KIO_EXPORT DefaultProgress : public ProgressBase {
    00038
    00039   Q_OBJECT
    00040
    00041 public:
    00047   DefaultProgress( bool showNow = true );
    00054   DefaultProgress( QWidget* parent, const char* name = 0 );
    00055   ~DefaultProgress();
    00056
    00057   bool keepOpen() const;
    00058
    00060   static QString makePercentString( unsigned long percent,
    00061                                     KIO::filesize_t totalSize,
    00062                                     unsigned long totalFiles );
    00063
    00064 public slots:
    00065   virtual void slotTotalSize( KIO::Job*, KIO::filesize_t bytes );
    00066   virtual void slotTotalFiles( KIO::Job*, unsigned long files );
    00067   virtual void slotTotalDirs( KIO::Job*, unsigned long dirs );
    00068
    00069   virtual void slotProcessedSize( KIO::Job*, KIO::filesize_t bytes );
    00070   virtual void slotProcessedFiles( KIO::Job*, unsigned long files );
    00071   virtual void slotProcessedDirs( KIO::Job*, unsigned long dirs );
    00072
    00073   virtual void slotSpeed( KIO::Job*, unsigned long bytes_per_second );
    00074   virtual void slotPercent( KIO::Job*, unsigned long percent );
    00080   virtual void slotInfoMessage( KIO::Job *job, const QString & msg );
    00081
    00082   virtual void slotCopying( KIO::Job*, const KURL& src, const KURL& dest );
    00083   virtual void slotMoving( KIO::Job*, const KURL& src, const KURL& dest );
    00084   virtual void slotDeleting( KIO::Job*, const KURL& url );
    00091   void slotTransferring( KIO::Job*, const KURL& url );
    00092   virtual void slotCreatingDir( KIO::Job*, const KURL& dir );
    00099   virtual void slotStating( KIO::Job*, const KURL& dir );
    00106   virtual void slotMounting( KIO::Job*, const QString & dev, const QString & point );
    00112   virtual void slotUnmounting( KIO::Job*, const QString & point );
    00113   virtual void slotCanResume( KIO::Job*, KIO::filesize_t );
    00114
    00119   void slotClean();
    00120
    00121 protected:
    00123   void init();
    00124   void showTotals();
    00125   void setDestVisible( bool visible );
    00127   void checkDestination( const KURL& dest);
    00128
    00129   KLineEdit* sourceEdit;
    00130   KLineEdit* destEdit;
    00131   QLabel* progressLabel;
    00132   QLabel* destInvite;
    00133   QLabel* speedLabel;
    00134   QLabel* sizeLabel;
    00135   QLabel* resumeLabel;
    00136
    00137   KProgress* m_pProgressBar;
    00138
    00139   KIO::filesize_t m_iTotalSize;
    00140   unsigned long m_iTotalFiles;
    00141   unsigned long m_iTotalDirs;
    00142
    00143   KIO::filesize_t m_iProcessedSize;
    00144   unsigned long m_iProcessedDirs;
    00145   unsigned long m_iProcessedFiles;
    00146
    00147   enum ModeType { Copy, Move, Delete, Create, Done };
    00148   ModeType mode;
    00149
    00150 protected:
    00151   virtual void virtual_hook( int id, void* data );
    00152 private:
    00153   class DefaultProgressPrivate;
    00154   DefaultProgressPrivate* d;
    00155 private slots:
    00156   void slotKeepOpenToggled(bool);
    00157   void slotOpenFile();
    00158   void slotOpenLocation();
    00159 };
    00160
    00161 } /* namespace */
    00162
    00163 #endif // __defaultprogress_h__
    00164

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:23:52 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003