• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kio/kio
 

kio/kio

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., 51 Franklin Street, Fifth Floor,
00016    Boston, MA 02110-1301, USA.
00017 */
00018 #ifndef __defaultprogress_h__
00019 #define __defaultprogress_h__
00020 
00021 #include <tqlabel.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( TQWidget* parent, const char* name = 0 );
00055   ~DefaultProgress();
00056 
00057   bool keepOpen() const;
00058 
00060   static TQString 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 TQString & 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 TQString & dev, const TQString & point );
00112   virtual void slotUnmounting( KIO::Job* job, const TQString & 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   TQLabel* progressLabel;
00132   TQLabel* destInvite;
00133   TQLabel* speedLabel;
00134   TQLabel* sizeLabel;
00135   TQLabel* 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/kio

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

kio/kio

Skip menu "kio/kio"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kio/kio by doxygen 1.7.6.1
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |