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 | \ \ / /_ _/ ___|_ _|___ \ | 00026 | \ V / _` \___ \ | | __) | | 00027 | | | (_| |___) || | / __/ | 00028 | |_|\__,_|____/ |_| |_____| | 00029 | | 00030 | core system | 00031 | (C) SuSE GmbH | 00032 \----------------------------------------------------------------------/ 00033 00034 File: YMultiProgressMeter.h 00035 00036 Author: Stefan Hundhammer <sh@suse.de> 00037 00038 /-*/ 00039 00040 #ifndef YMultiProgressMeter_h 00041 #define YMultiProgressMeter_h 00042 00043 #include "YWidget.h" 00044 #include <vector> 00045 using std::vector; 00046 00047 class YMultiProgressMeterPrivate; 00048 00049 00080 class YMultiProgressMeter : public YWidget 00081 { 00082 protected: 00086 YMultiProgressMeter( YWidget * parent, 00087 YUIDimension dim, 00088 const vector<float> & maxValues ); 00089 00090 public: 00094 virtual ~YMultiProgressMeter(); 00095 00100 virtual const char * widgetClass() const { return "YMultiProgressMeter"; } 00101 00105 YUIDimension dimension() const; 00106 00110 bool horizontal() const; 00111 00115 bool vertical() const; 00116 00120 int segments() const; 00121 00125 float maxValue( int segment ) const; 00126 00131 float currentValue( int segment ) const; 00132 00139 void setCurrentValue( int segment, float value ); 00140 00144 void setCurrentValues( const vector<float> & values ); 00145 00156 virtual bool setProperty( const string & propertyName, 00157 const YPropertyValue & val ); 00158 00165 virtual YPropertyValue getProperty( const string & propertyName ); 00166 00173 virtual const YPropertySet & propertySet(); 00174 00179 virtual void doUpdate() = 0; 00180 00181 00182 private: 00183 00184 ImplPtr<YMultiProgressMeterPrivate> priv; 00185 00186 }; 00187 00188 00189 #endif // YMultiProgressMeter_h