libyui
 
Loading...
Searching...
No Matches
YDownloadProgress.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: YDownloadProgress.h
20
21 Author: Stefan Hundhammer <shundhammer@suse.de>
22
23/-*/
24
25#ifndef YDownloadProgress_h
26#define YDownloadProgress_h
27
28#include "YWidget.h"
29
30
32
38{
39protected:
50 const std::string & label,
51 const std::string & filename,
52 YFileSize_t expectedSize );
53public:
57 virtual ~YDownloadProgress();
58
63 virtual const char * widgetClass() const { return "YDownloadProgress"; }
64
68 std::string label() const;
69
76 virtual void setLabel( const std::string & label );
77
81 std::string filename() const;
82
89 virtual void setFilename( const std::string & filename );
90
94 YFileSize_t expectedSize() const;
95
102 virtual void setExpectedSize( YFileSize_t newSize );
103
111 virtual YFileSize_t currentFileSize() const;
112
116 int currentPercent() const;
117
121 int value() const { return currentPercent(); }
122
133 virtual bool setProperty( const std::string & propertyName,
134 const YPropertyValue & val );
135
142 virtual YPropertyValue getProperty( const std::string & propertyName );
143
150 virtual const YPropertySet & propertySet();
151
152
153private:
154
156};
157
158
159#endif // YDownloadProgress_h
Definition ImplPtr.h:43
YDownloadProgress(YWidget *parent, const std::string &label, const std::string &filename, YFileSize_t expectedSize)
Definition YDownloadProgress.cc:53
virtual YFileSize_t currentFileSize() const
Definition YDownloadProgress.cc:131
std::string filename() const
Definition YDownloadProgress.cc:88
virtual const char * widgetClass() const
Definition YDownloadProgress.h:63
virtual void setLabel(const std::string &label)
Definition YDownloadProgress.cc:81
YFileSize_t expectedSize() const
Definition YDownloadProgress.cc:102
virtual bool setProperty(const std::string &propertyName, const YPropertyValue &val)
Definition YDownloadProgress.cc:169
int currentPercent() const
Definition YDownloadProgress.cc:116
int value() const
Definition YDownloadProgress.h:121
virtual const YPropertySet & propertySet()
Definition YDownloadProgress.cc:143
std::string label() const
Definition YDownloadProgress.cc:74
virtual void setFilename(const std::string &filename)
Definition YDownloadProgress.cc:95
virtual ~YDownloadProgress()
Definition YDownloadProgress.cc:67
virtual void setExpectedSize(YFileSize_t newSize)
Definition YDownloadProgress.cc:109
virtual YPropertyValue getProperty(const std::string &propertyName)
Definition YDownloadProgress.cc:186
Definition YProperty.h:198
Definition YProperty.h:105
YWidget(YWidget *parent)
Definition YWidget.cc:106
YWidget * parent() const
Definition YWidget.cc:277
Definition YDownloadProgress.cc:38