#ifndef RECORD_LOOP_H #define RECORD_LOOP_H // This file is part of JustMotion. // JustMotion is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // JustMotion is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #include "common.h" class RecordLoop : public QProcess { Q_OBJECT private slots: void init(); void resetTime(); void mkdirs(); private: shared_t *shared; QTimer *checkTimer; QTimer *mkdirTimer; bool sync; QString camCmdFromConf(); QString nearest15mins(QString &sec); public slots: void restart(); void synced(); public: explicit RecordLoop(shared_t *shared, QThread *thr, QObject *parent = nullptr); ~RecordLoop(); QString statusLine(); }; #endif // RECORD_LOOP_H