defaultprogress.h
/* This file is part of the KDE libraries
Copyright (C) 2000 Matej Koss <koss@miesto.sk>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License version 2 as published by the Free Software Foundation.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef __defaultprogress_h__
#define __defaultprogress_h__
#include <qlabel.h>
#include <kio/global.h>
#include <kprogress.h>
#include "progressbase.h"
class KLineEdit;
namespace KIO {
/*
* A default implementation of the progress dialog ProgressBase.
* ProgressBase
*/
class KIO_EXPORT DefaultProgress : public ProgressBase {
Q_OBJECT
public:
DefaultProgress( bool showNow = true );
DefaultProgress( QWidget* parent, const char* name = 0 );
~DefaultProgress();
bool keepOpen() const;
static QString makePercentString( unsigned long percent,
KIO::filesize_t totalSize,
unsigned long totalFiles );
public slots:
virtual void slotTotalSize( KIO::Job *job, KIO::filesize_t size );
virtual void slotTotalFiles( KIO::Job *job, unsigned long files );
virtual void slotTotalDirs( KIO::Job *job, unsigned long dirs );
virtual void slotProcessedSize( KIO::Job *job, KIO::filesize_t bytes );
virtual void slotProcessedFiles( KIO::Job *job, unsigned long files );
virtual void slotProcessedDirs( KIO::Job *job, unsigned long dirs );
virtual void slotSpeed( KIO::Job *job, unsigned long speed );
virtual void slotPercent( KIO::Job *job, unsigned long percent );
virtual void slotInfoMessage( KIO::Job *job, const QString & msg );
virtual void slotCopying( KIO::Job* job, const KURL& src, const KURL& dest );
virtual void slotMoving( KIO::Job* job, const KURL& src, const KURL& dest );
virtual void slotDeleting( KIO::Job* job, const KURL& url );
void slotTransferring( KIO::Job* job, const KURL& url );
virtual void slotCreatingDir( KIO::Job* job, const KURL& dir );
virtual void slotStating( KIO::Job* job, const KURL& dir );
virtual void slotMounting( KIO::Job* job, const QString & dev, const QString & point );
virtual void slotUnmounting( KIO::Job* job, const QString & point );
virtual void slotCanResume( KIO::Job* job, KIO::filesize_t from);
void slotClean();
protected:
void init();
void showTotals();
void setDestVisible( bool visible );
void checkDestination( const KURL& dest);
KLineEdit* sourceEdit;
KLineEdit* destEdit;
QLabel* progressLabel;
QLabel* destInvite;
QLabel* speedLabel;
QLabel* sizeLabel;
QLabel* resumeLabel;
KProgress* m_pProgressBar;
KIO::filesize_t m_iTotalSize;
unsigned long m_iTotalFiles;
unsigned long m_iTotalDirs;
KIO::filesize_t m_iProcessedSize;
unsigned long m_iProcessedDirs;
unsigned long m_iProcessedFiles;
enum ModeType { Copy, Move, Delete, Create, Done };
ModeType mode;
protected:
virtual void virtual_hook( int id, void* data );
private:
class DefaultProgressPrivate;
DefaultProgressPrivate* d;
private slots:
void slotKeepOpenToggled(bool);
void slotOpenFile();
void slotOpenLocation();
};
} /* namespace */
#endif // __defaultprogress_h__
KIO::filesize_t
Q_ULLONG filesize_t
64-bit file size
Definition: global.h:39
KIO::Job
The base class for all jobs.
Definition: jobclasses.h:68

KDE Home | KDE Accessibility Home | Description of Access Keys