Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 10:27:32

0001 // Copyright (C) 2016 The Qt Company Ltd.
0002 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
0003 
0004 #ifndef QABSTRACTITEMMODELTESTER_H
0005 #define QABSTRACTITEMMODELTESTER_H
0006 
0007 #include <QtCore/QObject>
0008 #include <QtTest/qttestglobal.h>
0009 #include <QtCore/QAbstractItemModel>
0010 #include <QtCore/QVariant>
0011 
0012 #ifdef QT_GUI_LIB
0013 #include <QtGui/QFont>
0014 #include <QtGui/QColor>
0015 #include <QtGui/QBrush>
0016 #include <QtGui/QPixmap>
0017 #include <QtGui/QImage>
0018 #include <QtGui/QIcon>
0019 #endif
0020 
0021 QT_REQUIRE_CONFIG(itemmodeltester);
0022 
0023 QT_BEGIN_NAMESPACE
0024 
0025 class QAbstractItemModel;
0026 class QAbstractItemModelTester;
0027 class QAbstractItemModelTesterPrivate;
0028 
0029 namespace QTestPrivate {
0030 inline bool testDataGuiRoles(QAbstractItemModelTester *tester);
0031 }
0032 
0033 class Q_TESTLIB_EXPORT QAbstractItemModelTester : public QObject
0034 {
0035     Q_OBJECT
0036     Q_DECLARE_PRIVATE(QAbstractItemModelTester)
0037 
0038 public:
0039     enum class FailureReportingMode {
0040         QtTest,
0041         Warning,
0042         Fatal
0043     };
0044 
0045     QAbstractItemModelTester(QAbstractItemModel *model, QObject *parent = nullptr);
0046     QAbstractItemModelTester(QAbstractItemModel *model, FailureReportingMode mode, QObject *parent = nullptr);
0047 
0048     QAbstractItemModel *model() const;
0049     FailureReportingMode failureReportingMode() const;
0050     void setUseFetchMore(bool value);
0051 
0052 private:
0053     bool verify(bool statement, const char *statementStr, const char *description, const char *file, int line);
0054 };
0055 
0056 QT_END_NAMESPACE
0057 
0058 #endif // QABSTRACTITEMMODELTESTER_H