libyui-qt
Loading...
Searching...
No Matches
YQDownloadProgress.h
1/*
2 Copyright (C) 2000-2012 Novell, Inc
3 This library is free software; you can redistribute it and/or modify
4 it under the terms of the GNU Lesser General Public License as
5 published by the Free Software Foundation; either version 2.1 of the
6 License, or (at your option) version 3.0 of the License. This library
7 is distributed in the hope that it will be useful, but WITHOUT ANY
8 WARRANTY; without even the implied warranty of MERCHANTABILITY or
9 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
10 License for more details. You should have received a copy of the GNU
11 Lesser General Public License along with this library; if not, write
12 to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
13 Floor, Boston, MA 02110-1301 USA
14*/
15
16
17/*-/
18
19 File: YQDownloadProgress.h
20
21 Author: Stefan Hundhammer <shundhammer@suse.de>
22
23/-*/
24
25
26#ifndef YQDownloadProgress_h
27#define YQDownloadProgress_h
28
29#include <QFrame>
30#include <yui/YDownloadProgress.h>
31
32class YQWidgetCaption;
33class QProgressBar;
34
35
36class YQDownloadProgress : public QFrame, public YDownloadProgress
37{
38 Q_OBJECT
39
40public:
41
45 YQDownloadProgress( YWidget * parent,
46 const std::string & label,
47 const std::string & filename,
48 YFileSize_t expectedSize );
49
53 virtual ~YQDownloadProgress();
54
60 virtual void setLabel( const std::string & label );
61
67 virtual void setFilename( const std::string & filename );
68
74 virtual void setExpectedSize( YFileSize_t expectedSize );
75
81 virtual void setEnabled( bool enabled );
82
88 virtual int preferredWidth();
89
95 virtual int preferredHeight();
96
102 virtual void setSize( int newWidth, int newHeight );
103
104
105public slots:
109 void pollFileSize( void );
110
111
112protected:
113
114 YQWidgetCaption * _caption;
115 QProgressBar * _qt_progressBar;
116 QTimer * _timer;
117};
118
119
120#endif // YQDownloadProgress_h
Definition YQDownloadProgress.h:37
virtual int preferredHeight()
Definition YQDownloadProgress.cc:130
virtual int preferredWidth()
Definition YQDownloadProgress.cc:123
virtual void setEnabled(bool enabled)
Definition YQDownloadProgress.cc:114
virtual void setFilename(const std::string &filename)
Definition YQDownloadProgress.cc:91
virtual void setExpectedSize(YFileSize_t expectedSize)
Definition YQDownloadProgress.cc:99
virtual ~YQDownloadProgress()
Definition YQDownloadProgress.cc:76
virtual void setLabel(const std::string &label)
Definition YQDownloadProgress.cc:83
virtual void setSize(int newWidth, int newHeight)
Definition YQDownloadProgress.cc:137
void pollFileSize(void)
Definition YQDownloadProgress.cc:107
Definition YQWidgetCaption.h:39