File indexing completed on 2025-01-05 03:58:04

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2010-08-01
0007  * Description : a test for the DImageHistory
0008  *
0009  * SPDX-FileCopyrightText: 2010 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
0010  *
0011  * SPDX-License-Identifier: GPL-2.0-or-later
0012  *
0013  * ============================================================ */
0014 
0015 #ifndef DIGIKAM_DIMG_HISTORY_GRAPH_UTEST_H
0016 #define DIGIKAM_DIMG_HISTORY_GRAPH_UTEST_H
0017 
0018 // Qt includes
0019 
0020 #include <QTest>
0021 #include <QEventLoop>
0022 #include <QDir>
0023 
0024 // Local includes
0025 
0026 #include "dimgabstracthistory_utest.h"
0027 
0028 class DImgHistoryGraphTest : public DImgAbstractHistoryTest
0029 {
0030     Q_OBJECT
0031 
0032 public:
0033 
0034     explicit DImgHistoryGraphTest(QObject* const parent = nullptr);
0035 
0036 public Q_SLOTS:
0037 
0038     void slotImageLoaded(const QString&, bool) override;
0039     void slotImageSaved(const QString&, bool)  override;
0040 
0041 private Q_SLOTS:
0042 
0043     void initTestCase();
0044     void cleanupTestCase();
0045 
0046     void testGraph();
0047     void testHistory();
0048 
0049 private:
0050 
0051     void rescan();
0052     void testEditing();
0053 
0054 private:
0055 
0056     QDir             collectionDir;
0057     QString          dbFile;
0058     QStringList      readOnlyImages;
0059     QList<qlonglong> ids;
0060 };
0061 
0062 #endif // DIGIKAM_DIMG_HISTORY_GRAPH_UTEST_H