logthread.h 513 B

123456789101112131415161718192021222324252627282930
  1. #ifndef LOGTHREAD_H
  2. #define LOGTHREAD_H
  3. #include <QThread>
  4. #include <QStringList>
  5. #include <QDate>
  6. #include <QDir>
  7. #include <QFile>
  8. class LogThread : public QThread
  9. {
  10. Q_OBJECT
  11. public:
  12. explicit LogThread(QObject *parent = nullptr);
  13. void appendData(QString data);
  14. void appendWrongData(QString data);
  15. void run();
  16. void stop();
  17. signals:
  18. public slots:
  19. private:
  20. QFile *file,*wfile;
  21. QStringList dataList;
  22. QStringList wrongList;
  23. int day;
  24. bool keep;
  25. };
  26. #endif // LOGTHREAD_H