importfile.h 973 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #ifndef IMPORTFILE_H
  2. #define IMPORTFILE_H
  3. #include <QtCore>
  4. #include "numberlistmodel.h"
  5. #include "snccore.h"
  6. #include "SNCCore_global.h"
  7. #include <QThread>
  8. class ImportFile : public QThread
  9. {
  10. Q_OBJECT
  11. public:
  12. explicit ImportFile(NumberListModel *oldModel);
  13. ~ImportFile();
  14. void setFileList(QStringList list);
  15. void setBuildType(NumberBuildType buildType);
  16. void abort();
  17. signals:
  18. void progressMaxUpdated(int max);
  19. void progressUpdated(int i);
  20. void numberBuilt(NumberListModel *newModel);
  21. protected:
  22. void run();
  23. private:
  24. void appendModel();
  25. void setFetchMaxSize();
  26. private:
  27. bool stop;
  28. QStringList fileList;
  29. QStringList segments;
  30. QList<QStringList> numbers;
  31. NumberListModel *oldModel;
  32. NumberListModel *newModel;
  33. int all_file_size;
  34. int current_file_size;
  35. int step1Progress;
  36. int step2Progress;
  37. public slots:
  38. };
  39. #endif // IMPORTFILE_H