libyui-qt-pkg  2.47.5
QY2LayoutUtils.h
1 /**************************************************************************
2 Copyright (C) 2000 - 2010 Novell, Inc.
3 All Rights Reserved.
4 
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9 
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14 
15 You should have received a copy of the GNU General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 
19 **************************************************************************/
20 
21 
22 
23 
24 /*---------------------------------------------------------------------\
25 | |
26 | __ __ ____ _____ ____ |
27 | \ \ / /_ _/ ___|_ _|___ \ |
28 | \ V / _` \___ \ | | __) | |
29 | | | (_| |___) || | / __/ |
30 | |_|\__,_|____/ |_| |_____| |
31 | |
32 | contributed Qt widgets |
33 | (C) SuSE GmbH |
34 \----------------------------------------------------------------------/
35 
36  File: QY2LayoutUtils.h
37 
38  Author: Stefan Hundhammer <sh@suse.de>
39 
40  These are pure Qt functions - they can be used independently of YaST2.
41 
42 /-*/
43 
44 
45 #ifndef QY2LayoutUtils_h
46 #define QY2LayoutUtils_h
47 
48 class QWidget;
49 
50 
51 /**
52  * Add vertical stretchable space.
53  **/
54 QWidget * addVStretch( QWidget * parent );
55 
56 /**
57  * Add horizontal stretchable space.
58  **/
59 QWidget * addHStretch( QWidget * parent );
60 
61 /**
62  * Add a fixed height vertical space
63  **/
64 QWidget * addVSpacing( QWidget * parent, int height = 8 );
65 
66 /**
67  * Add a fixed height horizontal space
68  **/
69 QWidget * addHSpacing( QWidget * parent, int width = 8 );
70 
71 /**
72  * Limit a QSize to what is available on the same screen as 'widget'.
73  **/
74 QSize limitToScreenSize( const QWidget * widget, const QSize & desiredSize );
75 QSize limitToScreenSize( const QWidget * widget, int width, int height );
76 
77 #endif // ifndef QY2LayoutUtils_h