]> icculus.org git repositories - duncan/yast2-qt4.git/blob - src/YQAlignment.h
restart qt4 porting
[duncan/yast2-qt4.git] / src / YQAlignment.h
1 /*---------------------------------------------------------------------\
2 |                                                                      |
3 |                      __   __    ____ _____ ____                      |
4 |                      \ \ / /_ _/ ___|_   _|___ \                     |
5 |                       \ V / _` \___ \ | |   __) |                    |
6 |                        | | (_| |___) || |  / __/                     |
7 |                        |_|\__,_|____/ |_| |_____|                    |
8 |                                                                      |
9 |                               core system                            |
10 |                                                        (C) SuSE GmbH |
11 \----------------------------------------------------------------------/
12
13   File:       YQAlignment.h
14
15   Author:     Stefan Hundhammer <sh@suse.de>
16
17 /-*/
18
19
20 #ifndef YQAlignment_h
21 #define YQAlignment_h
22
23 #include <qwidget.h>
24
25 #include "YAlignment.h"
26
27 class QWidget;
28
29 class YQAlignment : public QWidget, public YAlignment
30 {
31     Q_OBJECT
32
33 public:
34
35     /**
36      * Constructor.
37      **/
38     YQAlignment( YWidget *              parent,
39                  YAlignmentType         horAlign,
40                  YAlignmentType         vertAlign );
41
42     /**
43      * Constructor for cases where the YWidget parent's widgetRep() isn't the
44      * QWidget parent, for example in compound widgets like YQWizard where it
45      * makes sense to pass a child of the YQWizard (the client area) as the
46      * QWidget parent.
47      *
48      * Use this only if you know very well what you are doing.
49      **/
50     YQAlignment( YWidget *              yParent,
51                  QWidget *              qParent,
52                  YAlignmentType         horAlign,
53                  YAlignmentType         vertAlign );
54
55     /**
56      * Move the child widget to a new position.
57      *
58      * Implemented from YAlignment.
59      **/
60     virtual void moveChild( YWidget * child, int newX, int newY );
61
62     /**
63      * Enable or disable this widget and its child.
64      *
65      * Reimplemented from YWidget.
66      **/
67     virtual void setEnabled( bool enabled );
68
69     /**
70      * Set the new size of the widget.
71      *
72      * Reimplemented from YWidget.
73      **/
74     virtual void setSize( int newWidth, int newHeight );
75
76     /**
77      * Set the background pixmap.
78      *
79      * Reimplemented from YAlignment.
80      **/
81     virtual void setBackgroundPixmap( const string & pixmapFileName );
82
83 };
84
85
86 #endif // YQAlignment_h