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

tdeio/tdeio

  • tdeio
  • tdeio
progressbase.h
1 /* This file is part of the KDE libraries
2  Copyright (C) 2000 Matej Koss <koss@miesto.sk>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License version 2 as published by the Free Software Foundation.
7 
8  This library is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  Library General Public License for more details.
12 
13  You should have received a copy of the GNU Library General Public License
14  along with this library; see the file COPYING.LIB. If not, write to
15  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  Boston, MA 02110-1301, USA.
17 */
18 #ifndef __progressbase_h__
19 #define __progressbase_h__
20 
21 
22 #include <tqwidget.h>
23 
24 #include <tdeio/global.h>
25 
26 class KURL;
27 namespace TDEIO {
28  class Job;
29  class CopyJob;
30  class DeleteJob;
31 }
32 
33 namespace TDEIO
34 {
35  enum Progress {
36  DEFAULT = 1,
37  STATUSBAR = 2,
38  LIST = 3
39  };
40 
70 class TDEIO_EXPORT ProgressBase : public TQWidget {
71 
72  TQ_OBJECT
73 
74 public:
75 
80  ProgressBase( TQWidget *parent );
81  ~ProgressBase() {}
82 
87  void setJob( TDEIO::Job *job );
92  void setJob( TDEIO::CopyJob *job );
97  void setJob( TDEIO::DeleteJob *job );
98 
99  // should we stop the job when the dialog is closed ?
100  void setStopOnClose( bool stopOnClose ) { m_bStopOnClose = stopOnClose; }
101  bool stopOnClose() const { return m_bStopOnClose; }
102 
103  // should we delete the dialog or just clean it when the job is finished ?
115  void setOnlyClean( bool onlyClean ) { m_bOnlyClean = onlyClean; }
116 
123  bool onlyClean() const { return m_bOnlyClean; }
124 
129  void finished();
130 
131 public slots:
136  void slotStop();
141  virtual void slotClean();
142 
143  // progress slots
149  virtual void slotTotalSize( TDEIO::Job* job, TDEIO::filesize_t size ) {
150  Q_UNUSED(job);Q_UNUSED(size);}
156  virtual void slotTotalFiles( TDEIO::Job* job, unsigned long files ) {
157  Q_UNUSED(job);Q_UNUSED(files);}
163  virtual void slotTotalDirs( TDEIO::Job* job, unsigned long dirs ) {
164  Q_UNUSED(job);Q_UNUSED(dirs);}
165 
171  virtual void slotProcessedSize( TDEIO::Job* job, TDEIO::filesize_t bytes ) {
172  Q_UNUSED(job);Q_UNUSED(bytes);}
178  virtual void slotProcessedFiles( TDEIO::Job* job, unsigned long files ) {
179  Q_UNUSED(job);Q_UNUSED(files);}
185  virtual void slotProcessedDirs( TDEIO::Job* job, unsigned long dirs ) {
186  Q_UNUSED(job);Q_UNUSED(dirs);}
187 
193  virtual void slotSpeed( TDEIO::Job* job, unsigned long speed ) {
194  Q_UNUSED(job);Q_UNUSED(speed);}
195 
201  virtual void slotPercent( TDEIO::Job* job, unsigned long percent ) {
202  Q_UNUSED(job);Q_UNUSED(percent);}
203 
210  virtual void slotCopying( TDEIO::Job* job, const KURL& src, const KURL& dest ) {
211  Q_UNUSED(job);Q_UNUSED(src);Q_UNUSED(dest);}
218  virtual void slotMoving( TDEIO::Job* job, const KURL& src, const KURL& dest ) {
219  Q_UNUSED(job);Q_UNUSED(src);Q_UNUSED(dest);}
225  virtual void slotDeleting( TDEIO::Job* job, const KURL& url) {
226  Q_UNUSED(job);Q_UNUSED(url);}
232  virtual void slotCreatingDir( TDEIO::Job* job, const KURL& dir ) {
233  Q_UNUSED(job);Q_UNUSED(dir);}
234 
240  virtual void slotCanResume( TDEIO::Job* job, TDEIO::filesize_t from) {
241  Q_UNUSED(job);Q_UNUSED(from);}
242 
243 signals:
247  void stopped();
248 
249 protected slots:
250  void slotFinished( TDEIO::Job* );
251 
252 protected:
253 
254  virtual void closeEvent( TQCloseEvent * );
255 
256  TDEIO::Job* m_pJob;
257 
258 private:
259  bool m_bOnlyClean;
260  bool m_bStopOnClose;
261 
262 
263 protected:
264  virtual void virtual_hook( int id, void* data );
265 private:
266  class ProgressBasePrivate* d;
267 };
268 
269 } /* namespace */
270 
271 #endif // __progressbase_h__
TDEIO::CopyJob
CopyJob is used to move, copy or symlink files and directories.
Definition: jobclasses.h:1507
TDEIO::DeleteJob
A more complex Job to delete files and directories.
Definition: jobclasses.h:1762
TDEIO::Job
The base class for all jobs.
Definition: jobclasses.h:67
TDEIO::ProgressBase
This class does all initialization stuff for progress, like connecting signals to slots.
Definition: progressbase.h:70
TDEIO::ProgressBase::slotCanResume
virtual void slotCanResume(TDEIO::Job *job, TDEIO::filesize_t from)
Called when the job is resuming.
Definition: progressbase.h:240
TDEIO::ProgressBase::slotSpeed
virtual void slotSpeed(TDEIO::Job *job, unsigned long speed)
Called to set the speed.
Definition: progressbase.h:193
TDEIO::ProgressBase::slotProcessedSize
virtual void slotProcessedSize(TDEIO::Job *job, TDEIO::filesize_t bytes)
Called to set the processed size.
Definition: progressbase.h:171
TDEIO::ProgressBase::setOnlyClean
void setOnlyClean(bool onlyClean)
This controls whether the dialog should be deleted or only cleaned when the TDEIO::Job is finished (o...
Definition: progressbase.h:115
TDEIO::ProgressBase::slotCreatingDir
virtual void slotCreatingDir(TDEIO::Job *job, const KURL &dir)
Called when the job is creating a directory.
Definition: progressbase.h:232
TDEIO::ProgressBase::slotPercent
virtual void slotPercent(TDEIO::Job *job, unsigned long percent)
Called to set the percentage.
Definition: progressbase.h:201
TDEIO::ProgressBase::slotProcessedDirs
virtual void slotProcessedDirs(TDEIO::Job *job, unsigned long dirs)
Called to set the number of processed directories.
Definition: progressbase.h:185
TDEIO::ProgressBase::slotTotalFiles
virtual void slotTotalFiles(TDEIO::Job *job, unsigned long files)
Called to set the total number of files.
Definition: progressbase.h:156
TDEIO::ProgressBase::slotCopying
virtual void slotCopying(TDEIO::Job *job, const KURL &src, const KURL &dest)
Called when the job is copying.
Definition: progressbase.h:210
TDEIO::ProgressBase::slotTotalSize
virtual void slotTotalSize(TDEIO::Job *job, TDEIO::filesize_t size)
Called to set the total size.
Definition: progressbase.h:149
TDEIO::ProgressBase::slotTotalDirs
virtual void slotTotalDirs(TDEIO::Job *job, unsigned long dirs)
Called to set the total number of directories.
Definition: progressbase.h:163
TDEIO::ProgressBase::slotProcessedFiles
virtual void slotProcessedFiles(TDEIO::Job *job, unsigned long files)
Called to set the number of processed files.
Definition: progressbase.h:178
TDEIO::ProgressBase::stopped
void stopped()
Called when the operation stopped.
TDEIO::ProgressBase::slotDeleting
virtual void slotDeleting(TDEIO::Job *job, const KURL &url)
Called when the job is deleting.
Definition: progressbase.h:225
TDEIO::ProgressBase::onlyClean
bool onlyClean() const
Checks whether the dialog should be deleted or cleaned.
Definition: progressbase.h:123
TDEIO::ProgressBase::slotMoving
virtual void slotMoving(TDEIO::Job *job, const KURL &src, const KURL &dest)
Called when the job is moving.
Definition: progressbase.h:218
TDEIO
A namespace for TDEIO globals.
Definition: authinfo.h:29
TDEIO::filesize_t
TQ_ULLONG filesize_t
64-bit file size
Definition: global.h:39

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.9.1
This website is maintained by Timothy Pearson.