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

YPartitionSplitter.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:       YPartitionSplitter.h
00014 
00015   Author:     Stefan Hundhammer <sh@suse.de>
00016 
00017 /-*/
00018 
00019 #ifndef YPartitionSplitter_h
00020 #define YPartitionSplitter_h
00021 
00022 #include "YWidget.h"
00023 #include <ycp/YCPString.h>
00024 #include <ycp/YCPInteger.h>
00025 
00026 
00027 class YMacroRecorder;
00028 
00032 class YPartitionSplitter : public YWidget
00033 {
00034 public:
00035 
00039     YPartitionSplitter( const YWidgetOpt &      opt,
00040                         int                     usedSize,
00041                         int                     totalFreeSize,
00042                         int                     newPartSize,
00043                         int                     minNewPartSize,
00044                         int                     minFreeSize,
00045                         const YCPString &       usedLabel,
00046                         const YCPString &       freeLabel,
00047                         const YCPString &       newPartLabel,
00048                         const YCPString &       freeFieldLabel,
00049                         const YCPString &       newPartFieldLabel );
00050 
00055     virtual char *widgetClass() { return "YPartitionSplitter"; }
00056 
00060     YCPValue changeWidget( const YCPSymbol & property,
00061                            const YCPValue &  newValue );
00062 
00066     YCPValue queryWidget( const YCPSymbol & property );
00067 
00068 
00075     virtual void setValue( int newValue );
00076 
00077 
00078     // Access methods
00079 
00080     int                 usedSize()              { return _usedSize;             }
00081     int                 totalFreeSize()         { return _totalFreeSize;        }
00082     int                 newPartSize()           { return _newPartSize;          }
00083     int                 minNewPartSize()        { return _minNewPartSize;       }
00084     int                 maxNewPartSize()        { return _totalFreeSize - _minFreeSize;    }
00085     int                 minFreeSize()           { return _minFreeSize;                     }
00086     int                 maxFreeSize()           { return _totalFreeSize - _minNewPartSize; }
00087     int                 remainingFreeSize()     { return _totalFreeSize - _newPartSize;    }
00088     const YCPString     usedLabel()             { return _usedLabel;            }
00089     const YCPString     freeLabel()             { return _freeLabel;            }
00090     const YCPString     newPartLabel()          { return _newPartLabel;         }
00091     const YCPString     freeFieldLabel()        { return _freeFieldLabel;       }
00092     const YCPString     newPartFieldLabel()     { return _newPartFieldLabel;    }
00093 
00094     
00105     const char *shortcutProperty() { return ( const char * ) 0; }
00106     
00107 
00108 private:
00109 
00115     virtual void saveUserInput( YMacroRecorder *macroRecorder );
00116 
00117 
00118     int                         _usedSize;
00119     int                         _totalFreeSize;
00120     int                         _newPartSize;
00121     int                         _minNewPartSize;
00122     int                         _minFreeSize;
00123     const YCPString &   _usedLabel;
00124     const YCPString &   _freeLabel;
00125     const YCPString &   _newPartLabel;
00126     const YCPString &   _freeFieldLabel;
00127     const YCPString &   _newPartFieldLabel;
00128 };
00129 
00130 
00131 #endif // YPartitionSplitter_h

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