Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Examples

YIntField.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:       YIntField.h
00014 
00015   Author:     Stefan Hundhammer <sh@suse.de>
00016 
00017 /-*/
00018 
00019 #ifndef YIntField_h
00020 #define YIntField_h
00021 
00022 #include "YWidget.h"
00023 #include <ycp/YCPString.h>
00024 #include <ycp/YCPInteger.h>
00025 
00029 class YIntField : public YWidget
00030 {
00031 public:
00032 
00036     YIntField( const YWidgetOpt &       opt,
00037                const YCPString &        label,
00038                int                      minValue,
00039                int                      maxValue,
00040                int                      initialValue );
00041 
00046     virtual char *widgetClass() { return "YIntField"; }
00047 
00051     YCPValue changeWidget( const YCPSymbol & property,
00052                            const YCPValue &  newValue );
00053 
00057     YCPValue queryWidget( const YCPSymbol & property );
00058 
00065     virtual void setLabel( const YCPString & label );
00066 
00073     virtual void setValue( int newValue );
00074 
00075     virtual int value()         { return _value; }
00076     int         minValue()      { return _minValue; }
00077     int         maxValue()      { return _maxValue; }
00078     YCPString   label()         { return _label; }
00079 
00084     const char *shortcutProperty() { return YUIProperty_Label; }
00085 
00086 
00087 private:
00088 
00094     virtual void saveUserInput( YMacroRecorder *macroRecorder );
00095 
00096     YCPString   _label;
00097     int         _minValue;
00098     int         _maxValue;
00099     int         _value;
00100 };
00101 
00102 
00103 #endif // YIntField_h

Generated on Fri Nov 9 18:15:23 2007 for yast2-core by doxygen 1.3.6