libyui
|
00001 /************************************************************************** 00002 Copyright (C) 2000 - 2010 Novell, Inc. 00003 All Rights Reserved. 00004 00005 This program is free software; you can redistribute it and/or modify 00006 it under the terms of the GNU General Public License as published by 00007 the Free Software Foundation; either version 2 of the License, or 00008 (at your option) any later version. 00009 00010 This program is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 GNU General Public License for more details. 00014 00015 You should have received a copy of the GNU General Public License along 00016 with this program; if not, write to the Free Software Foundation, Inc., 00017 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 00018 00019 **************************************************************************/ 00020 00021 /*---------------------------------------------------------------------\ 00022 | | 00023 | __ __ ____ _____ ____ | 00024 | \ \ / /_ _/ ___|_ _|___ \ | 00025 | \ V / _` \___ \ | | __) | | 00026 | | | (_| |___) || | / __/ | 00027 | |_|\__,_|____/ |_| |_____| | 00028 | | 00029 | core system | 00030 | (C) SuSE GmbH | 00031 \----------------------------------------------------------------------/ 00032 00033 File: YDownloadProgress.h 00034 00035 Author: Stefan Hundhammer <sh@suse.de> 00036 00037 /-*/ 00038 00039 #ifndef YDownloadProgress_h 00040 #define YDownloadProgress_h 00041 00042 #include "YWidget.h" 00043 00044 00045 class YDownloadProgressPrivate; 00046 00051 class YDownloadProgress : public YWidget 00052 { 00053 protected: 00063 YDownloadProgress( YWidget * parent, 00064 const string & label, 00065 const string & filename, 00066 YFileSize_t expectedSize ); 00067 public: 00071 virtual ~YDownloadProgress(); 00072 00077 virtual const char * widgetClass() const { return "YDownloadProgress"; } 00078 00082 string label() const; 00083 00090 virtual void setLabel( const string & label ); 00091 00095 string filename() const; 00096 00103 virtual void setFilename( const string & filename ); 00104 00108 YFileSize_t expectedSize() const; 00109 00116 virtual void setExpectedSize( YFileSize_t newSize ); 00117 00125 virtual YFileSize_t currentFileSize() const; 00126 00130 int currentPercent() const; 00131 00135 int value() const { return currentPercent(); } 00136 00147 virtual bool setProperty( const string & propertyName, 00148 const YPropertyValue & val ); 00149 00156 virtual YPropertyValue getProperty( const string & propertyName ); 00157 00164 virtual const YPropertySet & propertySet(); 00165 00166 00167 private: 00168 00169 ImplPtr<YDownloadProgressPrivate> priv; 00170 }; 00171 00172 00173 #endif // YDownloadProgress_h