class KContainerLayout
|
Alternative Layout manager widget. More... |
|
|
Public Types
- enum {Horizontal = 0, Vertical }
Public Methods
- KContainerLayout (QWidget * parent=0, const char * name=0, int orientation = KContainerLayout::Horizontal, bool homogeneos = FALSE, int spacing = 5, WFlags f=0, bool allowLines=TRUE)
- virtual ~KContainerLayout ()
- int getNumberOfWidgets () const
- int packStart (QWidget *w, bool e=FALSE, bool f=FALSE,int p=1)
- int packEnd (QWidget *w, bool e=FALSE, bool f=FALSE,int p=1)
- void setOrientation (int i)
- void setHomogeneos (bool b)
- void setSpacing (int i)
- void setStartOffset (int i)
- void setEndOffset (int i)
- const int orientation () const
- const bool homogeneos () const
- const int spacing () const
- const int startOffset () const
- const int endOffset () const
- void sizeToFit ()
Protected Types
Protected Methods
Protected Members
Detailed Description
Alternative Layout manager widget.
Here is an example of using this class:
KContainerLayout (QWidget * parent=0, const char * name=0, int orientation = KContainerLayout::Horizontal, bool homogeneos = FALSE, int spacing = 5, WFlags f=0, bool allowLines=TRUE)
|
Constructs a KContainerLayout as child of parent
Parameters:
parent | The parent widget of the KContainerLayout
|
name | The name of the widget
|
orientation | The orientation of the container, either
KContainerLayout::Horizontal or KContainer::Vertical
|
homogeneous | If the container should split available size
by all KContainerLayoutItem in equal parts
|
spacing | The space to add between each widget and between
the first/last and the borders
|
f | Flags (see QFrame#QFrame)
|
allowLines | Flags (see QFrame#QFrame)
|
[virtual]
The destructor
int getNumberOfWidgets ()
|
[const]
Returns the number of widgets inside this container
int packStart (QWidget *w, bool e=FALSE, bool f=FALSE,int p=1)
|
Pack one widget to the start of the container after the previously packed on start widgets
Parameters:
w | The widget to be packed
|
e | If the widget should use the whole size allocated to it
|
f | If the widget should be sized to fill the whole space allocated to it (only makes sense with Expand=TRUE)
|
p | Padding that should be used as the borders in each side of the widget
|
int packEnd (QWidget *w, bool e=FALSE, bool f=FALSE,int p=1)
|
Pack one widget to the end of the container after the previously packed on end widgets
Parameters:
w | The widget to be packed
|
e | If the widget should use the whole size allocated to it
|
f | If the widget should be sized to fill the whole space allocated to it (only makes sense with Expand=TRUE)
|
p | Padding that should be used as the borders in each side of the widget
|
void setOrientation (int i)
|
Sets the orientation of the container, one of KContainerLayout::Horizontal or KContainer::Vertical
void setHomogeneos (bool b)
|
Sets the container to use the same size to each widget he contains (TRUE) or not (FALSE)
When homogeneous is true all widgets will be packed as if they had the Expand set to TRUE @see KContainerLayout#packStart @see KContainer#packEnd
void setStartOffset (int i)
|
Sets the starting offset for this container @see _startOffset
void setEndOffset (int i)
|
Sets the ending offset for this container @see _endOffset
[const]
Returns the current orientation of the container @see
KContainerLayout#setOrientation
[const]
Returns the current homogeneous state of the container @see
KContainerLayout#setHomogeneous
[const]
Returns the current spacing of the container @see
KContainerLayout#setSpacing
[const]
Returns the starting offset for this container @see _startOffset
[const]
Returns the ending offset for this container @see _endOffset
Resizes the container to be as small as necessary to display
all widgets
KContainerLayoutItem (class) |
[protected]
This class represents one widget inside the one KContainerLayout.
- Version: 0.1
- Author: Jorge Monteiro <jomo@casema.net>
- Generated: root@tantive.terraplex.com on Sun Feb 27 17:39:25 2000, using kdoc 2.0a33.