1 /*---------------------------------------------------------------------\
3 | __ __ ____ _____ ____ |
4 | \ \ / /_ _/ ___|_ _|___ \ |
5 | \ V / _` \___ \ | | __) | |
6 | | | (_| |___) || | / __/ |
7 | |_|\__,_|____/ |_| |_____| |
11 \----------------------------------------------------------------------/
13 File: YQDownloadProgress.h
15 Author: Stefan Hundhammer <sh@suse.de>
20 #ifndef YQDownloadProgress_h
21 #define YQDownloadProgress_h
24 #include "YDownloadProgress.h"
26 class YQWidgetCaption;
30 class YQDownloadProgress : public QFrame, public YDownloadProgress
39 YQDownloadProgress( YWidget * parent,
41 const string & filename,
42 YFileSize_t expectedSize );
47 virtual ~YQDownloadProgress();
50 * Set the label (the text above the progress bar).
52 * Reimplemented from YDownloadProgress.
54 virtual void setLabel( const string & label );
57 * Set the name of a new file to monitor.
59 * Reimplemented from YDownloadProgress.
61 virtual void setFilename( const string & filename );
64 * Change the expected file size.
66 * Reimplemented from YDownloadProgress.
68 virtual void setExpectedSize( YFileSize_t expectedSize );
71 * Set enabled/disabled state.
73 * Reimplemented from YWidget.
75 virtual void setEnabled( bool enabled );
78 * Preferred width of the widget.
80 * Reimplemented from YWidget.
82 virtual int preferredWidth();
85 * Preferred height of the widget.
87 * Reimplemented from YWidget.
89 virtual int preferredHeight();
92 * Set the new size of the widget.
94 * Reimplemented from YWidget.
96 virtual void setSize( int newWidth, int newHeight );
101 * Slot for polling and displaying the file size.
103 void pollFileSize( void );
108 YQWidgetCaption * _caption;
109 QProgressBar * _qt_progressBar;
114 #endif // YQDownloadProgress_h