1 /* ============================================================ 2 * 3 * This file is a part of digiKam project 4 * https://www.digikam.org 5 * 6 * Date : 2010-08-01 7 * Description : a test for the DImageHistory 8 * 9 * Copyright (C) 2010 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de> 10 * 11 * This program is free software; you can redistribute it 12 * and/or modify it under the terms of the GNU General 13 * Public License as published by the Free Software Foundation; 14 * either version 2, or (at your option) 15 * any later version. 16 * 17 * This program is distributed in the hope that it will be useful, 18 * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 * GNU General Public License for more details. 21 * 22 * ============================================================ */ 23 24 #ifndef DIGIKAM_DIMG_HISTORY_GRAPH_UTEST_H 25 #define DIGIKAM_DIMG_HISTORY_GRAPH_UTEST_H 26 27 // Qt includes 28 29 #include <QTest> 30 #include <QEventLoop> 31 #include <QDir> 32 33 // Local includes 34 35 #include "dimgabstracthistory_utest.h" 36 37 class DImgHistoryGraphTest : public DImgAbstractHistoryTest 38 { 39 Q_OBJECT 40 41 public: 42 43 explicit DImgHistoryGraphTest(QObject* const parent = nullptr); 44 45 public Q_SLOTS: 46 47 void slotImageLoaded(const QString&, bool) override; 48 void slotImageSaved(const QString&, bool) override; 49 50 private Q_SLOTS: 51 52 void initTestCase(); 53 void cleanupTestCase(); 54 55 void testGraph(); 56 void testHistory(); 57 58 private: 59 60 void rescan(); 61 void testEditing(); 62 63 private: 64 65 QDir collectionDir; 66 QString dbFile; 67 QStringList readOnlyImages; 68 QList<qlonglong> ids; 69 }; 70 71 #endif // DIGIKAM_DIMG_HISTORY_GRAPH_UTEST_H 72