1// Copyright (C) 2018 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QTESTTABLE_P_H
5#define QTESTTABLE_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 <QtTest/qttestglobal.h>
19#include <QtCore/private/qglobal_p.h>
20
21QT_BEGIN_NAMESPACE
22
23class QTestData;
24class QTestTablePrivate;
25
26class Q_TESTLIB_EXPORT QTestTable
27{
28public:
29 QTestTable();
30 ~QTestTable();
31
32 void addColumn(int elementType, const char *elementName);
33 QTestData *newData(const char *tag);
34
35 int elementCount() const;
36 int dataCount() const;
37
38 int elementTypeId(int index) const;
39 const char *dataTag(int index) const;
40 int indexOf(const char *elementName) const;
41 bool isEmpty() const;
42 QTestData *testData(int index) const;
43
44 static QTestTable *globalTestTable();
45 static QTestTable *currentTestTable();
46 static void clearGlobalTestTable();
47
48private:
49 Q_DISABLE_COPY(QTestTable)
50
51 QTestTablePrivate *d;
52};
53
54QT_END_NAMESPACE
55
56#endif
57

source code of qtbase/src/testlib/qtesttable_p.h