summaryrefslogtreecommitdiffabout
path: root/microkde/qlayoutengine_p.h
Unidiff
Diffstat (limited to 'microkde/qlayoutengine_p.h') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/qlayoutengine_p.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/microkde/qlayoutengine_p.h b/microkde/qlayoutengine_p.h
index 2d6a556..e782703 100644
--- a/microkde/qlayoutengine_p.h
+++ b/microkde/qlayoutengine_p.h
@@ -1,24 +1,26 @@
1//Added by qt3to4:
2#include <Q3MemArray>
1// THIS IS A COPY OF THE FILE FOUND IN $QTDIR/src/kernel. Needed to modify qsplitter 3// THIS IS A COPY OF THE FILE FOUND IN $QTDIR/src/kernel. Needed to modify qsplitter
2 4
3/**************************************************************************** 5/****************************************************************************
4** $Id$ 6** $Id$
5** 7**
6** Internal header file. 8** Internal header file.
7** 9**
8** Created : 981027 10** Created : 981027
9** 11**
10** Copyright (C) 1998-99 by Trolltech AS. All rights reserved. 12** Copyright (C) 1998-99 by Trolltech AS. All rights reserved.
11** 13**
12** This file is part of the kernel module of the Qt GUI Toolkit. 14** This file is part of the kernel module of the Qt GUI Toolkit.
13** 15**
14** This file may be distributed under the terms of the Q Public License 16** This file may be distributed under the terms of the Q Public License
15** as defined by Trolltech AS of Norway and appearing in the file 17** as defined by Trolltech AS of Norway and appearing in the file
16** LICENSE.QPL included in the packaging of this file. 18** LICENSE.QPL included in the packaging of this file.
17** 19**
18** This file may be distributed and/or modified under the terms of the 20** This file may be distributed and/or modified under the terms of the
19** GNU General Public License version 2 as published by the Free Software 21** GNU General Public License version 2 as published by the Free Software
20** Foundation and appearing in the file LICENSE.GPL included in the 22** Foundation and appearing in the file LICENSE.GPL included in the
21** packaging of this file. 23** packaging of this file.
22** 24**
23** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition 25** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
24** licenses may use this file in accordance with the Qt Commercial License 26** licenses may use this file in accordance with the Qt Commercial License
@@ -34,75 +36,71 @@
34** 36**
35** Contact info@trolltech.com if any conditions of this licensing are 37** Contact info@trolltech.com if any conditions of this licensing are
36** not clear to you. 38** not clear to you.
37** 39**
38**********************************************************************/ 40**********************************************************************/
39 41
40#ifndef QLAYOUTENGINE_P_H 42#ifndef QLAYOUTENGINE_P_H
41#define QLAYOUTENGINE_P_H 43#define QLAYOUTENGINE_P_H
42 44
43 45
44// 46//
45// W A R N I N G 47// W A R N I N G
46// ------------- 48// -------------
47// 49//
48// This file is not part of the Qt API. It exists for the convenience 50// This file is not part of the Qt API. It exists for the convenience
49// of qlayout.cpp, qlayoutengine.cpp, qmainwindow.cpp and qsplitter.cpp. 51// of qlayout.cpp, qlayoutengine.cpp, qmainwindow.cpp and qsplitter.cpp.
50// This header file may change from version to version without notice, 52// This header file may change from version to version without notice,
51// or even be removed. 53// or even be removed.
52// 54//
53// We mean it. 55// We mean it.
54// 56//
55// 57//
56 58
57 59
58#ifndef QT_H
59#include "qabstractlayout.h"
60#endif // QT_H
61
62#ifndef QT_NO_LAYOUT 60#ifndef QT_NO_LAYOUT
63struct QLayoutStruct 61struct QLayoutStruct
64{ 62{
65 void initParameters() { minimumSize = sizeHint = 0; 63 void initParameters() { minimumSize = sizeHint = 0;
66 maximumSize = QWIDGETSIZE_MAX; expansive = FALSE; empty = TRUE; } 64 maximumSize = QWIDGETSIZE_MAX; expansive = FALSE; empty = TRUE; }
67 void init() { stretch = 0; initParameters(); } 65 void init() { stretch = 0; initParameters(); }
68 //permanent storage: 66 //permanent storage:
69 int stretch; 67 int stretch;
70 //parameters: 68 //parameters:
71 QCOORD sizeHint; 69 QCOORD sizeHint;
72 QCOORD maximumSize; 70 QCOORD maximumSize;
73 QCOORD minimumSize; 71 QCOORD minimumSize;
74 bool expansive; 72 bool expansive;
75 bool empty; 73 bool empty;
76 //temporary storage: 74 //temporary storage:
77 bool done; 75 bool done;
78 //result: 76 //result:
79 int pos; 77 int pos;
80 int size; 78 int size;
81}; 79};
82 80
83 81
84void qGeomCalc( QMemArray<QLayoutStruct> &chain, int start, int count, int pos, 82void qGeomCalc( Q3MemArray<QLayoutStruct> &chain, int start, int count, int pos,
85 int space, int spacer ); 83 int space, int spacer );
86 84
87 85
88 86
89/* 87/*
90 Modify total maximum (max) and total expansion (exp) 88 Modify total maximum (max) and total expansion (exp)
91 when adding boxmax/boxexp. 89 when adding boxmax/boxexp.
92 90
93 Expansive boxes win over non-expansive boxes. 91 Expansive boxes win over non-expansive boxes.
94*/ 92*/
95static inline void qMaxExpCalc( QCOORD & max, bool &exp, 93static inline void qMaxExpCalc( QCOORD & max, bool &exp,
96 QCOORD boxmax, bool boxexp ) 94 QCOORD boxmax, bool boxexp )
97{ 95{
98 if ( exp ) { 96 if ( exp ) {
99 if ( boxexp ) 97 if ( boxexp )
100 max = QMAX( max, boxmax ); 98 max = QMAX( max, boxmax );
101 } else { 99 } else {
102 if ( boxexp ) 100 if ( boxexp )
103 max = boxmax; 101 max = boxmax;
104 else 102 else
105 max = QMIN( max, boxmax ); 103 max = QMIN( max, boxmax );
106 } 104 }
107 exp = exp || boxexp; 105 exp = exp || boxexp;
108} 106}