File indexing completed on 2025-01-05 03:58:03
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 <user dot wiesweg at gmx dot de> 0010 * 0011 * SPDX-License-Identifier: GPL-2.0-or-later 0012 * 0013 * ============================================================ */ 0014 0015 #ifndef DIGIKAM_DIMG_ABSTRACT_HISTORY_UTEST_H 0016 #define DIGIKAM_DIMG_ABSTRACT_HISTORY_UTEST_H 0017 0018 // Qt includes 0019 0020 #include <QEventLoop> 0021 0022 // Local includes 0023 0024 #include "dimagehistory.h" 0025 #include "editorcore.h" 0026 0027 using namespace Digikam; 0028 0029 QDebug operator<<(QDebug dbg, const HistoryImageId& id); 0030 0031 class DImgAbstractHistoryTest : public QObject 0032 { 0033 Q_OBJECT 0034 0035 public: 0036 0037 explicit DImgAbstractHistoryTest(QObject* const parent = nullptr); 0038 0039 HistoryImageId id1() const; 0040 HistoryImageId id2() const; 0041 HistoryImageId id3() const; 0042 HistoryImageId id4() const; 0043 0044 FilterAction action1() const; 0045 FilterAction action2() const; 0046 0047 DImageHistory history1() const; 0048 0049 void applyFilters1(); 0050 void applyFilters2(); 0051 void applyFilters3(); 0052 void applyFilters4(); 0053 0054 QString tempFileName(const QString& purpose) const; 0055 QString tempFilePath(const QString& purpose) const; 0056 0057 static QString imagePath(); 0058 0059 public Q_SLOTS: 0060 0061 virtual void slotImageLoaded(const QString&, bool); 0062 virtual void slotImageSaved(const QString&, bool); 0063 0064 protected: 0065 0066 void initBaseTestCase(); 0067 void cleanupBaseTestCase(); 0068 0069 protected: 0070 0071 QEventLoop m_loop; 0072 EditorCore* m_im; 0073 QString m_tempFile; 0074 }; 0075 0076 #endif // DIGIKAM_DIMG_ABSTRACT_HISTORY_UTEST_H