1 /* ============================================================ 2 * 3 * This file is a part of digiKam project 4 * https://www.digikam.org 5 * 6 * Date : 2014-10-17 7 * Description : test for implementation of ditemslist api 8 * 9 * Copyright (C) 2011-2012 by A Janardhan Reddy <annapareddyjanardhanreddy at gmail dot com> 10 * Copyright (C) 2011-2021 by Gilles Caulier <caulier dot gilles at gmail dot com> 11 * 12 * This program is free software; you can redistribute it 13 * and/or modify it under the terms of the GNU General 14 * Public License as published by the Free Software Foundation; 15 * either version 2, or (at your option) 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_DITEMS_LIST_GUI_H 25 #define DIGIKAM_DITEMS_LIST_GUI_H 26 27 // Qt includes 28 29 #include <QUrl> 30 #include <QDialog> 31 32 // Local includes 33 34 #include "actionthreadbase.h" 35 36 using namespace Digikam; 37 38 class ActionThread : public ActionThreadBase 39 { 40 Q_OBJECT 41 42 public: 43 44 explicit ActionThread(QObject* const parent); 45 ~ActionThread() override; 46 47 void rotate(const QList<QUrl>& list); 48 49 Q_SIGNALS: 50 51 void starting(const QUrl& url); 52 void finished(const QUrl& url); 53 void failed(const QUrl& url, const QString& err); 54 void progress(const QUrl& url, int percent); 55 56 private Q_SLOTS: 57 58 void slotJobDone(); 59 void slotJobProgress(int); 60 void slotJobStarted(); 61 }; 62 63 // ----------------------------------------------------- 64 65 class DItemsListTest : public QDialog 66 { 67 Q_OBJECT 68 69 public: 70 71 explicit DItemsListTest(QWidget* const parent = nullptr); 72 ~DItemsListTest() override; 73 74 private Q_SLOTS: 75 76 void slotStart(); 77 void slotStarting(const QUrl&); 78 void slotFinished(const QUrl&); 79 void slotFailed(const QUrl&, const QString&); 80 81 private: 82 83 class Private; 84 Private* const d; 85 }; 86 87 #endif // DIGIKAM_DITEMS_LIST_TEST_H 88