| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- #ifndef FILEPREPARE_H
- #define FILEPREPARE_H
- #include <QtCore>
- #include "SNCCore_global.h"
- #define TXT_FILE_LIMIT 13 //TXT file must limit 13M
- #define ZIP_FILE_LIMIT 4 //ZIP file must limit 4M
- #define SEG_FILE_LIMIT 1 //SEG file must limit 1M
- class SNCCORESHARED_EXPORT FilePrepare
- {
- public:
- FilePrepare(QString fileName, QString fileType, bool isMulti, QString moduleID, QString clientID);
- bool prepare();
- QString getRtnMsg();
- QString getLastUploadFileName();
- int getCount();
- private:
- bool chkFileInfo();
- bool chkNumbers();
- bool extractNumberFromTxtFile(QStringList fileNames);
- bool extractSegmentFromTxtFile(QStringList fileNames);
- bool zipFile();
- bool unzipFile();
- private:
- QString oriFileName;
- QStringList txtFileNames;
- QString zipFileName;
- bool isZipFile;
- bool isMulti;
- QString fileType;
- QFileInfo fileInfo;
- QString rtnMsg;
- int count;
- QStringList numbers;
- QStringList segments;
- int minNumbers;
- int maxNumbers;
- QString moduleID;
- QString clientID;
- QString m_tempPath;
- };
- #endif // FILEPREPARE_H
|