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

kio

defaultprogress.h

Go to the documentation of this file.
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., 51 Franklin Street, Fifth Floor,
00016    Boston, MA 02110-1301, 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 *job, KIO::filesize_t size );
00066   virtual void slotTotalFiles( KIO::Job *job, unsigned long files );
00067   virtual void slotTotalDirs( KIO::Job *job, unsigned long dirs );
00068 
00069   virtual void slotProcessedSize( KIO::Job *job, KIO::filesize_t bytes );
00070   virtual void slotProcessedFiles( KIO::Job *job, unsigned long files );
00071   virtual void slotProcessedDirs( KIO::Job *job, unsigned long dirs );
00072 
00073   virtual void slotSpeed( KIO::Job *job, unsigned long speed );
00074   virtual void slotPercent( KIO::Job *job, unsigned long percent );
00080   virtual void slotInfoMessage( KIO::Job *job, const QString & msg );
00081 
00082   virtual void slotCopying( KIO::Job* job, const KURL& src, const KURL& dest );
00083   virtual void slotMoving( KIO::Job* job, const KURL& src, const KURL& dest );
00084   virtual void slotDeleting( KIO::Job* job, const KURL& url );
00091   void slotTransferring( KIO::Job* job, const KURL& url );
00092   virtual void slotCreatingDir( KIO::Job* job, const KURL& dir );
00099   virtual void slotStating( KIO::Job* job, const KURL& dir );
00106   virtual void slotMounting( KIO::Job* job, const QString & dev, const QString & point );
00112   virtual void slotUnmounting( KIO::Job* job, const QString & point );
00113   virtual void slotCanResume( KIO::Job* job, KIO::filesize_t from);
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 

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