6357679e5334e90aa80c176d6d12b6a702f88492
[duncan/yast2-qt4.git] / src / QY2LayoutUtils.h
1 /*---------------------------------------------------------------------\
2 |                                                                      |
3 |                      __   __    ____ _____ ____                      |
4 |                      \ \ / /_ _/ ___|_   _|___ \                     |
5 |                       \ V / _` \___ \ | |   __) |                    |
6 |                        | | (_| |___) || |  / __/                     |
7 |                        |_|\__,_|____/ |_| |_____|                    |
8 |                                                                      |
9 |                          contributed Qt widgets                      |
10 |                                                        (C) SuSE GmbH |
11 \----------------------------------------------------------------------/
12
13   File:       QY2LayoutUtils.h
14
15   Author:     Stefan Hundhammer <sh@suse.de>
16
17   These are pure Qt functions - they can be used independently of YaST2.
18
19 /-*/
20
21
22 #ifndef QY2LayoutUtils_h
23 #define QY2LayoutUtils_h
24
25 class QWidget;
26
27
28 /**
29  * Add vertical stretchable space.
30  **/
31 QWidget * addVStretch( QWidget * parent );
32
33 /**
34  * Add horizontal stretchable space.
35  **/
36 QWidget * addHStretch( QWidget * parent );
37
38 /**
39  * Add a fixed height vertical space
40  **/
41 QWidget * addVSpacing( QWidget * parent, int height = 8 );
42
43 /**
44  * Add a fixed height horizontal space
45  **/
46 QWidget * addHSpacing( QWidget * parent, int width = 8 );
47
48 /**
49  * Limit a QSize to what is available on the same screen as 'widget'.
50  **/
51 QSize limitToScreenSize( const QWidget * widget, const QSize & desiredSize );
52 QSize limitToScreenSize( const QWidget * widget, int width, int height );
53
54 #endif // ifndef QY2LayoutUtils_h