numberexport.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #ifndef NUMBEREXPORT_H
  2. #define NUMBEREXPORT_H
  3. #include <QtCore>
  4. #include "snccore.h"
  5. #include "numberreg.h"
  6. #include "numberlistmodel.h"
  7. #include "SNCCore_global.h"
  8. class SNCCORESHARED_EXPORT NumberExport : public QThread
  9. {
  10. Q_OBJECT
  11. public:
  12. NumberExport(NumberListModel *model,QString fileNamePrefix,enum NumberExportType type);
  13. ~NumberExport();
  14. void setBatchSize(int batchSize);
  15. void setCityOrProvince(bool isCity);
  16. void setGroupSate(bool isAll);
  17. void setSegment(int len);
  18. void abort();
  19. signals:
  20. void progressMaxUpdated(int max);
  21. void progressUpdated(int i);
  22. void exportFinished();
  23. protected:
  24. void run();
  25. private:
  26. void exportByAll();
  27. void exportByBatch();
  28. void exportByCorp();
  29. void exportByRegion();
  30. void exportByDuplicate();
  31. void exportBySegment();
  32. void exportBySegmentByLen(int len);
  33. // QStringList segments;
  34. // QList<QStringList> numbers;
  35. QString fileNamePrefix;
  36. int batchSize;
  37. int len;
  38. bool isAll;
  39. bool isCity;
  40. bool stop;
  41. enum NumberExportType exportType;
  42. NumberListModel *model;
  43. };
  44. #endif // NUMBEREXPORT_H