File indexing completed on 2024-04-21 04:50:17

0001 /*
0002     SPDX-FileCopyrightText: 2011 Michal Malek <michalm@jabster.pl>
0003     SPDX-FileCopyrightText: 1998-2009 Sebastian Trueg <trueg@k3b.org>
0004 
0005     SPDX-License-Identifier: GPL-2.0-or-later
0006 */
0007 
0008 #ifndef K3B_META_ITEM_MODEL_TEST_H
0009 #define K3B_META_ITEM_MODEL_TEST_H
0010 
0011 #include <QObject>
0012 #include <QPointer>
0013 
0014 class QStringListModel;
0015 class QStandardItemModel;
0016 
0017 class MetaItemModelTest : public QObject
0018 {
0019     Q_OBJECT
0020     
0021 public:
0022     MetaItemModelTest();
0023     
0024 private slots:
0025     void init(); // executed before each test function
0026     void testCreate();
0027     void testAddSubModel();
0028     void testAddFlatSubModel();
0029     void testRemoveSubModel();
0030     void testDynamicChanges();
0031     void testDynamicChangesInFlatModel();
0032     void testDataChanges();
0033     
0034 private:
0035     QPointer<QStandardItemModel> m_listModel;
0036     QPointer<QStandardItemModel> m_treeModel;
0037 };
0038 
0039 #endif // K3B_META_ITEM_MODEL_TEST_H