summaryrefslogtreecommitdiffabout
path: root/microkde/kdeui/kbuttonbox.h
Unidiff
Diffstat (limited to 'microkde/kdeui/kbuttonbox.h') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kdeui/kbuttonbox.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/microkde/kdeui/kbuttonbox.h b/microkde/kdeui/kbuttonbox.h
index 1104366..2e0f41d 100644
--- a/microkde/kdeui/kbuttonbox.h
+++ b/microkde/kdeui/kbuttonbox.h
@@ -1,99 +1,101 @@
1/* This file is part of the KDE libraries 1/* This file is part of the KDE libraries
2 Copyright (C) 1997 Mario Weilguni (mweilguni@sime.com) 2 Copyright (C) 1997 Mario Weilguni (mweilguni@sime.com)
3 3
4 This library is free software; you can redistribute it and/or 4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public 5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either 6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version. 7 version 2 of the License, or (at your option) any later version.
8 8
9 This library is distributed in the hope that it will be useful, 9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details. 12 Library General Public License for more details.
13 13
14 You should have received a copy of the GNU Library General Public License 14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to 15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 16 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 Boston, MA 02111-1307, USA. 17 Boston, MA 02111-1307, USA.
18*/ 18*/
19 19
20#ifndef __KBUTTONBOX__H__ 20#ifndef __KBUTTONBOX__H__
21#define __KBUTTONBOX__H__ 21#define __KBUTTONBOX__H__
22 22
23#include <qwidget.h> 23#include <qwidget.h>
24//Added by qt3to4:
25#include <QResizeEvent>
24class QPushButton; 26class QPushButton;
25 27
26class KButtonBoxPrivate; 28class KButtonBoxPrivate;
27/** 29/**
28 * Container widget for buttons. 30 * Container widget for buttons.
29 * 31 *
30 * This class uses Qt layout control to place the buttons; can handle 32 * This class uses Qt layout control to place the buttons; can handle
31 * both vertical and horizontal button placement. The default border 33 * both vertical and horizontal button placement. The default border
32 * is now @p 0 (making it easier to deal with layouts). The space 34 * is now @p 0 (making it easier to deal with layouts). The space
33 * between buttons is now more Motif compliant. 35 * between buttons is now more Motif compliant.
34 * 36 *
35 * @author Mario Weilguni <mweilguni@sime.com> 37 * @author Mario Weilguni <mweilguni@sime.com>
36 * @version $Id$ 38 * @version $Id$
37 **/ 39 **/
38 40
39class KButtonBox : public QWidget 41class KButtonBox : public QWidget
40{ 42{
41 Q_OBJECT 43 Q_OBJECT
42 44
43public: 45public:
44 /** 46 /**
45 * Create an empty container for buttons. 47 * Create an empty container for buttons.
46 * 48 *
47 * If @p _orientation is @p Vertical, the buttons inserted with 49 * If @p _orientation is @p Vertical, the buttons inserted with
48 * @ref addButton() are laid out from top to bottom, otherwise they 50 * @ref addButton() are laid out from top to bottom, otherwise they
49 * are laid out from left to right. 51 * are laid out from left to right.
50 */ 52 */
51 KButtonBox(QWidget *parent, Orientation _orientation = Horizontal, 53 KButtonBox(QWidget *parent, Qt::Orientation _orientation = Qt::Horizontal,
52 int border = 0, int _autoborder = 6); 54 int border = 0, int _autoborder = 6);
53 55
54 /** 56 /**
55 * Free private data field 57 * Free private data field
56 */ 58 */
57 ~KButtonBox(); 59 ~KButtonBox();
58 60
59 /** 61 /**
60 * @return The minimum size needed to fit all buttons. 62 * @return The minimum size needed to fit all buttons.
61 * 63 *
62 * This size is 64 * This size is
63 * calculated by the width/height of all buttons plus border/autoborder. 65 * calculated by the width/height of all buttons plus border/autoborder.
64 */ 66 */
65 virtual QSize sizeHint() const; 67 virtual QSize sizeHint() const;
66 /** 68 /**
67 * @reimplemented 69 * @reimplemented
68 */ 70 */
69 virtual QSizePolicy sizePolicy() const; 71 virtual QSizePolicy sizePolicy() const;
70 /** 72 /**
71 * @reimplemented 73 * @reimplemented
72 */ 74 */
73 virtual void resizeEvent(QResizeEvent *); 75 virtual void resizeEvent(QResizeEvent *);
74 76
75 /** 77 /**
76 * Add a new @ref QPushButton. 78 * Add a new @ref QPushButton.
77 * 79 *
78 * @param noexpand If @p noexpand is @p false, the width 80 * @param noexpand If @p noexpand is @p false, the width
79 * of the button is adjusted to fit the other buttons (the maximum 81 * of the button is adjusted to fit the other buttons (the maximum
80 * of all buttons is taken). If @p noexpand is @p true, the width of this 82 * of all buttons is taken). If @p noexpand is @p true, the width of this
81 * button will be set to the minimum width needed for the given text). 83 * button will be set to the minimum width needed for the given text).
82 * 84 *
83 * @return A pointer to the new button. 85 * @return A pointer to the new button.
84 */ 86 */
85 QPushButton *addButton(const QString& text, bool noexpand = FALSE); 87 QPushButton *addButton(const QString& text, bool noexpand = FALSE);
86 88
87 /** 89 /**
88 * Add a new @ref QPushButton. 90 * Add a new @ref QPushButton.
89 * 91 *
90 * @param receiver An object to connect to. 92 * @param receiver An object to connect to.
91 * @param slot A Qt slot to connect the 'clicked()' signal to. 93 * @param slot A Qt slot to connect the 'clicked()' signal to.
92 * @param noexpand If @p noexpand is @p false, the width 94 * @param noexpand If @p noexpand is @p false, the width
93 * of the button is adjusted to fit the other buttons (the maximum 95 * of the button is adjusted to fit the other buttons (the maximum
94 * of all buttons is taken). If @p noexpand @p true, the width of this 96 * of all buttons is taken). If @p noexpand @p true, the width of this
95 * button will be set to the minimum width needed for the given text). 97 * button will be set to the minimum width needed for the given text).
96 * 98 *
97 * @return A pointer to the new button. 99 * @return A pointer to the new button.
98 */ 100 */
99 QPushButton *addButton(const QString& text, QObject * receiver, const char * slot, bool noexpand = FALSE); 101 QPushButton *addButton(const QString& text, QObject * receiver, const char * slot, bool noexpand = FALSE);