YBarGraph.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                                                                      |
00003 |                      __   __    ____ _____ ____                      |
00004 |                      \ \ / /_ _/ ___|_   _|___ \                     |
00005 |                       \ V / _` \___ \ | |   __) |                    |
00006 |                        | | (_| |___) || |  / __/                     |
00007 |                        |_|\__,_|____/ |_| |_____|                    |
00008 |                                                                      |
00009 |                               core system                            |
00010 |                                                        (C) SuSE GmbH |
00011 \----------------------------------------------------------------------/
00012 
00013   File:       YBarGraph.h
00014 
00015   Author:     Stefan Hundhammer <sh@suse.de>
00016 
00017 /-*/
00018 
00019 // -*- c++ -*-
00020 
00021 #ifndef YBarGraph_h
00022 #define YBarGraph_h
00023 
00024 #include <ycp/YCPList.h>
00025 #include "YWidget.h"
00026 
00030 class YBarGraph : public YWidget
00031 {
00032 public:
00036     YBarGraph( const YWidgetOpt & opt );
00037 
00038 
00043     virtual char *widgetClass() { return "YBarGraph"; }
00044 
00048     int segments();
00049 
00054     int value( int n );
00055 
00061     string label( int n );
00062 
00066     void parseValuesList( const YCPList & newValues );
00067 
00068 
00072     void parseLabelsList( const YCPList & newLabels );
00073 
00078     virtual void doUpdate();
00079 
00080 protected:
00081 
00082 private:
00083 
00088     YCPValue changeWidget( const YCPSymbol & property, const YCPValue & newValue );
00089 
00090     vector<int>         _values;
00091     vector<string>      _labels;
00092 };
00093 
00094 
00095 #endif // YBarGraph_h

Generated on Fri Jun 16 18:07:45 2006 for yast2-core by  doxygen 1.4.6