File indexing completed on 2024-06-09 04:23:54

0001 /*
0002  * SPDX-FileCopyrightText: 2018 Boudewijn Rempt <boud@valdyas.org>
0003  *
0004  *  SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 #ifndef TESTTAGMODEL_H
0007 #define TESTTAGMODEL_H
0008 
0009 #include <QObject>
0010 #include <QtSql>
0011 
0012 #include "KisResourceTypes.h"
0013 #include "KisTag.h"
0014 
0015 class KisResourceLocator;
0016 class TestTagModel : public QObject
0017 {
0018     Q_OBJECT
0019 private Q_SLOTS:
0020     void initTestCase();
0021 
0022     void testWithTagModelTester();
0023 
0024     void testRowCount();
0025     void testData();
0026     void testIndexForTag();
0027     void testTagForIndex();
0028     void testTagForUrl();
0029     void testAddEmptyTag();
0030     void testAddTag();
0031     void testSetTagActiveInactive();
0032     void testRenameTag();
0033     void testChangeTagActive();
0034 
0035     void testAddEmptyTagWithResources();
0036     void testAddTagWithResources();
0037 
0038 
0039     void cleanupTestCase();
0040 private:
0041 
0042     QString m_srcLocation;
0043     QString m_dstLocation;
0044 
0045     KisTagSP m_tag;
0046 
0047     KisResourceLocator *m_locator;
0048     const QString m_resourceType = ResourceType::PaintOpPresets;
0049 
0050 };
0051 
0052 #endif