kbuttonbox.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __KBUTTONBOX__H__
00021 #define __KBUTTONBOX__H__
00022
00023 #include <qwidget.h>
00024 class QPushButton;
00025
00026 class KButtonBoxPrivate;
00039 class KButtonBox : public QWidget
00040 {
00041 Q_OBJECT
00042
00043 public:
00051 KButtonBox(QWidget *parent, Orientation _orientation = Horizontal,
00052 int border = 0, int _autoborder = 6);
00053
00057 ~KButtonBox();
00058
00065 virtual QSize sizeHint() const;
00069 virtual QSizePolicy sizePolicy() const;
00073 virtual void resizeEvent(QResizeEvent *);
00074
00085 QPushButton *addButton(const QString& text, bool noexpand = FALSE);
00086
00099 QPushButton *addButton(const QString& text, QObject * receiver, const char * slot, bool noexpand = FALSE);
00100
00112 void addStretch(int scale = 1);
00113
00120 void layout();
00121
00122 public:
00123 class Item;
00124 protected:
00129 QSize bestButtonSize() const;
00130 void placeButtons();
00131 QSize buttonSizeHint(QPushButton *) const;
00132
00133 protected:
00134 virtual void virtual_hook( int id, void* data );
00135 private:
00136 KButtonBoxPrivate *data;
00137 };
00138
00139 #endif
This file is part of the documentation for kdelibs Version 3.1.4.