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

tdeio/tdeio

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 <tdeio/global.h>
00024 
00025 #include <kprogress.h>
00026 
00027 #include "progressbase.h"
00028 
00029 class KLineEdit;
00030 
00031 namespace TDEIO {
00032 
00033 /*
00034  * A default implementation of the progress dialog ProgressBase.
00035  * ProgressBase
00036  */
00037 class TDEIO_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                                     TDEIO::filesize_t totalSize,
00062                                     unsigned long totalFiles );
00063 
00064 public slots:
00065   virtual void slotTotalSize( TDEIO::Job *job, TDEIO::filesize_t size );
00066   virtual void slotTotalFiles( TDEIO::Job *job, unsigned long files );
00067   virtual void slotTotalDirs( TDEIO::Job *job, unsigned long dirs );
00068 
00069   virtual void slotProcessedSize( TDEIO::Job *job, TDEIO::filesize_t bytes );
00070   virtual void slotProcessedFiles( TDEIO::Job *job, unsigned long files );
00071   virtual void slotProcessedDirs( TDEIO::Job *job, unsigned long dirs );
00072 
00073   virtual void slotSpeed( TDEIO::Job *job, unsigned long speed );
00074   virtual void slotPercent( TDEIO::Job *job, unsigned long percent );
00080   virtual void slotInfoMessage( TDEIO::Job *job, const TQString & msg );
00081 
00082   virtual void slotCopying( TDEIO::Job* job, const KURL& src, const KURL& dest );
00083   virtual void slotMoving( TDEIO::Job* job, const KURL& src, const KURL& dest );
00084   virtual void slotDeleting( TDEIO::Job* job, const KURL& url );
00091   void slotTransferring( TDEIO::Job* job, const KURL& url );
00092   virtual void slotCreatingDir( TDEIO::Job* job, const KURL& dir );
00099   virtual void slotStating( TDEIO::Job* job, const KURL& dir );
00106   virtual void slotMounting( TDEIO::Job* job, const TQString & dev, const TQString & point );
00112   virtual void slotUnmounting( TDEIO::Job* job, const TQString & point );
00113   virtual void slotCanResume( TDEIO::Job* job, TDEIO::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   TDEIO::filesize_t m_iTotalSize;
00140   unsigned long m_iTotalFiles;
00141   unsigned long m_iTotalDirs;
00142 
00143   TDEIO::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 

tdeio/tdeio

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

tdeio/tdeio

Skip menu "tdeio/tdeio"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeio/tdeio by doxygen 1.7.6.1
This website is maintained by Timothy Pearson.