| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- #ifndef NUMBERPROCESSORPROXY_H
- #define NUMBERPROCESSORPROXY_H
- #include <QtCore>
- #include "snccore.h"
- #include "numberlistmodel.h"
- #include "numberreg.h"
- #include "SNCCore_global.h"
- class SNCCORESHARED_EXPORT NumberProcessorProxy : public QThread
- {
- Q_OBJECT
- public:
- NumberProcessorProxy(NumberListModel *oldModel);
- ~NumberProcessorProxy();
- void setProcessType(NumberProcessType processType);
- void setBlackList(NumberListModel *blackListModel);
- void abort();
- signals:
- void progressMaxUpdated(int max);
- void progressUpdated(int i);
- void numberProcessed(NumberListModel *newModel);
- private:
- void sort();
- void removeDuplicate();
- void removeNotPhone();
- void removeBlackList();
- QStringList filterNumbers(QStringList source,QStringList filter);
- protected:
- void run();
- private:
- int counter;
- int optimizeMaxProgress;
- int step1Progress;
- int step2Progress;
- bool stop;
- NumberProcessType processType;
- QStringList segments;
- QList<QStringList> numbers;
- NumberListModel *oldModel;
- NumberListModel *newModel;
- NumberListModel *blackListModel;
- QMutex *mutex2;
- public slots:
- void onOptimizeProgressMaxUpdated(int max);
- void onOptimizeProgressCurrentUpdated(int current);
- };
- #endif // NUMBERPROCESSORPROXY_H
|