|
|
KNewPanner is a simple widget for managing two children which are seperated by a draggable divider. The user can resize both children by moving the bar. You can also label the two children and the labels will be adjusted as the divider is moved.
This widget is considerably easier to use than the old one, simply set the minimum and maximum sizes of the two children then call activate(). Note that the widgets to be panned should be children of the panner widget.
This widget fixes a number of design problems in the original KPanner class which show up particularly if you try to use it under a layout manager (such as QBoxLayout).
PLEASE NOTE: This panner is NOT source or binary compatable with the old one.
enum |
Constants used to specify the orientation.
enum |
Constants used to choose between absolute (pixel) sizes and percentages.
|
Construct a KNewPanner widget.
Parameters:
parent | The parent widget |
name | The name of the panner widget. |
orient | The orientation of the panner, one of the constants Vertical or Horizontal. |
units | The units in which you want to specify the seperator position. This must be one of the constants Percent or Absolute. |
pos | The initial seperator position in the selected units. |
~ |
[virtual]
Clean up
void |
Begin managing these two widgets. If you want to set the minimum or maximum sizes of the children then you should do it before calling this method.
void |
Call this method to restore the panner to it's initial state. This allows you to call activate() a second time with different children.
void |
Set the label texts for the two windows, note that they are only shown if you have called showLabels(true).
void |
Call this to show or hide the labels. Note that labels are only supported when the panner is oriented vertically. If it is not then calling this method has no effect.
int |
void |
int |
void |
int |
This gets the current position of the separator in the current units.
void |
This sets the position of the seperator to the specified position. The position is specified in the currently selected units.
int |
This gets the current position of the separator in absolute (pixel) units.
void |
This sets the position of the seperator to the specified position. The position is specified in absolute units (pixels) irrespective of the the currently selected units.
Units |
Get the current units.
void |
Set the current units.
int |
[protected]
This returns the closest valid absolute seperator position to the position specified in the parameter.
void |
[protected]
This method handles changes in the panner size, it will automatically resize the child widgets as appropriate.
bool |
[protected]
Filter the events from the divider