Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
geometrytestutils_p.h
Go to the documentation of this file.
1
// Copyright (C) 2021 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4
#
ifndef
QQUICKGEOMETRYTESTUTIL_P_H
5
#
define
QQUICKGEOMETRYTESTUTIL_P_H
6
7
//
8
// W A R N I N G
9
// -------------
10
//
11
// This file is not part of the Qt API. It exists purely as an
12
// implementation detail. This header file may change from version to
13
// version without notice, or even be removed.
14
//
15
// We mean it.
16
//
17
18
#
include
<
QObject
>
19
#
include
<
QList
>
20
#
include
<
QSize
>
21
#
include
<
QtCore
/
qpoint
.
h
>
22
#
include
<
private
/
qglobal_p
.
h
>
23
24
QT_BEGIN_NAMESPACE
25
26
inline
bool
pointNear
(QPointF a, QPointF b, qreal tol = 1.0)
27
{
28
return
qAbs(a.x() - b.x()) <= tol && qAbs(a.y() - b.y()) <= tol;
29
}
30
31
#
define
VERIFY_POINT_NEAR
(
name
,
actual
,
expected
)
32
QVERIFY2
(
pointNear
(
(
actual
)
,
(
expected
)
)
,
33
qPrintable
(
QStringLiteral
(
name
"=(%1,%2) expected=(%3,%4)"
)
34
.
arg
(
(
actual
)
.
x
(
)
)
.
arg
(
(
actual
)
.
y
(
)
)
35
.
arg
(
(
expected
)
.
x
(
)
)
.
arg
(
(
expected
)
.
y
(
)
)
)
)
36
37
class
QQuickItem;
38
39
class
QSizeChangeListener
:
public
QObject
,
public
QList
<
QSize
>
40
{
41
Q_OBJECT
42
public
:
43
explicit
QSizeChangeListener
(
QQuickItem
*
item
);
44
private
Q_SLOTS
:
45
void
onSizeChanged
();
46
private
:
47
QQuickItem *item;
48
};
49
50
QT_END_NAMESPACE
51
52
#
endif
// QQUICKGEOMETRYTESTUTIL_P_H
QQuickItem
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition
qquickitem.h:64
QSizeChangeListener
Definition
geometrytestutils_p.h:40
pointNear
QT_BEGIN_NAMESPACE bool pointNear(QPointF a, QPointF b, qreal tol=1.0)
Definition
geometrytestutils_p.h:26
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
connect
connect(manager, &QNetworkAccessManager::finished, this, &MyClass::replyFinished)
qtdeclarative
src
quicktestutils
quick
geometrytestutils_p.h
Generated on
for Qt by
1.18.0