1 /* 2 * SPDX-FileCopyrightText: 2011 Matthias Fuchs <mat69@gmx.net> 3 * 4 * SPDX-License-Identifier: GPL-2.0-or-later 5 */ 6 7 #ifndef CHECK_NEW_STRIPS_H 8 #define CHECK_NEW_STRIPS_H 9 10 #include <Plasma/DataEngine> 11 12 /** 13 * This class searches for the newest comic strips of predefined comics in a defined interval. 14 * Once found it emits lastStrip 15 */ 16 class CheckNewStrips : public QObject 17 { 18 Q_OBJECT 19 20 public: 21 CheckNewStrips(const QStringList &identifiers, Plasma::DataEngine *engine, int minutes, QObject *parent = nullptr); 22 23 Q_SIGNALS: 24 /** 25 * @param index of the identifier in identifiers 26 * @param identifier of the comic 27 * @param suffix of the last comic strip 28 * @see CheckNewStrips 29 */ 30 void lastStrip(int index, const QString &identifier, const QString &suffix); 31 32 public Q_SLOTS: 33 void dataUpdated(const QString &name, const Plasma::DataEngine::Data &data); 34 35 private Q_SLOTS: 36 void start(); 37 38 private: 39 int mMinutes; 40 int mIndex; 41 Plasma::DataEngine *mEngine; 42 const QStringList mIdentifiers; 43 }; 44 45 #endif 46