File indexing completed on 2024-05-05 17:33:56
0001 /* 0002 * SPDX-FileCopyrightText: 2011 Matthias Fuchs <mat69@gmx.net> 0003 * SPDX-FileCopyrightText: 2022 Alexander Lohnau <alexander.lohnau@gmx.de> 0004 * 0005 * SPDX-License-Identifier: GPL-2.0-or-later 0006 */ 0007 0008 #ifndef CHECK_NEW_STRIPS_H 0009 #define CHECK_NEW_STRIPS_H 0010 0011 #include "engine/comic.h" 0012 0013 /** 0014 * This class searches for the newest comic strips of predefined comics in a defined interval. 0015 * Once found it emits lastStrip 0016 */ 0017 class CheckNewStrips : public QObject 0018 { 0019 Q_OBJECT 0020 0021 public: 0022 CheckNewStrips(const QStringList &identifiers, ComicEngine *engine, int minutes, QObject *parent = nullptr); 0023 0024 Q_SIGNALS: 0025 /** 0026 * @param index of the identifier in identifiers 0027 * @param identifier of the comic 0028 * @param suffix of the last comic strip 0029 * @see CheckNewStrips 0030 */ 0031 void lastStrip(int index, const QString &identifier, const QString &suffix); 0032 0033 private Q_SLOTS: 0034 void start(); 0035 0036 private: 0037 void dataUpdated(const ComicMetaData &data); 0038 int mMinutes; 0039 int mIndex; 0040 ComicEngine *mEngine; 0041 const QStringList mIdentifiers; 0042 }; 0043 0044 #endif