1 /*---------------------------------------------------------------------\
3 | __ __ ____ _____ ____ |
4 | \ \ / /_ _/ ___|_ _|___ \ |
5 | \ V / _` \___ \ | | __) | |
6 | | | (_| |___) || | / __/ |
7 | |_|\__,_|____/ |_| |_____| |
11 \----------------------------------------------------------------------/
13 File: YQPartitionSplitter.h
15 Author: Stefan Hundhammer <sh@suse.de>
20 #ifndef YQPartitionSplitter_h
21 #define YQPartitionSplitter_h
24 #include "YPartitionSplitter.h"
32 class YQPartitionSplitter : public QWidget, public YPartitionSplitter
41 YQPartitionSplitter( YWidget * parent,
47 const string & usedLabel,
48 const string & freeLabel,
49 const string & newPartLabel,
50 const string & freeFieldLabel,
51 const string & newPartFieldLabel );
56 ~YQPartitionSplitter();
59 * Return the value (the size of the new partition).
61 * Implemented from YPartitionSplitter.
66 * Set the value (the size of the new partition).
68 * Implemented from YPartitionSplitter.
70 virtual void setValue( int newValue );
73 * Set enabled/disabled state.
75 * Reimplemented from YWidget.
77 virtual void setEnabled( bool enabled );
80 * Preferred width of the widget.
82 * Reimplemented from YWidget.
84 virtual int preferredWidth();
87 * Preferred height of the widget.
89 * Reimplemented from YWidget.
91 virtual int preferredHeight();
94 * Set the new size of the widget.
96 * Reimplemented from YWidget.
98 virtual void setSize( int newWidth, int newHeight );
101 * Accept the keyboard focus.
103 virtual bool setKeyboardFocus();
108 * Slot for setting the free size.
110 void setFreeSizeSlot( int newFreeSize );
113 * Slot for setting the new size.
115 void setNewPartSizeSlot( int newNewSize );
133 YQBarGraph * _barGraph;
135 YQSlider * _freeSizeSlider;
136 YQIntField * _newPartField;
141 #endif // YQPartitionSplitter_h