]> icculus.org git repositories - duncan/yast2-qt4.git/blob - src/YQLayoutBox.h
- Don't create layouts with parent. Qt 4.x automatically reparents
[duncan/yast2-qt4.git] / src / YQLayoutBox.h
1 /*---------------------------------------------------------------------\
2 |                                                                      |
3 |                      __   __    ____ _____ ____                      |
4 |                      \ \ / /_ _/ ___|_   _|___ \                     |
5 |                       \ V / _` \___ \ | |   __) |                    |
6 |                        | | (_| |___) || |  / __/                     |
7 |                        |_|\__,_|____/ |_| |_____|                    |
8 |                                                                      |
9 |                               core system                            |
10 |                                                        (C) SuSE GmbH |
11 \----------------------------------------------------------------------/
12
13   File:       YQLayoutBox.h
14
15   Author:     Stefan Hundhammer <sh@suse.de>
16
17 /-*/
18
19
20 #ifndef YQLayoutBox_h
21 #define YQLayoutBox_h
22
23 #include <qwidget.h>
24
25 #include "YLayoutBox.h"
26
27
28 class YQLayoutBox : public QWidget, public YLayoutBox
29 {
30     Q_OBJECT
31
32 public:
33
34     /**
35      * Constructor.
36      *
37      * Creates a VBox for dim == YD_VERT or a HBox for YD_HORIZ.
38      **/
39     YQLayoutBox( YWidget * parent, YUIDimension dim );
40
41     /**
42      * Set enabled/disabled state.
43      *
44      * Reimplemented from YWidget.
45      **/
46     virtual void setEnabled( bool enabled );
47
48     /**
49      * Set the new size of the widget.
50      *
51      * Reimplemented from YWidget.
52      **/
53     virtual void setSize( int newWidth, int newHeight );
54
55     /**
56      * Move a child widget to a new position.
57      *
58      * Reimplemented from YLayoutBox.
59      **/
60     virtual void moveChild( YWidget * child, int newX, int newY );
61 };
62
63
64 typedef YQLayoutBox     YQVBox;
65 typedef YQLayoutBox     YQHBox;
66
67
68 #endif // YQLayoutBox_h