class KButtonBox


Definition#include <kbuttonbox.h>
InheritsQWidget (qt)
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Types

Public Methods

Protected Methods

Protected Members

 KButtonBox (QWidget *parent, int _orientation = HORIZONTAL, int border = 0, int _autoborder = 6)

Creates an empty container for buttons. If _orientation is KButtonBox::VERTICAL, the buttons inserted with @see addButton are layouted from top to bottom, otherwise they are layouted from left to right.

KButtonBox ()

The destructor is needed, otherwise gcc 2.7.2.1 may report an internal compiler error. It does nothing.

QSize  sizeHint ()

[const virtual]

Returns: the minimum size needed to fit all buttons. This size is calculated by the with/height of all buttons plus border/autoborder

Reimplemented from QWidget

QPushButtonaddButton (const char *text, bool noexpand = FALSE)

adds a new @see QPushButton and @return a pointer to the newly created button. If noexpand is FALSE, the width of the button is adjusted to fit the other buttons (the maximum of all buttons is taken). If noexpand is TRUE, the width of this button will be set to the minimum width needed for the given text).

void  addStretch (int scale = 1)

This adds a stretch to the buttonbox. @see QBoxLayout for details. Can be used to separate buttons (i.e. if you add the buttons "OK", "Cancel", add a stretch and then add the button "Help", "OK" and "Cancel" will be left-aligned (or top-aligned for vertical) while "Help" will be right-aligned (or bottom-aligned for vertical).

void  layout ()

This function must be called ONCE after all buttons have been inserted. It will start layout control.

QSize  bestButtonSize ()

[protected const]

Returns: the best size for a button. Checks all buttons and takes the maximum width/height.


Generated by: tasin@pcw-home on Sun Feb 13 22:02:02 2000, using kdoc 2.0a35.