KButtonBox Class Reference
Container widget for buttons. More...
#include <kbuttonbox.h>
Inheritance diagram for KButtonBox:

Public Member Functions | |
KButtonBox (QWidget *parent, Orientation _orientation=Horizontal, int border=0, int _autoborder=6) | |
~KButtonBox () | |
virtual QSize | sizeHint () const |
virtual QSizePolicy | sizePolicy () const |
virtual void | resizeEvent (QResizeEvent *) |
QPushButton * | addButton (const QString &text, bool noexpand=false) |
QPushButton * | addButton (const QString &text, QObject *receiver, const char *slot, bool noexpand=false) |
QPushButton * | addButton (const KGuiItem &guiitem, bool noexpand=false) |
QPushButton * | addButton (const KGuiItem &guiitem, QObject *receiver, const char *slot, bool noexpand=false) |
void | addStretch (int scale=1) |
void | layout () |
Protected Member Functions | |
QSize | bestButtonSize () const |
void | placeButtons () |
QSize | buttonSizeHint (QPushButton *) const |
virtual void | virtual_hook (int id, void *data) |
Detailed Description
Container widget for buttons.
This class uses Qt layout control to place the buttons; can handle both vertical and horizontal button placement. The default border is now 0
(making it easier to deal with layouts). The space between buttons is now more Motif compliant.
- Author:
- Mario Weilguni <mweilguni@sime.com>
- Version:
- Id
- kbuttonbox.h 360744 2004-11-05 15:49:23Z coles
Definition at line 42 of file kbuttonbox.h.
Constructor & Destructor Documentation
|
Create an empty container for buttons.
If Definition at line 82 of file kbuttonbox.cpp. |
|
Free private data field.
Definition at line 94 of file kbuttonbox.cpp. |
Member Function Documentation
|
Reimplemented from QWidget. Definition at line 303 of file kbuttonbox.cpp. References QPtrListIterator::atLast(), bestButtonSize(), buttonSizeHint(), QPtrListIterator::current(), QSize::height(), and QSize::width(). Referenced by layout(). |
|
Add a new QPushButton.
Definition at line 98 of file kbuttonbox.cpp. References QWidget::updateGeometry(). Referenced by addButton(). |
|
Add a new QPushButton.
Definition at line 123 of file kbuttonbox.cpp. References addButton(), and QObject::connect(). |
|
Add a new QPushButton.
Definition at line 110 of file kbuttonbox.cpp. References QWidget::updateGeometry(). |
|
Add a new QPushButton.
Definition at line 139 of file kbuttonbox.cpp. References addButton(), and QObject::connect(). |
|
Add a stretch to the buttonbox. Can be used to separate buttons. That is, if you add the buttons OK and Cancel, add a stretch, and then add the button Help, the buttons OK and Cancel will be left-aligned (or top-aligned for vertical) whereas Help will be right-aligned (or bottom-aligned for vertical).
Definition at line 154 of file kbuttonbox.cpp. |
|
This function must be called once after all buttons have been inserted. It will start layout control. Reimplemented from QWidget. Definition at line 163 of file kbuttonbox.cpp. References bestButtonSize(), buttonSizeHint(), QPtrListIterator::current(), QWidget::setMinimumSize(), and sizeHint(). |
|
Definition at line 276 of file kbuttonbox.cpp. References buttonSizeHint(), QPtrListIterator::current(), QSize::height(), QSize::setHeight(), QSize::setWidth(), and QSize::width(). Referenced by layout(), and sizeHint(). |
The documentation for this class was generated from the following files: