author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Fri, 19 Feb 2010 23:40:16 +0200 | |
branch | RCL_3 |
changeset 4 | 3b1da2848fc7 |
parent 0 | 1918ee327afb |
permissions | -rw-r--r-- |
0 | 1 |
/**************************************************************************** |
2 |
** |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
3 |
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
0 | 4 |
** All rights reserved. |
5 |
** Contact: Nokia Corporation (qt-info@nokia.com) |
|
6 |
** |
|
7 |
** This file is part of the test suite of the Qt Toolkit. |
|
8 |
** |
|
9 |
** $QT_BEGIN_LICENSE:LGPL$ |
|
10 |
** No Commercial Usage |
|
11 |
** This file contains pre-release code and may not be distributed. |
|
12 |
** You may use this file in accordance with the terms and conditions |
|
13 |
** contained in the Technology Preview License Agreement accompanying |
|
14 |
** this package. |
|
15 |
** |
|
16 |
** GNU Lesser General Public License Usage |
|
17 |
** Alternatively, this file may be used under the terms of the GNU Lesser |
|
18 |
** General Public License version 2.1 as published by the Free Software |
|
19 |
** Foundation and appearing in the file LICENSE.LGPL included in the |
|
20 |
** packaging of this file. Please review the following information to |
|
21 |
** ensure the GNU Lesser General Public License version 2.1 requirements |
|
22 |
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. |
|
23 |
** |
|
24 |
** In addition, as a special exception, Nokia gives you certain additional |
|
25 |
** rights. These rights are described in the Nokia Qt LGPL Exception |
|
26 |
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. |
|
27 |
** |
|
28 |
** If you have questions regarding the use of this file, please contact |
|
29 |
** Nokia at qt-info@nokia.com. |
|
30 |
** |
|
31 |
** |
|
32 |
** |
|
33 |
** |
|
34 |
** |
|
35 |
** |
|
36 |
** |
|
37 |
** |
|
38 |
** $QT_END_LICENSE$ |
|
39 |
** |
|
40 |
****************************************************************************/ |
|
41 |
#include <QtTest/QtTest> |
|
42 |
#include <QSize> |
|
43 |
#include <QRectF> |
|
44 |
#include <QTransform> |
|
45 |
||
46 |
#ifdef Q_OS_WINCE |
|
47 |
#include <qguifunctions_wince.h> |
|
48 |
||
49 |
bool qt_wince_is_high_dpi() { |
|
50 |
HDC deviceContext = GetDC(0); |
|
51 |
int dpi = GetDeviceCaps(deviceContext, LOGPIXELSX); |
|
52 |
ReleaseDC(0, deviceContext); |
|
53 |
if ((dpi < 1000) && (dpi > 0)) |
|
54 |
return dpi > 96; |
|
55 |
else |
|
56 |
return false; |
|
57 |
} |
|
58 |
#endif |
|
59 |
||
60 |
Q_DECLARE_METATYPE(QList<int>) |
|
61 |
Q_DECLARE_METATYPE(QList<QRectF>) |
|
62 |
Q_DECLARE_METATYPE(QMatrix) |
|
63 |
Q_DECLARE_METATYPE(QPainterPath) |
|
64 |
Q_DECLARE_METATYPE(QPointF) |
|
65 |
Q_DECLARE_METATYPE(QRectF) |
|
66 |
Q_DECLARE_METATYPE(Qt::ScrollBarPolicy) |
|
67 |
||
68 |
static void _scrollBarRanges_data_1(int offset) |
|
69 |
{ |
|
70 |
// No motif, flat frame |
|
71 |
QTest::newRow("1") << QSize(150, 100) << QRectF(0, 0, 150, 100) << QTransform() |
|
72 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
73 |
<< 0 << 0 << 0 << 0 << false << false; |
|
74 |
QTest::newRow("2") << QSize(150, 100) << QRectF(0, 0, 200, 100) << QTransform() |
|
75 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
76 |
<< 0 << (50 + offset) << 0 << offset << false << false; |
|
77 |
QTest::newRow("3") << QSize(150, 100) << QRectF(0, 0, 200, 200) << QTransform() |
|
78 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
79 |
<< 0 << (50 + offset) << 0 << (100 + offset) << false << false; |
|
80 |
QTest::newRow("4") << QSize(150, 100) << QRectF(-100, -100, 150, 100) << QTransform() |
|
81 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
82 |
<< 0 << 0 << 0 << 0 << false << false; |
|
83 |
QTest::newRow("5") << QSize(150, 100) << QRectF(-100, -100, 200, 100) << QTransform() |
|
84 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
85 |
<< -100 << (offset -50) << -100 << (-100 + offset) << false << false; |
|
86 |
QTest::newRow("6") << QSize(150, 100) << QRectF(-100, -100, 200, 200) << QTransform() |
|
87 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
88 |
<< -100 << (offset -50) << -100 << offset << false << false; |
|
89 |
QTest::newRow("7") << QSize(150, 100) << QRectF(0, 0, 151, 101) << QTransform() |
|
90 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
91 |
<< 0 << (offset + 1) << 0 << offset + 1 << false << false; |
|
92 |
QTest::newRow("8") << QSize(150, 100) << QRectF(0, 0, 201, 101) << QTransform() |
|
93 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
94 |
<< 0 << (50 + offset + 1) << 0 << offset + 1 << false << false; |
|
95 |
QTest::newRow("9") << QSize(150, 100) << QRectF(0, 0, 201, 201) << QTransform() |
|
96 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
97 |
<< 0 << (50 + offset + 1) << 0 << (100 + offset + 1) << false << false; |
|
98 |
QTest::newRow("10") << QSize(150, 100) << QRectF(-101, -101, 151, 101) << QTransform() |
|
99 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
100 |
<< -101 << (-100 + offset) << -101 << (-100 + offset) << false << false; |
|
101 |
QTest::newRow("11") << QSize(150, 100) << QRectF(-101, -101, 201, 101) << QTransform() |
|
102 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
103 |
<< (-101) << (offset + -50) << -101 << (-100 + offset) << false << false; |
|
104 |
QTest::newRow("12") << QSize(150, 100) << QRectF(-101, -101, 201, 201) << QTransform() |
|
105 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
106 |
<< (-101) << (offset -50) << (-101) << offset << false << false; |
|
107 |
QTest::newRow("13") << QSize(150, 100) << QRectF(0, 0, 166, 116) << QTransform() |
|
108 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
109 |
<< 0 << (offset + 16) << 0 << (offset + 16) << false << false; |
|
110 |
QTest::newRow("14") << QSize(150, 100) << QRectF(0, 0, 216, 116) << QTransform() |
|
111 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
112 |
<< 0 << (50 + offset + 16) << 0 << (offset + 16) << false << false; |
|
113 |
QTest::newRow("15") << QSize(150, 100) << QRectF(0, 0, 216, 216) << QTransform() |
|
114 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
115 |
<< 0 << (50 + offset + 16) << 0 << (100 + offset + 16) << false << false; |
|
116 |
QTest::newRow("16") << QSize(150, 100) << QRectF(-116, -116, 166, 116) << QTransform() |
|
117 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
118 |
<< (-100 - 16) << (-100 + offset) << (-100 - 16 ) << (-100 + offset) << false << false; |
|
119 |
QTest::newRow("17") << QSize(150, 100) << QRectF(-116, -116, 216, 116) << QTransform() |
|
120 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
121 |
<< (-100 - 16) << (offset -50) << (-100 - 16) << (-100 + offset) << false << false; |
|
122 |
QTest::newRow("18") << QSize(150, 100) << QRectF(-116, -116, 216, 216) << QTransform() |
|
123 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
124 |
<< (-100 - 16) << (offset -50) << (-100 - 16) << offset << false << false; |
|
125 |
QTest::newRow("1 x2") << QSize(150, 100) << QRectF(0, 0, 150, 100) << QTransform().scale(2, 2) |
|
126 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
127 |
<< 0 << (150 + offset) << 0 << (100 + offset) << false << false; |
|
128 |
QTest::newRow("2 x2") << QSize(150, 100) << QRectF(0, 0, 200, 100) << QTransform().scale(2, 2) |
|
129 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
130 |
<< 0 << (250 + offset) << 0 << (100 + offset) << false << false; |
|
131 |
QTest::newRow("3 x2") << QSize(150, 100) << QRectF(0, 0, 200, 200) << QTransform().scale(2, 2) |
|
132 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
133 |
<< 0 << (250 + offset) << 0 << (300 + offset) << false << false; |
|
134 |
QTest::newRow("4 x2") << QSize(150, 100) << QRectF(-100, -100, 150, 100) << QTransform().scale(2, 2) |
|
135 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
136 |
<< -200 << (-50 + offset) << -200 << (-100 + offset) << false << false; |
|
137 |
QTest::newRow("5 x2") << QSize(150, 100) << QRectF(-100, -100, 200, 100) << QTransform().scale(2, 2) |
|
138 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
139 |
<< -200 << (50 + offset) << -200 << (-100 + offset) << false << false; |
|
140 |
QTest::newRow("6 x2") << QSize(150, 100) << QRectF(-100, -100, 200, 200) << QTransform().scale(2, 2) |
|
141 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
142 |
<< -200 << (50 + offset) << -200 << (100 + offset) << false << false; |
|
143 |
QTest::newRow("1 No ScrollBars") << QSize(150, 100) << QRectF(0, 0, 150, 100) << QTransform() |
|
144 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
145 |
<< 0 << 0 << 0 << 0 << false << false; |
|
146 |
QTest::newRow("2 No ScrollBars") << QSize(150, 100) << QRectF(0, 0, 200, 100) << QTransform() |
|
147 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
148 |
<< 0 << 50 << 0 << 0 << false << false; |
|
149 |
QTest::newRow("3 No ScrollBars") << QSize(150, 100) << QRectF(0, 0, 200, 200) << QTransform() |
|
150 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
151 |
<< 0 << 50 << 0 << 100 << false << false; |
|
152 |
QTest::newRow("4 No ScrollBars") << QSize(150, 100) << QRectF(-100, -100, 150, 100) << QTransform() |
|
153 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
154 |
<< 0 << 0 << 0 << 0 << false << false; |
|
155 |
QTest::newRow("5 No ScrollBars") << QSize(150, 100) << QRectF(-100, -100, 200, 100) << QTransform() |
|
156 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
157 |
<< -100 << -50 << 0 << 0 << false << false; |
|
158 |
QTest::newRow("6 No ScrollBars") << QSize(150, 100) << QRectF(-100, -100, 200, 200) << QTransform() |
|
159 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
160 |
<< -100 << -50 << -100 << 0 << false << false; |
|
161 |
QTest::newRow("7 No ScrollBars") << QSize(150, 100) << QRectF(0, 0, 151, 101) << QTransform() |
|
162 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
163 |
<< 0 << 1 << 0 << 1 << false << false; |
|
164 |
QTest::newRow("8 No ScrollBars") << QSize(150, 100) << QRectF(0, 0, 201, 101) << QTransform() |
|
165 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
166 |
<< 0 << 51 << 0 << 1 << false << false; |
|
167 |
QTest::newRow("9 No ScrollBars") << QSize(150, 100) << QRectF(0, 0, 201, 201) << QTransform() |
|
168 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
169 |
<< 0 << 51 << 0 << 101 << false << false; |
|
170 |
QTest::newRow("10 No ScrollBars") << QSize(150, 100) << QRectF(-101, -101, 151, 101) << QTransform() |
|
171 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
172 |
<< -101 << -100 << -101 << -100 << false << false; |
|
173 |
QTest::newRow("11 No ScrollBars") << QSize(150, 100) << QRectF(-101, -101, 201, 101) << QTransform() |
|
174 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
175 |
<< -101 << -50 << -101 << -100 << false << false; |
|
176 |
QTest::newRow("12 No ScrollBars") << QSize(150, 100) << QRectF(-101, -101, 201, 201) << QTransform() |
|
177 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
178 |
<< -101 << -50 << -101 << 0 << false << false; |
|
179 |
QTest::newRow("13 No ScrollBars") << QSize(150, 100) << QRectF(0, 0, 166, 116) << QTransform() |
|
180 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
181 |
<< 0 << 16 << 0 << 16 << false << false; |
|
182 |
QTest::newRow("14 No ScrollBars") << QSize(150, 100) << QRectF(0, 0, 216, 116) << QTransform() |
|
183 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
184 |
<< 0 << (50 + 16) << 0 << 16 << false << false; |
|
185 |
QTest::newRow("15 No ScrollBars") << QSize(150, 100) << QRectF(0, 0, 216, 216) << QTransform() |
|
186 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
187 |
<< 0 << (50 + 16) << 0 << (100 + 16) << false << false; |
|
188 |
QTest::newRow("16 No ScrollBars") << QSize(150, 100) << QRectF(-116, -116, 166, 116) << QTransform() |
|
189 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
190 |
<< (-100 - 16) << -100 << (-100 - 16) << -100 << false << false; |
|
191 |
QTest::newRow("17 No ScrollBars") << QSize(150, 100) << QRectF(-116, -116, 216, 116) << QTransform() |
|
192 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
193 |
<< (-100 - 16) << -50 << (-100 - 16) << -100 << false << false; |
|
194 |
QTest::newRow("18 No ScrollBars") << QSize(150, 100) << QRectF(-116, -116, 216, 216) << QTransform() |
|
195 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
196 |
<< (-100 - 16) << -50 << (-100 - 16) << 0 << false << false; |
|
197 |
QTest::newRow("1 x2 No ScrollBars") << QSize(150, 100) << QRectF(0, 0, 150, 100) << QTransform().scale(2, 2) |
|
198 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
199 |
<< 0 << 150 << 0 << 100 << false << false; |
|
200 |
QTest::newRow("2 x2 No ScrollBars") << QSize(150, 100) << QRectF(0, 0, 200, 100) << QTransform().scale(2, 2) |
|
201 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
202 |
<< 0 << 250 << 0 << 100 << false << false; |
|
203 |
QTest::newRow("3 x2 No ScrollBars") << QSize(150, 100) << QRectF(0, 0, 200, 200) << QTransform().scale(2, 2) |
|
204 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
205 |
<< 0 << 250 << 0 << 300 << false << false; |
|
206 |
QTest::newRow("4 x2 No ScrollBars") << QSize(150, 100) << QRectF(-100, -100, 150, 100) << QTransform().scale(2, 2) |
|
207 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
208 |
<< -200 << -50 << -200 << -100 << false << false; |
|
209 |
QTest::newRow("5 x2 No ScrollBars") << QSize(150, 100) << QRectF(-100, -100, 200, 100) << QTransform().scale(2, 2) |
|
210 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
211 |
<< -200 << 50 << -200 << -100 << false << false; |
|
212 |
QTest::newRow("6 x2 No ScrollBars") << QSize(150, 100) << QRectF(-100, -100, 200, 200) << QTransform().scale(2, 2) |
|
213 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
214 |
<< -200 << 50 << -200 << 100 << false << false; |
|
215 |
QTest::newRow("1 Always ScrollBars") << QSize(150, 100) << QRectF(0, 0, 150, 100) << QTransform() |
|
216 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
217 |
<< 0 << 16 << 0 << 16 << false << false; |
|
218 |
QTest::newRow("2 Always ScrollBars") << QSize(150, 100) << QRectF(0, 0, 200, 100) << QTransform() |
|
219 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
220 |
<< 0 << (50 + 16) << 0 << 16 << false << false; |
|
221 |
QTest::newRow("3 Always ScrollBars") << QSize(150, 100) << QRectF(0, 0, 200, 200) << QTransform() |
|
222 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
223 |
<< 0 << (50 + 16) << 0 << (100 + 16) << false << false; |
|
224 |
QTest::newRow("4 Always ScrollBars") << QSize(150, 100) << QRectF(-100, -100, 150, 100) << QTransform() |
|
225 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
226 |
<< -100 << (-100 + 16) << -100 << (-100 + 16) << false << false; |
|
227 |
QTest::newRow("5 Always ScrollBars") << QSize(150, 100) << QRectF(-100, -100, 200, 100) << QTransform() |
|
228 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
229 |
<< -100 << (16-50) << -100 << (-100 + 16) << false << false; |
|
230 |
QTest::newRow("6 Always ScrollBars") << QSize(150, 100) << QRectF(-100, -100, 200, 200) << QTransform() |
|
231 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
232 |
<< -100 << (16-50) << -100 << 16 << false << false; |
|
233 |
QTest::newRow("7 Always ScrollBars") << QSize(150, 100) << QRectF(0, 0, 151, 101) << QTransform() |
|
234 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
235 |
<< 0 << 17 << 0 << 17 << false << false; |
|
236 |
QTest::newRow("8 Always ScrollBars") << QSize(150, 100) << QRectF(0, 0, 201, 101) << QTransform() |
|
237 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
238 |
<< 0 << (17+50) << 0 << 17 << false << false; |
|
239 |
QTest::newRow("9 Always ScrollBars") << QSize(150, 100) << QRectF(0, 0, 201, 201) << QTransform() |
|
240 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
241 |
<< 0 << 67 << 0 << 117 << false << false; |
|
242 |
QTest::newRow("10 Always ScrollBars") << QSize(150, 100) << QRectF(-101, -101, 151, 101) << QTransform() |
|
243 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
244 |
<< -101 << (-100 + 16) << -101 << (-100 + 16) << false << false; |
|
245 |
QTest::newRow("11 Always ScrollBars") << QSize(150, 100) << QRectF(-101, -101, 201, 101) << QTransform() |
|
246 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
247 |
<< -101 << (16-50) << -101 << (-100 + 16) << false << false; |
|
248 |
QTest::newRow("12 Always ScrollBars") << QSize(150, 100) << QRectF(-101, -101, 201, 201) << QTransform() |
|
249 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
250 |
<< -101 << (16-50) << -101 << 16 << false << false; |
|
251 |
QTest::newRow("13 Always ScrollBars") << QSize(150, 100) << QRectF(0, 0, 166, 116) << QTransform() |
|
252 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
253 |
<< 0 << 32 << 0 << 32 << false << false; |
|
254 |
QTest::newRow("14 Always ScrollBars") << QSize(150, 100) << QRectF(0, 0, 216, 116) << QTransform() |
|
255 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
256 |
<< 0 << (50 + 32) << 0 << 32 << false << false; |
|
257 |
QTest::newRow("15 Always ScrollBars") << QSize(150, 100) << QRectF(0, 0, 216, 216) << QTransform() |
|
258 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
259 |
<< 0 << (50 + 32) << 0 << (100 + 32) << false << false; |
|
260 |
QTest::newRow("16 Always ScrollBars") << QSize(150, 100) << QRectF(-116, -116, 166, 116) << QTransform() |
|
261 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
262 |
<< (-100 - 16) << (-100 + 16) << (-100 - 16) << (-100 + 16) << false << false; |
|
263 |
QTest::newRow("17 Always ScrollBars") << QSize(150, 100) << QRectF(-116, -116, 216, 116) << QTransform() |
|
264 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
265 |
<< (-100 - 16) << (16-50) << (-100 - 16) << (-100 + 16) << false << false; |
|
266 |
QTest::newRow("18 Always ScrollBars") << QSize(150, 100) << QRectF(-116, -116, 216, 216) << QTransform() |
|
267 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
268 |
<< (-100 - 16) << (16-50) << (-100 - 16) << 16 << false << false; |
|
269 |
QTest::newRow("1 x2 Always ScrollBars") << QSize(150, 100) << QRectF(0, 0, 150, 100) << QTransform().scale(2, 2) |
|
270 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
271 |
<< 0 << (150 + 16) << 0 << (100 + 16) << false << false; |
|
272 |
QTest::newRow("2 x2 Always ScrollBars") << QSize(150, 100) << QRectF(0, 0, 200, 100) << QTransform().scale(2, 2) |
|
273 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
274 |
<< 0 << (250 + 16) << 0 << (100 + 16) << false << false; |
|
275 |
QTest::newRow("3 x2 Always ScrollBars") << QSize(150, 100) << QRectF(0, 0, 200, 200) << QTransform().scale(2, 2) |
|
276 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
277 |
<< 0 << (250 + 16) << 0 << (300 + 16) << false << false; |
|
278 |
QTest::newRow("4 x2 Always ScrollBars") << QSize(150, 100) << QRectF(-100, -100, 150, 100) << QTransform().scale(2, 2) |
|
279 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
280 |
<< -200 << (-50 + 16) << -200 << (-100 + 16) << false << false; |
|
281 |
QTest::newRow("5 x2 Always ScrollBars") << QSize(150, 100) << QRectF(-100, -100, 200, 100) << QTransform().scale(2, 2) |
|
282 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
283 |
<< -200 << (50 + 16) << -200 << (-100 + 16) << false << false; |
|
284 |
QTest::newRow("6 x2 Always ScrollBars") << QSize(150, 100) << QRectF(-100, -100, 200, 200) << QTransform().scale(2, 2) |
|
285 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
286 |
<< -200 << (50 + 16) << -200 << (100 + 16) << false << false; |
|
287 |
} |
|
288 |
||
289 |
static void _scrollBarRanges_data_2(int offset) |
|
290 |
{ |
|
291 |
// Motif, flat frame |
|
292 |
QTest::newRow("Motif, 1") << QSize(150, 100) << QRectF(0, 0, 150, 100) << QTransform() |
|
293 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
294 |
<< 0 << 0 << 0 << 0 << true << false; |
|
295 |
QTest::newRow("Motif, 2") << QSize(150, 100) << QRectF(0, 0, 200, 100) << QTransform() |
|
296 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
297 |
<< 0 << (50 + offset) << 0 << offset << true << false; |
|
298 |
QTest::newRow("Motif, 3") << QSize(150, 100) << QRectF(0, 0, 200, 200) << QTransform() |
|
299 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
300 |
<< 0 << (50 + offset) << 0 << (100 + offset) << true << false; |
|
301 |
QTest::newRow("Motif, 4") << QSize(150, 100) << QRectF(-100, -100, 150, 100) << QTransform() |
|
302 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
303 |
<< 0 << 0 << 0 << 0 << true << false; |
|
304 |
QTest::newRow("Motif, 5") << QSize(150, 100) << QRectF(-100, -100, 200, 100) << QTransform() |
|
305 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
306 |
<< -100 << (offset-50) << -100 << (-100 + offset) << true << false; |
|
307 |
QTest::newRow("Motif, 6") << QSize(150, 100) << QRectF(-100, -100, 200, 200) << QTransform() |
|
308 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
309 |
<< -100 << (offset-50) << -100 << offset << true << false; |
|
310 |
QTest::newRow("Motif, 7") << QSize(150, 100) << QRectF(0, 0, 151, 101) << QTransform() |
|
311 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
312 |
<< 0 << offset + 1 << 0 << offset + 1 << true << false; |
|
313 |
QTest::newRow("Motif, 8") << QSize(150, 100) << QRectF(0, 0, 201, 101) << QTransform() |
|
314 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
315 |
<< 0 << (50 + offset + 1) << 0 << offset + 1 << true << false; |
|
316 |
QTest::newRow("Motif, 9") << QSize(150, 100) << QRectF(0, 0, 201, 201) << QTransform() |
|
317 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
318 |
<< 0 << (50 + offset + 1) << 0 << (100 + offset + 1) << true << false; |
|
319 |
QTest::newRow("Motif, 10") << QSize(150, 100) << QRectF(-101, -101, 151, 101) << QTransform() |
|
320 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
321 |
<< -101 << (-100 + offset) << -101 << (-100 + offset) << true << false; |
|
322 |
QTest::newRow("Motif, 11") << QSize(150, 100) << QRectF(-101, -101, 201, 101) << QTransform() |
|
323 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
324 |
<< (-101) << (offset-50) << -101 << (-100 + offset) << true << false; |
|
325 |
QTest::newRow("Motif, 12") << QSize(150, 100) << QRectF(-101, -101, 201, 201) << QTransform() |
|
326 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
327 |
<< (-101) << (offset-50) << (-101) << offset << true << false; |
|
328 |
QTest::newRow("Motif, 13") << QSize(150, 100) << QRectF(0, 0, 166, 116) << QTransform() |
|
329 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
330 |
<< 0 << (offset + 16) << 0 << (offset + 16) << true << false; |
|
331 |
QTest::newRow("Motif, 14") << QSize(150, 100) << QRectF(0, 0, 216, 116) << QTransform() |
|
332 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
333 |
<< 0 << (50 + offset + 16) << 0 << (offset + 16) << true << false; |
|
334 |
QTest::newRow("Motif, 15") << QSize(150, 100) << QRectF(0, 0, 216, 216) << QTransform() |
|
335 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
336 |
<< 0 << (50 + offset + 16) << 0 << (100 + offset + 16) << true << false; |
|
337 |
QTest::newRow("Motif, 16") << QSize(150, 100) << QRectF(-116, -116, 166, 116) << QTransform() |
|
338 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
339 |
<< (-100 - 16) << (-100 + offset) << (-100 - 16) << (-100 + offset) << true << false; |
|
340 |
QTest::newRow("Motif, 17") << QSize(150, 100) << QRectF(-116, -116, 216, 116) << QTransform() |
|
341 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
342 |
<< (-100 - 16) << (offset-50) << (-100 - 16) << (-100 + offset) << true << false; |
|
343 |
QTest::newRow("Motif, 18") << QSize(150, 100) << QRectF(-116, -116, 216, 216) << QTransform() |
|
344 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
345 |
<< (-100 - 16) << (offset-50) << (-100 - 16) << offset << true << false; |
|
346 |
QTest::newRow("Motif, 1 x2") << QSize(150, 100) << QRectF(0, 0, 150, 100) << QTransform().scale(2, 2) |
|
347 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
348 |
<< 0 << (150 + offset) << 0 << (100 + offset) << true << false; |
|
349 |
QTest::newRow("Motif, 2 x2") << QSize(150, 100) << QRectF(0, 0, 200, 100) << QTransform().scale(2, 2) |
|
350 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
351 |
<< 0 << (250 + offset) << 0 << (100 + offset) << true << false; |
|
352 |
QTest::newRow("Motif, 3 x2") << QSize(150, 100) << QRectF(0, 0, 200, 200) << QTransform().scale(2, 2) |
|
353 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
354 |
<< 0 << (250 + offset) << 0 << (300 + offset) << true << false; |
|
355 |
QTest::newRow("Motif, 4 x2") << QSize(150, 100) << QRectF(-100, -100, 150, 100) << QTransform().scale(2, 2) |
|
356 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
357 |
<< -200 << (-50 + offset) << -200 << (-100 + offset) << true << false; |
|
358 |
QTest::newRow("Motif, 5 x2") << QSize(150, 100) << QRectF(-100, -100, 200, 100) << QTransform().scale(2, 2) |
|
359 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
360 |
<< -200 << (50 + offset) << -200 << (-100 + offset) << true << false; |
|
361 |
QTest::newRow("Motif, 6 x2") << QSize(150, 100) << QRectF(-100, -100, 200, 200) << QTransform().scale(2, 2) |
|
362 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
363 |
<< -200 << (50 + offset) << -200 << (100 + offset) << true << false; |
|
364 |
QTest::newRow("Motif, 1 No ScrollBars") << QSize(150, 100) << QRectF(0, 0, 150, 100) << QTransform() |
|
365 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
366 |
<< 0 << 0 << 0 << 0 << true << false; |
|
367 |
QTest::newRow("Motif, 2 No ScrollBars") << QSize(150, 100) << QRectF(0, 0, 200, 100) << QTransform() |
|
368 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
369 |
<< 0 << 50 << 0 << 0 << true << false; |
|
370 |
QTest::newRow("Motif, 3 No ScrollBars") << QSize(150, 100) << QRectF(0, 0, 200, 200) << QTransform() |
|
371 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
372 |
<< 0 << 50 << 0 << 100 << true << false; |
|
373 |
QTest::newRow("Motif, 4 No ScrollBars") << QSize(100, 100) << QRectF(-100, -100, 100, 100) << QTransform() |
|
374 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
375 |
<< 0 << 0 << 0 << 0 << true << false; |
|
376 |
QTest::newRow("Motif, 5 No ScrollBars") << QSize(150, 100) << QRectF(-100, -100, 200, 100) << QTransform() |
|
377 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
378 |
<< -100 << -50 << 0 << 0 << true << false; |
|
379 |
QTest::newRow("Motif, 6 No ScrollBars") << QSize(150, 100) << QRectF(-100, -100, 200, 200) << QTransform() |
|
380 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
381 |
<< -100 << -50 << -100 << 0 << true << false; |
|
382 |
QTest::newRow("Motif, 7 No ScrollBars") << QSize(150, 100) << QRectF(0, 0, 151, 101) << QTransform() |
|
383 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
384 |
<< 0 << 1 << 0 << 1 << true << false; |
|
385 |
QTest::newRow("Motif, 8 No ScrollBars") << QSize(150, 100) << QRectF(0, 0, 201, 101) << QTransform() |
|
386 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
387 |
<< 0 << 51 << 0 << 1 << true << false; |
|
388 |
QTest::newRow("Motif, 9 No ScrollBars") << QSize(150, 100) << QRectF(0, 0, 201, 201) << QTransform() |
|
389 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
390 |
<< 0 << 51 << 0 << 101 << true << false; |
|
391 |
QTest::newRow("Motif, 10 No ScrollBars") << QSize(150, 100) << QRectF(-101, -101, 151, 101) << QTransform() |
|
392 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
393 |
<< -101 << -100 << -101 << -100 << true << false; |
|
394 |
QTest::newRow("Motif, 11 No ScrollBars") << QSize(150, 100) << QRectF(-101, -101, 201, 101) << QTransform() |
|
395 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
396 |
<< -101 << -50 << -101 << -100 << true << false; |
|
397 |
QTest::newRow("Motif, 12 No ScrollBars") << QSize(150, 100) << QRectF(-101, -101, 201, 201) << QTransform() |
|
398 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
399 |
<< -101 << -50 << -101 << 0 << true << false; |
|
400 |
QTest::newRow("Motif, 13 No ScrollBars") << QSize(150, 100) << QRectF(0, 0, 166, 116) << QTransform() |
|
401 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
402 |
<< 0 << 16 << 0 << 16 << true << false; |
|
403 |
QTest::newRow("Motif, 14 No ScrollBars") << QSize(150, 100) << QRectF(0, 0, 216, 116) << QTransform() |
|
404 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
405 |
<< 0 << (50 + 16) << 0 << 16 << true << false; |
|
406 |
QTest::newRow("Motif, 15 No ScrollBars") << QSize(150, 100) << QRectF(0, 0, 216, 216) << QTransform() |
|
407 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
408 |
<< 0 << (50 + 16) << 0 << (100 + 16) << true << false; |
|
409 |
QTest::newRow("Motif, 16 No ScrollBars") << QSize(150, 100) << QRectF(-116, -116, 166, 116) << QTransform() |
|
410 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
411 |
<< (-100 - 16) << -100 << (-100 - 16) << -100 << true << false; |
|
412 |
QTest::newRow("Motif, 17 No ScrollBars") << QSize(150, 100) << QRectF(-116, -116, 216, 116) << QTransform() |
|
413 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
414 |
<< (-100 - 16) << -50 << (-100 - 16) << -100 << true << false; |
|
415 |
QTest::newRow("Motif, 18 No ScrollBars") << QSize(150, 100) << QRectF(-116, -116, 216, 216) << QTransform() |
|
416 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
417 |
<< (-100 - 16) << -50 << (-100 - 16) << 0 << true << false; |
|
418 |
QTest::newRow("Motif, 1 x2 No ScrollBars") << QSize(150, 100) << QRectF(0, 0, 150, 100) << QTransform().scale(2, 2) |
|
419 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
420 |
<< 0 << 150 << 0 << 100 << true << false; |
|
421 |
QTest::newRow("Motif, 2 x2 No ScrollBars") << QSize(150, 100) << QRectF(0, 0, 200, 100) << QTransform().scale(2, 2) |
|
422 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
423 |
<< 0 << 250 << 0 << 100 << true << false; |
|
424 |
QTest::newRow("Motif, 3 x2 No ScrollBars") << QSize(150, 100) << QRectF(0, 0, 200, 200) << QTransform().scale(2, 2) |
|
425 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
426 |
<< 0 << 250 << 0 << 300 << true << false; |
|
427 |
QTest::newRow("Motif, 4 x2 No ScrollBars") << QSize(150, 100) << QRectF(-100, -100, 150, 100) << QTransform().scale(2, 2) |
|
428 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
429 |
<< -200 << -50 << -200 << -100 << true << false; |
|
430 |
QTest::newRow("Motif, 5 x2 No ScrollBars") << QSize(150, 100) << QRectF(-100, -100, 200, 100) << QTransform().scale(2, 2) |
|
431 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
432 |
<< -200 << 50 << -200 << -100 << true << false; |
|
433 |
QTest::newRow("Motif, 6 x2 No ScrollBars") << QSize(150, 100) << QRectF(-100, -100, 200, 200) << QTransform().scale(2, 2) |
|
434 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
435 |
<< -200 << 50 << -200 << 100 << true << false; |
|
436 |
QTest::newRow("Motif, 1 Always ScrollBars") << QSize(150, 100) << QRectF(0, 0, 150, 100) << QTransform() |
|
437 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
438 |
<< 0 << 16 << 0 << 16 << true << false; |
|
439 |
QTest::newRow("Motif, 2 Always ScrollBars") << QSize(150, 100) << QRectF(0, 0, 200, 100) << QTransform() |
|
440 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
441 |
<< 0 << (50 + 16) << 0 << 16 << true << false; |
|
442 |
QTest::newRow("Motif, 3 Always ScrollBars") << QSize(150, 100) << QRectF(0, 0, 200, 200) << QTransform() |
|
443 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
444 |
<< 0 << (50 + 16) << 0 << (100 + 16) << true << false; |
|
445 |
QTest::newRow("Motif, 4 Always ScrollBars") << QSize(150, 100) << QRectF(-100, -100, 150, 100) << QTransform() |
|
446 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
447 |
<< -100 << (-100 + 16) << -100 << (-100 + 16) << true << false; |
|
448 |
QTest::newRow("Motif, 5 Always ScrollBars") << QSize(150, 100) << QRectF(-100, -100, 200, 100) << QTransform() |
|
449 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
450 |
<< -100 << (16-50) << -100 << (-100 + 16) << true << false; |
|
451 |
QTest::newRow("Motif, 6 Always ScrollBars") << QSize(150, 100) << QRectF(-100, -100, 200, 200) << QTransform() |
|
452 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
453 |
<< -100 << (16-50) << -100 << 16 << true << false; |
|
454 |
QTest::newRow("Motif, 7 Always ScrollBars") << QSize(150, 100) << QRectF(0, 0, 151, 101) << QTransform() |
|
455 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
456 |
<< 0 << 17 << 0 << 17 << true << false; |
|
457 |
QTest::newRow("Motif, 8 Always ScrollBars") << QSize(150, 100) << QRectF(0, 0, 201, 101) << QTransform() |
|
458 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
459 |
<< 0 << (117-50) << 0 << 17 << true << false; |
|
460 |
QTest::newRow("Motif, 9 Always ScrollBars") << QSize(150, 100) << QRectF(0, 0, 201, 201) << QTransform() |
|
461 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
462 |
<< 0 << (117-50) << 0 << 117 << true << false; |
|
463 |
QTest::newRow("Motif, 10 Always ScrollBars") << QSize(150, 100) << QRectF(-101, -101, 151, 101) << QTransform() |
|
464 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
465 |
<< -101 << (-100 + 16) << -101 << (-100 + 16) << true << false; |
|
466 |
QTest::newRow("Motif, 11 Always ScrollBars") << QSize(150, 100) << QRectF(-101, -101, 201, 101) << QTransform() |
|
467 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
468 |
<< -101 << (16-50) << -101 << (-100 + 16) << true << false; |
|
469 |
QTest::newRow("Motif, 12 Always ScrollBars") << QSize(150, 100) << QRectF(-101, -101, 201, 201) << QTransform() |
|
470 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
471 |
<< -101 << (16-50) << -101 << 16 << true << false; |
|
472 |
QTest::newRow("Motif, 13 Always ScrollBars") << QSize(150, 100) << QRectF(0, 0, 166, 116) << QTransform() |
|
473 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
474 |
<< 0 << 32 << 0 << 32 << true << false; |
|
475 |
QTest::newRow("Motif, 14 Always ScrollBars") << QSize(150, 100) << QRectF(0, 0, 216, 116) << QTransform() |
|
476 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
477 |
<< 0 << (50 + 32) << 0 << 32 << true << false; |
|
478 |
QTest::newRow("Motif, 15 Always ScrollBars") << QSize(150, 100) << QRectF(0, 0, 216, 216) << QTransform() |
|
479 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
480 |
<< 0 << (50 + 32) << 0 << (100 + 32) << true << false; |
|
481 |
QTest::newRow("Motif, 16 Always ScrollBars") << QSize(150, 100) << QRectF(-116, -116, 166, 116) << QTransform() |
|
482 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
483 |
<< (-100 - 16) << (-100 + 16) << (-100 - 16) << (-100 + 16) << true << false; |
|
484 |
QTest::newRow("Motif, 17 Always ScrollBars") << QSize(150, 100) << QRectF(-116, -116, 216, 116) << QTransform() |
|
485 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
486 |
<< (-100 - 16) << (16-50) << (-100 - 16) << (-100 + 16) << true << false; |
|
487 |
QTest::newRow("Motif, 18 Always ScrollBars") << QSize(150, 100) << QRectF(-116, -116, 216, 216) << QTransform() |
|
488 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
489 |
<< (-100 - 16) << (16-50) << (-100 - 16) << 16 << true << false; |
|
490 |
QTest::newRow("Motif, 1 x2 Always ScrollBars") << QSize(150, 100) << QRectF(0, 0, 150, 100) << QTransform().scale(2, 2) |
|
491 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
492 |
<< 0 << (150 + 16) << 0 << (100 + 16) << true << false; |
|
493 |
QTest::newRow("Motif, 2 x2 Always ScrollBars") << QSize(150, 100) << QRectF(0, 0, 200, 100) << QTransform().scale(2, 2) |
|
494 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
495 |
<< 0 << (250 + 16) << 0 << (100 + 16) << true << false; |
|
496 |
QTest::newRow("Motif, 3 x2 Always ScrollBars") << QSize(150, 100) << QRectF(0, 0, 200, 200) << QTransform().scale(2, 2) |
|
497 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
498 |
<< 0 << (250 + 16) << 0 << (300 + 16) << true << false; |
|
499 |
QTest::newRow("Motif, 4 x2 Always ScrollBars") << QSize(150, 100) << QRectF(-100, -100, 150, 100) << QTransform().scale(2, 2) |
|
500 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
501 |
<< -200 << (-50 + 16) << -200 << (-100 + 16) << true << false; |
|
502 |
QTest::newRow("Motif, 5 x2 Always ScrollBars") << QSize(150, 100) << QRectF(-100, -100, 200, 100) << QTransform().scale(2, 2) |
|
503 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
504 |
<< -200 << (50 + 16) << -200 << (-100 + 16) << true << false; |
|
505 |
QTest::newRow("Motif, 6 x2 Always ScrollBars") << QSize(150, 100) << QRectF(-100, -100, 200, 200) << QTransform().scale(2, 2) |
|
506 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
507 |
<< -200 << (50 + 16) << -200 << (100 + 16) << true << false; |
|
508 |
} |
|
509 |
||
510 |
static void _scrollBarRanges_data_3(int offset) |
|
511 |
{ |
|
512 |
// No motif, styled panel |
|
513 |
QTest::newRow("Styled, 1") << QSize(150, 100) << QRectF(0, 0, 150, 100) << QTransform() |
|
514 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
515 |
<< 0 << 0 << 0 << 0 << false << true; |
|
516 |
QTest::newRow("Styled, 2") << QSize(150, 100) << QRectF(0, 0, 200, 100) << QTransform() |
|
517 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
518 |
<< 0 << (50 + offset) << 0 << offset << false << true; |
|
519 |
QTest::newRow("Styled, 3") << QSize(150, 100) << QRectF(0, 0, 200, 200) << QTransform() |
|
520 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
521 |
<< 0 << (50 + offset) << 0 << (100 + offset) << false << true; |
|
522 |
QTest::newRow("Styled, 4") << QSize(150, 100) << QRectF(-100, -100, 150, 100) << QTransform() |
|
523 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
524 |
<< 0 << 0 << 0 << 0 << false << true; |
|
525 |
QTest::newRow("Styled, 5") << QSize(150, 100) << QRectF(-100, -100, 200, 100) << QTransform() |
|
526 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
527 |
<< -100 << (offset-50) << -100 << (-100 + offset) << false << true; |
|
528 |
QTest::newRow("Styled, 6") << QSize(150, 100) << QRectF(-100, -100, 200, 200) << QTransform() |
|
529 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
530 |
<< -100 << (offset-50) << -100 << offset << false << true; |
|
531 |
QTest::newRow("Styled, 7") << QSize(150, 100) << QRectF(0, 0, 151, 101) << QTransform() |
|
532 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
533 |
<< 0 << offset + 1 << 0 << offset + 1 << false << true; |
|
534 |
QTest::newRow("Styled, 8") << QSize(150, 100) << QRectF(0, 0, 201, 101) << QTransform() |
|
535 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
536 |
<< 0 << (50 + offset + 1) << 0 << offset + 1 << false << true; |
|
537 |
QTest::newRow("Styled, 9") << QSize(150, 100) << QRectF(0, 0, 201, 201) << QTransform() |
|
538 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
539 |
<< 0 << (50 + offset + 1) << 0 << (100 + offset + 1) << false << true; |
|
540 |
QTest::newRow("Styled, 10") << QSize(150, 100) << QRectF(-101, -101, 151, 101) << QTransform() |
|
541 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
542 |
<< -101 << (-100 + offset) << -101 << (-100 + offset) << false << true; |
|
543 |
QTest::newRow("Styled, 11") << QSize(150, 100) << QRectF(-101, -101, 201, 101) << QTransform() |
|
544 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
545 |
<< (-101) << (offset-50) << -101 << (-100 + offset) << false << true; |
|
546 |
QTest::newRow("Styled, 12") << QSize(150, 100) << QRectF(-101, -101, 201, 201) << QTransform() |
|
547 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
548 |
<< (-101) << (offset-50) << (-101) << offset << false << true; |
|
549 |
QTest::newRow("Styled, 13") << QSize(150, 100) << QRectF(0, 0, 166, 116) << QTransform() |
|
550 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
551 |
<< 0 << (offset + 16) << 0 << (offset + 16) << false << true; |
|
552 |
QTest::newRow("Styled, 14") << QSize(150, 100) << QRectF(0, 0, 216, 116) << QTransform() |
|
553 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
554 |
<< 0 << (50 + offset + 16) << 0 << (offset + 16) << false << true; |
|
555 |
QTest::newRow("Styled, 15") << QSize(150, 100) << QRectF(0, 0, 216, 216) << QTransform() |
|
556 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
557 |
<< 0 << (50 + offset + 16) << 0 << (100 + offset + 16) << false << true; |
|
558 |
QTest::newRow("Styled, 16") << QSize(150, 100) << QRectF(-116, -116, 166, 116) << QTransform() |
|
559 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
560 |
<< (-100 - 16) << (-100 + offset) << (-100 - 16) << (-100 + offset) << false << true; |
|
561 |
QTest::newRow("Styled, 17") << QSize(150, 100) << QRectF(-116, -116, 216, 116) << QTransform() |
|
562 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
563 |
<< (-100 - 16) << (offset-50) << (-100 - 16) << (-100 + offset) << false << true; |
|
564 |
QTest::newRow("Styled, 18") << QSize(150, 100) << QRectF(-116, -116, 216, 216) << QTransform() |
|
565 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
566 |
<< (-100 - 16) << (offset-50) << (-100 - 16) << offset << false << true; |
|
567 |
QTest::newRow("Styled, 1 x2") << QSize(150, 100) << QRectF(0, 0, 150, 100) << QTransform().scale(2, 2) |
|
568 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
569 |
<< 0 << (150 + offset) << 0 << (100 + offset) << false << true; |
|
570 |
QTest::newRow("Styled, 2 x2") << QSize(150, 100) << QRectF(0, 0, 200, 100) << QTransform().scale(2, 2) |
|
571 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
572 |
<< 0 << (250 + offset) << 0 << (100 + offset) << false << true; |
|
573 |
QTest::newRow("Styled, 3 x2") << QSize(150, 100) << QRectF(0, 0, 200, 200) << QTransform().scale(2, 2) |
|
574 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
575 |
<< 0 << (250 + offset) << 0 << (300 + offset) << false << true; |
|
576 |
QTest::newRow("Styled, 4 x2") << QSize(150, 100) << QRectF(-100, -100, 150, 100) << QTransform().scale(2, 2) |
|
577 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
578 |
<< -200 << (-50 + offset) << -200 << (-100 + offset) << false << true; |
|
579 |
QTest::newRow("Styled, 5 x2") << QSize(150, 100) << QRectF(-100, -100, 200, 100) << QTransform().scale(2, 2) |
|
580 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
581 |
<< -200 << (50 + offset) << -200 << (-100 + offset) << false << true; |
|
582 |
QTest::newRow("Styled, 6 x2") << QSize(150, 100) << QRectF(-100, -100, 200, 200) << QTransform().scale(2, 2) |
|
583 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
584 |
<< -200 << (50 + offset) << -200 << (100 + offset) << false << true; |
|
585 |
QTest::newRow("Styled, 1 No ScrollBars") << QSize(150, 100) << QRectF(0, 0, 150, 100) << QTransform() |
|
586 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
587 |
<< 0 << 0 << 0 << 0 << false << true; |
|
588 |
QTest::newRow("Styled, 2 No ScrollBars") << QSize(150, 100) << QRectF(0, 0, 200, 100) << QTransform() |
|
589 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
590 |
<< 0 << 50 << 0 << 0 << false << true; |
|
591 |
QTest::newRow("Styled, 3 No ScrollBars") << QSize(150, 100) << QRectF(0, 0, 200, 200) << QTransform() |
|
592 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
593 |
<< 0 << 50 << 0 << 100 << false << true; |
|
594 |
QTest::newRow("Styled, 4 No ScrollBars") << QSize(150, 100) << QRectF(-100, -100, 150, 100) << QTransform() |
|
595 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
596 |
<< 0 << 0 << 0 << 0 << false << true; |
|
597 |
QTest::newRow("Styled, 5 No ScrollBars") << QSize(150, 100) << QRectF(-100, -100, 200, 100) << QTransform() |
|
598 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
599 |
<< -100 << -50 << 0 << 0 << false << true; |
|
600 |
QTest::newRow("Styled, 6 No ScrollBars") << QSize(150, 100) << QRectF(-100, -100, 200, 200) << QTransform() |
|
601 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
602 |
<< -100 << -50 << -100 << 0 << false << true; |
|
603 |
QTest::newRow("Styled, 7 No ScrollBars") << QSize(150, 100) << QRectF(0, 0, 151, 101) << QTransform() |
|
604 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
605 |
<< 0 << 1 << 0 << 1 << false << true; |
|
606 |
QTest::newRow("Styled, 8 No ScrollBars") << QSize(150, 100) << QRectF(0, 0, 201, 101) << QTransform() |
|
607 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
608 |
<< 0 << 51 << 0 << 1 << false << true; |
|
609 |
QTest::newRow("Styled, 9 No ScrollBars") << QSize(150, 100) << QRectF(0, 0, 201, 201) << QTransform() |
|
610 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
611 |
<< 0 << 51 << 0 << 101 << false << true; |
|
612 |
QTest::newRow("Styled, 10 No ScrollBars") << QSize(150, 100) << QRectF(-101, -101, 151, 101) << QTransform() |
|
613 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
614 |
<< -101 << -100 << -101 << -100 << false << true; |
|
615 |
QTest::newRow("Styled, 11 No ScrollBars") << QSize(150, 100) << QRectF(-101, -101, 201, 101) << QTransform() |
|
616 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
617 |
<< -101 << -50 << -101 << -100 << false << true; |
|
618 |
QTest::newRow("Styled, 12 No ScrollBars") << QSize(150, 100) << QRectF(-101, -101, 201, 201) << QTransform() |
|
619 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
620 |
<< -101 << -50 << -101 << 0 << false << true; |
|
621 |
QTest::newRow("Styled, 13 No ScrollBars") << QSize(150, 100) << QRectF(0, 0, 166, 116) << QTransform() |
|
622 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
623 |
<< 0 << 16 << 0 << 16 << false << true; |
|
624 |
QTest::newRow("Styled, 14 No ScrollBars") << QSize(150, 100) << QRectF(0, 0, 216, 116) << QTransform() |
|
625 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
626 |
<< 0 << (50 + 16) << 0 << 16 << false << true; |
|
627 |
QTest::newRow("Styled, 15 No ScrollBars") << QSize(150, 100) << QRectF(0, 0, 216, 216) << QTransform() |
|
628 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
629 |
<< 0 << (50 + 16) << 0 << (100 + 16) << false << true; |
|
630 |
QTest::newRow("Styled, 16 No ScrollBars") << QSize(150, 100) << QRectF(-116, -116, 166, 116) << QTransform() |
|
631 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
632 |
<< (-100 - 16) << -100 << (-100 - 16) << -100 << false << true; |
|
633 |
QTest::newRow("Styled, 17 No ScrollBars") << QSize(150, 100) << QRectF(-116, -116, 216, 116) << QTransform() |
|
634 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
635 |
<< (-100 - 16) << -50 << (-100 - 16) << -100 << false << true; |
|
636 |
QTest::newRow("Styled, 18 No ScrollBars") << QSize(150, 100) << QRectF(-116, -116, 216, 216) << QTransform() |
|
637 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
638 |
<< (-100 - 16) << -50 << (-100 - 16) << 0 << false << true; |
|
639 |
QTest::newRow("Styled, 1 x2 No ScrollBars") << QSize(150, 100) << QRectF(0, 0, 150, 100) << QTransform().scale(2, 2) |
|
640 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
641 |
<< 0 << 150 << 0 << 100 << false << true; |
|
642 |
QTest::newRow("Styled, 2 x2 No ScrollBars") << QSize(150, 100) << QRectF(0, 0, 200, 100) << QTransform().scale(2, 2) |
|
643 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
644 |
<< 0 << 250 << 0 << 100 << false << true; |
|
645 |
QTest::newRow("Styled, 3 x2 No ScrollBars") << QSize(150, 100) << QRectF(0, 0, 200, 200) << QTransform().scale(2, 2) |
|
646 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
647 |
<< 0 << 250 << 0 << 300 << false << true; |
|
648 |
QTest::newRow("Styled, 4 x2 No ScrollBars") << QSize(150, 100) << QRectF(-100, -100, 150, 100) << QTransform().scale(2, 2) |
|
649 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
650 |
<< -200 << -50 << -200 << -100 << false << true; |
|
651 |
QTest::newRow("Styled, 5 x2 No ScrollBars") << QSize(150, 100) << QRectF(-100, -100, 200, 100) << QTransform().scale(2, 2) |
|
652 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
653 |
<< -200 << 50 << -200 << -100 << false << true; |
|
654 |
QTest::newRow("Styled, 6 x2 No ScrollBars") << QSize(150, 100) << QRectF(-100, -100, 200, 200) << QTransform().scale(2, 2) |
|
655 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
656 |
<< -200 << 50 << -200 << 100 << false << true; |
|
657 |
QTest::newRow("Styled, 1 Always ScrollBars") << QSize(150, 100) << QRectF(0, 0, 150, 100) << QTransform() |
|
658 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
659 |
<< 0 << 16 << 0 << 16 << false << true; |
|
660 |
QTest::newRow("Styled, 2 Always ScrollBars") << QSize(150, 100) << QRectF(0, 0, 200, 100) << QTransform() |
|
661 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
662 |
<< 0 << (50 + 16) << 0 << 16 << false << true; |
|
663 |
QTest::newRow("Styled, 3 Always ScrollBars") << QSize(150, 100) << QRectF(0, 0, 200, 200) << QTransform() |
|
664 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
665 |
<< 0 << (50 + 16) << 0 << (100 + 16) << false << true; |
|
666 |
QTest::newRow("Styled, 4 Always ScrollBars") << QSize(150, 100) << QRectF(-100, -100, 150, 100) << QTransform() |
|
667 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
668 |
<< -100 << (-100 + 16) << -100 << (-100 + 16) << false << true; |
|
669 |
QTest::newRow("Styled, 5 Always ScrollBars") << QSize(150, 100) << QRectF(-100, -100, 200, 100) << QTransform() |
|
670 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
671 |
<< -100 << (16-50) << -100 << (-100 + 16) << false << true; |
|
672 |
QTest::newRow("Styled, 6 Always ScrollBars") << QSize(150, 100) << QRectF(-100, -100, 200, 200) << QTransform() |
|
673 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
674 |
<< -100 << (16-50) << -100 << 16 << false << true; |
|
675 |
QTest::newRow("Styled, 7 Always ScrollBars") << QSize(150, 100) << QRectF(0, 0, 151, 101) << QTransform() |
|
676 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
677 |
<< 0 << 17 << 0 << 17 << false << true; |
|
678 |
QTest::newRow("Styled, 8 Always ScrollBars") << QSize(150, 100) << QRectF(0, 0, 201, 101) << QTransform() |
|
679 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
680 |
<< 0 << (117-50) << 0 << 17 << false << true; |
|
681 |
QTest::newRow("Styled, 9 Always ScrollBars") << QSize(150, 100) << QRectF(0, 0, 201, 201) << QTransform() |
|
682 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
683 |
<< 0 << (117-50) << 0 << 117 << false << true; |
|
684 |
QTest::newRow("Styled, 10 Always ScrollBars") << QSize(150, 100) << QRectF(-101, -101, 151, 101) << QTransform() |
|
685 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
686 |
<< -101 << (-100 + 16) << -101 << (-100 + 16) << false << true; |
|
687 |
QTest::newRow("Styled, 11 Always ScrollBars") << QSize(150, 100) << QRectF(-101, -101, 201, 101) << QTransform() |
|
688 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
689 |
<< -101 << (16-50) << -101 << (-100 + 16) << false << true; |
|
690 |
QTest::newRow("Styled, 12 Always ScrollBars") << QSize(150, 100) << QRectF(-101, -101, 201, 201) << QTransform() |
|
691 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
692 |
<< -101 << (16-50) << -101 << 16 << false << true; |
|
693 |
QTest::newRow("Styled, 13 Always ScrollBars") << QSize(150, 100) << QRectF(0, 0, 166, 116) << QTransform() |
|
694 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
695 |
<< 0 << 32 << 0 << 32 << false << true; |
|
696 |
QTest::newRow("Styled, 14 Always ScrollBars") << QSize(150, 100) << QRectF(0, 0, 216, 116) << QTransform() |
|
697 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
698 |
<< 0 << (50 + 32) << 0 << 32 << false << true; |
|
699 |
QTest::newRow("Styled, 15 Always ScrollBars") << QSize(150, 100) << QRectF(0, 0, 216, 216) << QTransform() |
|
700 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
701 |
<< 0 << (50 + 32) << 0 << (100 + 32) << false << true; |
|
702 |
QTest::newRow("Styled, 16 Always ScrollBars") << QSize(150, 100) << QRectF(-116, -116, 166, 116) << QTransform() |
|
703 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
704 |
<< (-100 - 16) << (-100 + 16) << (-100 - 16) << (-100 + 16) << false << true; |
|
705 |
QTest::newRow("Styled, 17 Always ScrollBars") << QSize(150, 100) << QRectF(-116, -116, 216, 116) << QTransform() |
|
706 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
707 |
<< (-100 - 16) << (16-50) << (-100 - 16) << (-100 + 16) << false << true; |
|
708 |
QTest::newRow("Styled, 18 Always ScrollBars") << QSize(150, 100) << QRectF(-116, -116, 216, 216) << QTransform() |
|
709 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
710 |
<< (-100 - 16) << (16-50) << (-100 - 16) << 16 << false << true; |
|
711 |
QTest::newRow("Styled, 1 x2 Always ScrollBars") << QSize(150, 100) << QRectF(0, 0, 150, 100) << QTransform().scale(2, 2) |
|
712 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
713 |
<< 0 << (150 + 16) << 0 << (100 + 16) << false << true; |
|
714 |
QTest::newRow("Styled, 2 x2 Always ScrollBars") << QSize(150, 100) << QRectF(0, 0, 200, 100) << QTransform().scale(2, 2) |
|
715 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
716 |
<< 0 << (250 + 16) << 0 << (100 + 16) << false << true; |
|
717 |
QTest::newRow("Styled, 3 x2 Always ScrollBars") << QSize(150, 100) << QRectF(0, 0, 200, 200) << QTransform().scale(2, 2) |
|
718 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
719 |
<< 0 << (250 + 16) << 0 << (300 + 16) << false << true; |
|
720 |
QTest::newRow("Styled, 4 x2 Always ScrollBars") << QSize(150, 100) << QRectF(-100, -100, 150, 100) << QTransform().scale(2, 2) |
|
721 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
722 |
<< -200 << (-50 + 16) << -200 << (-100 + 16) << false << true; |
|
723 |
QTest::newRow("Styled, 5 x2 Always ScrollBars") << QSize(150, 100) << QRectF(-100, -100, 200, 100) << QTransform().scale(2, 2) |
|
724 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
725 |
<< -200 << (50 + 16) << -200 << (-100 + 16) << false << true; |
|
726 |
QTest::newRow("Styled, 6 x2 Always ScrollBars") << QSize(150, 100) << QRectF(-100, -100, 200, 200) << QTransform().scale(2, 2) |
|
727 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
728 |
<< -200 << (50 + 16) << -200 << (100 + 16) << false << true; |
|
729 |
} |
|
730 |
||
731 |
static void _scrollBarRanges_data_4(int offset) |
|
732 |
{ |
|
733 |
// Motif, styled panel |
|
734 |
QTest::newRow("Motif, Styled, 1") << QSize(150, 100) << QRectF(0, 0, 150, 100) << QTransform() |
|
735 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
736 |
<< 0 << 0 << 0 << 0 << true << true; |
|
737 |
QTest::newRow("Motif, Styled, 2") << QSize(150, 100) << QRectF(0, 0, 200, 100) << QTransform() |
|
738 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
739 |
<< 0 << (50 + offset + 4) << 0 << (offset + 4) << true << true; |
|
740 |
QTest::newRow("Motif, Styled, 3") << QSize(150, 100) << QRectF(0, 0, 200, 200) << QTransform() |
|
741 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
742 |
<< 0 << (50 + offset + 4) << 0 << (100 + offset + 4) << true << true; |
|
743 |
QTest::newRow("Motif, Styled, 4") << QSize(150, 100) << QRectF(-100, -100, 150, 100) << QTransform() |
|
744 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
745 |
<< 0 << 0 << 0 << 0 << true << true; |
|
746 |
QTest::newRow("Motif, Styled, 5") << QSize(150, 100) << QRectF(-100, -100, 200, 100) << QTransform() |
|
747 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
748 |
<< -100 << (offset + 4 - 50) << -100 << (-100 + offset + 4) << true << true; |
|
749 |
QTest::newRow("Motif, Styled, 6") << QSize(150, 100) << QRectF(-100, -100, 200, 200) << QTransform() |
|
750 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
751 |
<< -100 << (offset + 4 - 50) << -100 << (offset + 4) << true << true; |
|
752 |
QTest::newRow("Motif, Styled, 7") << QSize(150, 100) << QRectF(0, 0, 151, 101) << QTransform() |
|
753 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
754 |
<< 0 << (offset + 1 + 4) << 0 << (offset + 1 + 4) << true << true; |
|
755 |
QTest::newRow("Motif, Styled, 8") << QSize(150, 100) << QRectF(0, 0, 201, 101) << QTransform() |
|
756 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
757 |
<< 0 << (50 + offset + 1 + 4) << 0 << (offset + 1 + 4) << true << true; |
|
758 |
QTest::newRow("Motif, Styled, 9") << QSize(150, 100) << QRectF(0, 0, 201, 201) << QTransform() |
|
759 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
760 |
<< 0 << (50 + offset + 1 + 4) << 0 << (100 + offset + 1 + 4) << true << true; |
|
761 |
QTest::newRow("Motif, Styled, 10") << QSize(150, 100) << QRectF(-101, -101, 151, 101) << QTransform() |
|
762 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
763 |
<< -101 << (-100 + offset + 4) << -101 << (-100 + offset + 4) << true << true; |
|
764 |
QTest::newRow("Motif, Styled, 11") << QSize(150, 100) << QRectF(-101, -101, 201, 101) << QTransform() |
|
765 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
766 |
<< (-101) << (offset + 4 - 50) << -101 << (-100 + offset + 4) << true << true; |
|
767 |
QTest::newRow("Motif, Styled, 12") << QSize(150, 100) << QRectF(-101, -101, 201, 201) << QTransform() |
|
768 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
769 |
<< (-101) << (offset + 4 - 50) << (-101) << (offset + 4) << true << true; |
|
770 |
QTest::newRow("Motif, Styled, 13") << QSize(150, 100) << QRectF(0, 0, 166, 116) << QTransform() |
|
771 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
772 |
<< 0 << (offset + 16 + 4) << 0 << (offset + 16 + 4) << true << true; |
|
773 |
QTest::newRow("Motif, Styled, 14") << QSize(150, 100) << QRectF(0, 0, 216, 116) << QTransform() |
|
774 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
775 |
<< 0 << (50 + offset + 16 + 4) << 0 << (offset + 16 + 4) << true << true; |
|
776 |
QTest::newRow("Motif, Styled, 15") << QSize(150, 100) << QRectF(0, 0, 216, 216) << QTransform() |
|
777 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
778 |
<< 0 << (50 + offset + 16 + 4) << 0 << (100 + offset + 16 + 4) << true << true; |
|
779 |
QTest::newRow("Motif, Styled, 16") << QSize(150, 100) << QRectF(-116, -116, 166, 116) << QTransform() |
|
780 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
781 |
<< (-100 - 16) << (-100 + offset + 4) << (-100 - 16) << (-100 + offset + 4) << true << true; |
|
782 |
QTest::newRow("Motif, Styled, 17") << QSize(150, 100) << QRectF(-116, -116, 216, 116) << QTransform() |
|
783 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
784 |
<< (-100 - 16) << (offset + 4 - 50) << (-100 - 16) << (-100 + offset + 4) << true << true; |
|
785 |
QTest::newRow("Motif, Styled, 18") << QSize(150, 100) << QRectF(-116, -116, 216, 216) << QTransform() |
|
786 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
787 |
<< (-100 - 16) << (offset + 4 - 50) << (-100 - 16) << (offset + 4) << true << true; |
|
788 |
QTest::newRow("Motif, Styled, 1 x2") << QSize(150, 100) << QRectF(0, 0, 150, 100) << QTransform().scale(2, 2) |
|
789 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
790 |
<< 0 << (150 + offset + 4) << 0 << (100 + offset + 4) << true << true; |
|
791 |
QTest::newRow("Motif, Styled, 2 x2") << QSize(150, 100) << QRectF(0, 0, 200, 100) << QTransform().scale(2, 2) |
|
792 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
793 |
<< 0 << (250 + offset + 4) << 0 << (100 + offset + 4) << true << true; |
|
794 |
QTest::newRow("Motif, Styled, 3 x2") << QSize(150, 100) << QRectF(0, 0, 200, 200) << QTransform().scale(2, 2) |
|
795 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
796 |
<< 0 << (250 + offset + 4) << 0 << (300 + offset + 4) << true << true; |
|
797 |
QTest::newRow("Motif, Styled, 4 x2") << QSize(150, 100) << QRectF(-100, -100, 150, 100) << QTransform().scale(2, 2) |
|
798 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
799 |
<< -200 << (-50 + offset + 4) << -200 << (-100 + offset + 4) << true << true; |
|
800 |
QTest::newRow("Motif, Styled, 5 x2") << QSize(150, 100) << QRectF(-100, -100, 200, 100) << QTransform().scale(2, 2) |
|
801 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
802 |
<< -200 << (50 + offset + 4) << -200 << (-100 + offset + 4) << true << true; |
|
803 |
QTest::newRow("Motif, Styled, 6 x2") << QSize(150, 100) << QRectF(-100, -100, 200, 200) << QTransform().scale(2, 2) |
|
804 |
<< Qt::ScrollBarAsNeeded << Qt::ScrollBarAsNeeded |
|
805 |
<< -200 << (50 + offset + 4) << -200 << (100 + offset + 4) << true << true; |
|
806 |
QTest::newRow("Motif, Styled, 1 No ScrollBars") << QSize(150, 100) << QRectF(0, 0, 150, 100) << QTransform() |
|
807 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
808 |
<< 0 << 0 << 0 << 0 << true << true; |
|
809 |
QTest::newRow("Motif, Styled, 2 No ScrollBars") << QSize(150, 100) << QRectF(0, 0, 200, 100) << QTransform() |
|
810 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
811 |
<< 0 << 50 << 0 << 0 << true << true; |
|
812 |
QTest::newRow("Motif, Styled, 3 No ScrollBars") << QSize(150, 100) << QRectF(0, 0, 200, 200) << QTransform() |
|
813 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
814 |
<< 0 << 50 << 0 << 100 << true << true; |
|
815 |
QTest::newRow("Motif, Styled, 4 No ScrollBars") << QSize(150, 100) << QRectF(-100, -100, 150, 100) << QTransform() |
|
816 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
817 |
<< 0 << 0 << 0 << 0 << true << true; |
|
818 |
QTest::newRow("Motif, Styled, 5 No ScrollBars") << QSize(150, 100) << QRectF(-100, -100, 200, 100) << QTransform() |
|
819 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
820 |
<< -100 << -50 << 0 << 0 << true << true; |
|
821 |
QTest::newRow("Motif, Styled, 6 No ScrollBars") << QSize(150, 100) << QRectF(-100, -100, 200, 200) << QTransform() |
|
822 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
823 |
<< -100 << -50 << -100 << 0 << true << true; |
|
824 |
QTest::newRow("Motif, Styled, 7 No ScrollBars") << QSize(150, 100) << QRectF(0, 0, 151, 101) << QTransform() |
|
825 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
826 |
<< 0 << 1 << 0 << 1 << true << true; |
|
827 |
QTest::newRow("Motif, Styled, 8 No ScrollBars") << QSize(150, 100) << QRectF(0, 0, 201, 101) << QTransform() |
|
828 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
829 |
<< 0 << 51 << 0 << 1 << true << true; |
|
830 |
QTest::newRow("Motif, Styled, 9 No ScrollBars") << QSize(150, 100) << QRectF(0, 0, 201, 201) << QTransform() |
|
831 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
832 |
<< 0 << 51 << 0 << 101 << true << true; |
|
833 |
QTest::newRow("Motif, Styled, 10 No ScrollBars") << QSize(150, 100) << QRectF(-101, -101, 151, 101) << QTransform() |
|
834 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
835 |
<< -101 << -100 << -101 << -100 << true << true; |
|
836 |
QTest::newRow("Motif, Styled, 11 No ScrollBars") << QSize(150, 100) << QRectF(-101, -101, 201, 101) << QTransform() |
|
837 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
838 |
<< -101 << -50 << -101 << -100 << true << true; |
|
839 |
QTest::newRow("Motif, Styled, 12 No ScrollBars") << QSize(150, 100) << QRectF(-101, -101, 201, 201) << QTransform() |
|
840 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
841 |
<< -101 << -50 << -101 << 0 << true << true; |
|
842 |
QTest::newRow("Motif, Styled, 13 No ScrollBars") << QSize(150, 100) << QRectF(0, 0, 166, 116) << QTransform() |
|
843 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
844 |
<< 0 << 16 << 0 << 16 << true << true; |
|
845 |
QTest::newRow("Motif, Styled, 14 No ScrollBars") << QSize(150, 100) << QRectF(0, 0, 216, 116) << QTransform() |
|
846 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
847 |
<< 0 << (50 + 16) << 0 << 16 << true << true; |
|
848 |
QTest::newRow("Motif, Styled, 15 No ScrollBars") << QSize(150, 100) << QRectF(0, 0, 216, 216) << QTransform() |
|
849 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
850 |
<< 0 << (50 + 16) << 0 << (100 + 16) << true << true; |
|
851 |
QTest::newRow("Motif, Styled, 16 No ScrollBars") << QSize(150, 100) << QRectF(-116, -116, 166, 116) << QTransform() |
|
852 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
853 |
<< (-100 - 16) << -100 << (-100 - 16) << -100 << true << true; |
|
854 |
QTest::newRow("Motif, Styled, 17 No ScrollBars") << QSize(150, 100) << QRectF(-116, -116, 216, 116) << QTransform() |
|
855 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
856 |
<< (-100 - 16) << -50 << (-100 - 16) << -100 << true << true; |
|
857 |
QTest::newRow("Motif, Styled, 18 No ScrollBars") << QSize(150, 100) << QRectF(-116, -116, 216, 216) << QTransform() |
|
858 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
859 |
<< (-100 - 16) << -50 << (-100 - 16) << 0 << true << true; |
|
860 |
QTest::newRow("Motif, Styled, 1 x2 No ScrollBars") << QSize(150, 100) << QRectF(0, 0, 150, 100) << QTransform().scale(2, 2) |
|
861 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
862 |
<< 0 << 150 << 0 << 100 << true << true; |
|
863 |
QTest::newRow("Motif, Styled, 2 x2 No ScrollBars") << QSize(150, 100) << QRectF(0, 0, 200, 100) << QTransform().scale(2, 2) |
|
864 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
865 |
<< 0 << 250 << 0 << 100 << true << true; |
|
866 |
QTest::newRow("Motif, Styled, 3 x2 No ScrollBars") << QSize(150, 100) << QRectF(0, 0, 200, 200) << QTransform().scale(2, 2) |
|
867 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
868 |
<< 0 << 250 << 0 << 300 << true << true; |
|
869 |
QTest::newRow("Motif, Styled, 4 x2 No ScrollBars") << QSize(150, 100) << QRectF(-100, -100, 150, 100) << QTransform().scale(2, 2) |
|
870 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
871 |
<< -200 << -50 << -200 << -100 << true << true; |
|
872 |
QTest::newRow("Motif, Styled, 5 x2 No ScrollBars") << QSize(150, 100) << QRectF(-100, -100, 200, 100) << QTransform().scale(2, 2) |
|
873 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
874 |
<< -200 << 50 << -200 << -100 << true << true; |
|
875 |
QTest::newRow("Motif, Styled, 6 x2 No ScrollBars") << QSize(150, 100) << QRectF(-100, -100, 200, 200) << QTransform().scale(2, 2) |
|
876 |
<< Qt::ScrollBarAlwaysOff << Qt::ScrollBarAlwaysOff |
|
877 |
<< -200 << 50 << -200 << 100 << true << true; |
|
878 |
QTest::newRow("Motif, Styled, 1 Always ScrollBars") << QSize(150, 100) << QRectF(0, 0, 150, 100) << QTransform() |
|
879 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
880 |
<< 0 << (16 + 4) << 0 << (16 + 4) << true << true; |
|
881 |
QTest::newRow("Motif, Styled, 2 Always ScrollBars") << QSize(150, 100) << QRectF(0, 0, 200, 100) << QTransform() |
|
882 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
883 |
<< 0 << (50 + 16 + 4) << 0 << (16 + 4) << true << true; |
|
884 |
QTest::newRow("Motif, Styled, 3 Always ScrollBars") << QSize(150, 100) << QRectF(0, 0, 200, 200) << QTransform() |
|
885 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
886 |
<< 0 << (50 + 16 + 4) << 0 << (100 + 16 + 4) << true << true; |
|
887 |
QTest::newRow("Motif, Styled, 4 Always ScrollBars") << QSize(150, 100) << QRectF(-100, -100, 150, 100) << QTransform() |
|
888 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
889 |
<< -100 << (-100 + 16 + 4) << -100 << (-100 + 16 + 4) << true << true; |
|
890 |
QTest::newRow("Motif, Styled, 5 Always ScrollBars") << QSize(150, 100) << QRectF(-100, -100, 200, 100) << QTransform() |
|
891 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
892 |
<< -100 << (16 + 4 - 50) << -100 << (-100 + 16 + 4) << true << true; |
|
893 |
QTest::newRow("Motif, Styled, 6 Always ScrollBars") << QSize(150, 100) << QRectF(-100, -100, 200, 200) << QTransform() |
|
894 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
895 |
<< -100 << (16 + 4 - 50) << -100 << (16 + 4) << true << true; |
|
896 |
QTest::newRow("Motif, Styled, 7 Always ScrollBars") << QSize(150, 100) << QRectF(0, 0, 151, 101) << QTransform() |
|
897 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
898 |
<< 0 << (17 + 4) << 0 << (17 + 4) << true << true; |
|
899 |
QTest::newRow("Motif, Styled, 8 Always ScrollBars") << QSize(150, 100) << QRectF(0, 0, 201, 101) << QTransform() |
|
900 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
901 |
<< 0 << (117 + 4 - 50) << 0 << (17 + 4) << true << true; |
|
902 |
QTest::newRow("Motif, Styled, 9 Always ScrollBars") << QSize(150, 100) << QRectF(0, 0, 201, 201) << QTransform() |
|
903 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
904 |
<< 0 << (117 + 4 - 50) << 0 << (117 + 4) << true << true; |
|
905 |
QTest::newRow("Motif, Styled, 10 Always ScrollBars") << QSize(150, 100) << QRectF(-101, -101, 151, 101) << QTransform() |
|
906 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
907 |
<< -101 << (-100 + 16 + 4) << -101 << (-100 + 16 + 4) << true << true; |
|
908 |
QTest::newRow("Motif, Styled, 11 Always ScrollBars") << QSize(150, 100) << QRectF(-101, -101, 201, 101) << QTransform() |
|
909 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
910 |
<< -101 << (16 + 4 - 50) << -101 << (-100 + 16 + 4) << true << true; |
|
911 |
QTest::newRow("Motif, Styled, 12 Always ScrollBars") << QSize(150, 100) << QRectF(-101, -101, 201, 201) << QTransform() |
|
912 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
913 |
<< -101 << (16 + 4 - 50) << -101 << (16 + 4) << true << true; |
|
914 |
QTest::newRow("Motif, Styled, 13 Always ScrollBars") << QSize(150, 100) << QRectF(0, 0, 166, 116) << QTransform() |
|
915 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
916 |
<< 0 << (32 + 4) << 0 << (32 + 4) << true << true; |
|
917 |
QTest::newRow("Motif, Styled, 14 Always ScrollBars") << QSize(150, 100) << QRectF(0, 0, 216, 116) << QTransform() |
|
918 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
919 |
<< 0 << (50 + 32 + 4) << 0 << (32 + 4) << true << true; |
|
920 |
QTest::newRow("Motif, Styled, 15 Always ScrollBars") << QSize(150, 100) << QRectF(0, 0, 216, 216) << QTransform() |
|
921 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
922 |
<< 0 << (50 + 32 + 4) << 0 << (100 + 32 + 4) << true << true; |
|
923 |
QTest::newRow("Motif, Styled, 16 Always ScrollBars") << QSize(150, 100) << QRectF(-116, -116, 166, 116) << QTransform() |
|
924 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
925 |
<< (-100 - 16) << (-100 + 16 + 4) << (-100 - 16) << (-100 + 16 + 4) << true << true; |
|
926 |
QTest::newRow("Motif, Styled, 17 Always ScrollBars") << QSize(150, 100) << QRectF(-116, -116, 216, 116) << QTransform() |
|
927 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
928 |
<< (-100 - 16) << (16 + 4 - 50) << (-100 - 16) << (-100 + 16 + 4) << true << true; |
|
929 |
QTest::newRow("Motif, Styled, 18 Always ScrollBars") << QSize(150, 100) << QRectF(-116, -116, 216, 216) << QTransform() |
|
930 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
931 |
<< (-100 - 16) << (16 + 4 - 50) << (-100 - 16) << (16 + 4) << true << true; |
|
932 |
QTest::newRow("Motif, Styled, 1 x2 Always ScrollBars") << QSize(150, 100) << QRectF(0, 0, 150, 100) << QTransform().scale(2, 2) |
|
933 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
934 |
<< 0 << (150 + 16 + 4) << 0 << (100 + 16 + 4) << true << true; |
|
935 |
QTest::newRow("Motif, Styled, 2 x2 Always ScrollBars") << QSize(150, 100) << QRectF(0, 0, 200, 100) << QTransform().scale(2, 2) |
|
936 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
937 |
<< 0 << (250 + 16 + 4) << 0 << (100 + 16 + 4) << true << true; |
|
938 |
QTest::newRow("Motif, Styled, 3 x2 Always ScrollBars") << QSize(150, 100) << QRectF(0, 0, 200, 200) << QTransform().scale(2, 2) |
|
939 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
940 |
<< 0 << (250 + 16 + 4) << 0 << (300 + 16 + 4) << true << true; |
|
941 |
QTest::newRow("Motif, Styled, 4 x2 Always ScrollBars") << QSize(150, 100) << QRectF(-100, -100, 150, 100) << QTransform().scale(2, 2) |
|
942 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
943 |
<< -200 << (-50 + 16 + 4) << -200 << (-100 + 16 + 4) << true << true; |
|
944 |
QTest::newRow("Motif, Styled, 5 x2 Always ScrollBars") << QSize(150, 100) << QRectF(-100, -100, 200, 100) << QTransform().scale(2, 2) |
|
945 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
946 |
<< -200 << (50 + 16 + 4) << -200 << (-100 + 16 + 4) << true << true; |
|
947 |
QTest::newRow("Motif, Styled, 6 x2 Always ScrollBars") << QSize(150, 100) << QRectF(-100, -100, 200, 200) << QTransform().scale(2, 2) |
|
948 |
<< Qt::ScrollBarAlwaysOn << Qt::ScrollBarAlwaysOn |
|
949 |
<< -200 << (50 + 16 + 4) << -200 << (100 + 16 + 4) << true << true; |
|
950 |
} |
|
951 |
||
952 |
void _scrollBarRanges_data() |
|
953 |
{ |
|
954 |
QTest::addColumn<QSize>("viewportSize"); |
|
955 |
QTest::addColumn<QRectF>("sceneRect"); |
|
956 |
QTest::addColumn<QTransform>("transform"); |
|
957 |
QTest::addColumn<Qt::ScrollBarPolicy>("hbarpolicy"); |
|
958 |
QTest::addColumn<Qt::ScrollBarPolicy>("vbarpolicy"); |
|
959 |
QTest::addColumn<int>("hmin"); |
|
960 |
QTest::addColumn<int>("hmax"); |
|
961 |
QTest::addColumn<int>("vmin"); |
|
962 |
QTest::addColumn<int>("vmax"); |
|
963 |
QTest::addColumn<bool>("useMotif"); |
|
964 |
QTest::addColumn<bool>("useStyledPanel"); |
|
965 |
||
966 |
int offset = 16; |
|
967 |
#ifdef Q_OS_WINCE |
|
968 |
if (qt_wince_is_high_dpi()) |
|
969 |
offset *= 2; |
|
970 |
#endif |
|
971 |
||
972 |
_scrollBarRanges_data_1(offset); |
|
973 |
_scrollBarRanges_data_2(offset); |
|
974 |
_scrollBarRanges_data_3(offset); |
|
975 |
_scrollBarRanges_data_4(offset); |
|
976 |
} |