statusbarprogress.h Source File (kio Library)

| # kio Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# statusbarprogress.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., 59 Temple Place - Suite 330,
    00016    Boston, MA 02111-1307, USA.
    00017 */
    00018
    00019 #ifndef __statusbarprogress_h__
    00020 #define __statusbarprogress_h__
    00021
    00022 #include <qlabel.h>
    00023 #include <qpushbutton.h>
    00024
    00025 #include <kprogress.h>
    00026
    00027 #include "progressbase.h"
    00028
    00029 class QWidgetStack;
    00030 class QBoxLayout;
    00031
    00032 namespace KIO {
    00033
    00034 class Job;
    00035
    00062 class StatusbarProgress : public ProgressBase {
    00063
    00064   Q_OBJECT
    00065
    00066 public:
    00067
    00068   StatusbarProgress( QWidget* parent, bool button = true );
    00069   ~StatusbarProgress() {}
    00070
    00071   void setJob( KIO::Job *job );
    00072
    00073 public slots:
    00074   virtual void slotClean();
    00075   virtual void slotTotalSize( KIO::Job*, KIO::filesize_t size );
    00076   virtual void slotPercent( KIO::Job*, unsigned long percent );
    00077   virtual void slotSpeed( KIO::Job*, unsigned long bytes_per_second );
    00078
    00079 protected:
    00080   KProgress* m_pProgressBar;
    00081   QLabel* m_pLabel;
    00082   QPushButton* m_pButton;
    00083
    00084   KIO::filesize_t m_iTotalSize;
    00085
    00086   enum Mode { None, Label, Progress };
    00087
    00088   uint mode;
    00089   bool m_bShowButton;
    00090
    00091   void setMode();
    00092
    00093   virtual bool eventFilter( QObject *, QEvent * );
    00094   QBoxLayout *box;
    00095   QWidgetStack *stack;
    00096 protected:
    00097   virtual void virtual_hook( int id, void* data );
    00098 private:
    00099   class StatusbarProgressPrivate* d;
    00100 };
    00101
    00102 } /* namespace */
    00103
    00104 #endif  //  __statusbarprogress_h__

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:14:40 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001