00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef YQPartitionSplitter_h
00022 #define YQPartitionSplitter_h
00023
00024 #include <qslider.h>
00025 #include <qspinbox.h>
00026 #include <qlabel.h>
00027 #include <qvbox.h>
00028 #include <qhbox.h>
00029 #include <ycp/YCPString.h>
00030
00031 #include "QY2BarGraph.h"
00032 #include "YPartitionSplitter.h"
00033
00034
00035 class YQPartitionSplitter : public QVBox, public YPartitionSplitter
00036 {
00037 Q_OBJECT
00038
00039 public:
00040
00044 YQPartitionSplitter( QWidget * parent,
00045 const YWidgetOpt & opt,
00046 int usedSize,
00047 int freeSize,
00048 int newPartSize,
00049 int minNewPartSize,
00050 int minFreeSize,
00051 const YCPString & usedLabel,
00052 const YCPString & freeLabel,
00053 const YCPString & newPartLabel,
00054 const YCPString & freeFieldLabel,
00055 const YCPString & newPartFieldLabel );
00056
00061 void setEnabling( bool enabled );
00062
00067 long nicesize( YUIDimension dim );
00068
00073 void setSize( long newWidth, long newHeight );
00074
00075
00079 virtual bool setKeyboardFocus();
00080
00086 void setValue( int newValue );
00087
00088 public slots:
00092 void setFreeSizeSlot( int newFreeSize );
00093
00097 void setNewPartSizeSlot( int newNewSize );
00098
00099
00100 protected:
00101
00102
00103
00104
00105
00106
00107
00108 QY2BarGraph * _barGraph;
00109 QHBox * _labels_hbox;
00110 QLabel * _qt_freeFieldLabel;
00111 QLabel * _qt_newPartFieldLabel;
00112 QHBox * _fields_hbox;
00113 QSpinBox * _qt_freeSizeField;
00114 QSlider * _qt_freeSizeSlider;
00115 QSpinBox * _qt_newPartSizeField;
00116
00117 bool _countShowDelta;
00118 };
00119
00120
00121 #endif // YQPartitionSplitter_h