File indexing completed on 2024-12-01 06:45:53

0001 /*
0002     SPDX-FileCopyrightText: 2013 Aurélien Gateau <agateau@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #ifndef KLINKITEMSELECTIONMODELTEST_H
0008 #define KLINKITEMSELECTIONMODELTEST_H
0009 
0010 #include <QObject>
0011 
0012 class QItemSelectionModel;
0013 class QStandardItemModel;
0014 class QSortFilterProxyModel;
0015 
0016 class KLinkItemSelectionModel;
0017 
0018 class KLinkItemSelectionModelTest : public QObject
0019 {
0020     Q_OBJECT
0021 
0022 private Q_SLOTS:
0023     void init();
0024     void cleanup();
0025     void testToggle();
0026     void testMainSetCurrent();
0027     void testSubSetCurrent();
0028     void testChangeModel();
0029     void testChangeModelOfExternal();
0030     void testChangeLinkedSelectionModel();
0031     void testAdditionalLink();
0032     void testClearSelection();
0033 
0034 private:
0035     QStandardItemModel *m_mainModel;
0036     QItemSelectionModel *m_mainSelectionModel;
0037     QSortFilterProxyModel *m_subModel;
0038     KLinkItemSelectionModel *m_subSelectionModel;
0039 };
0040 
0041 #endif /* KLINKITEMSELECTIONMODELTEST_H */