25 #ifndef YDownloadProgress_h 26 #define YDownloadProgress_h 50 const std::string &
label,
63 virtual const char *
widgetClass()
const {
return "YDownloadProgress"; }
68 std::string
label()
const;
76 virtual void setLabel(
const std::string & label );
89 virtual void setFilename(
const std::string & filename );
133 virtual bool setProperty(
const std::string & propertyName,
159 #endif // YDownloadProgress_h std::string label() const
Get the label (the text above the progress bar).
DownloadProgress: A progress bar that monitors downloading a file by repeatedly polling its size up t...
virtual YFileSize_t currentFileSize() const
Return the current size of the file that is being downloaded or 0 if this file doesn't exist (yet)...
Transport class for the value of simple properties.
A set of properties to check names and types against.
virtual const char * widgetClass() const
Returns a descriptive name of this widget class for logging, debugging etc.
virtual YPropertyValue getProperty(const std::string &propertyName)
Get a property.
virtual void setExpectedSize(YFileSize_t newSize)
Set the expected file size.
std::string filename() const
Return the name of the file that is being monitored.
virtual void setLabel(const std::string &label)
Set the label (the text above the progress bar).
virtual void setFilename(const std::string &filename)
Set the name of a new file to monitor.
virtual ~YDownloadProgress()
Destructor.
YDownloadProgress(YWidget *parent, const std::string &label, const std::string &filename, YFileSize_t expectedSize)
Constructor.
YFileSize_t expectedSize() const
Return the expected file size.
virtual const YPropertySet & propertySet()
Return this class's property set.
virtual bool setProperty(const std::string &propertyName, const YPropertyValue &val)
Set a property.
int value() const
Alias for currentPercent().
int currentPercent() const
Return the percentage (0..100) of the file being downloaded so far.