importconsumer.h 810 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef IMPORTCONSUMER_H
  2. #define IMPORTCONSUMER_H
  3. #include <QtCore>
  4. #include "snccore.h"
  5. class ImportConsumer : public QThread
  6. {
  7. Q_OBJECT
  8. public:
  9. explicit ImportConsumer(QList<QStringList> *buffer,QMutex *mutex);
  10. ~ImportConsumer();
  11. void setBuildType(NumberBuildType buildType);
  12. void abort();
  13. protected:
  14. void run();
  15. private:
  16. QStringList extractFromLine(QString line);
  17. bool checkLine(QString line);
  18. signals:
  19. void childTaskFinished(QStringList segments,QList<QStringList> numberslist);
  20. void threadDestroy();
  21. void bufferTaked();
  22. public slots:
  23. private:
  24. QList<QStringList> *buffer;
  25. QStringList segments;
  26. QList<QStringList> numbers;
  27. bool stop;
  28. QMutex *mutex;
  29. NumberBuildType buildType;
  30. };
  31. #endif // IMPORTCONSUMER_H