| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- #ifndef NUMBERMOVEPROXY_H
- #define NUMBERMOVEPROXY_H
- #include <QtCore>
- #include "numberlistmodel.h"
- #include "numbermove.h"
- #include "snccore.h"
- #include "SNCCore_global.h"
- class SNCCORESHARED_EXPORT NumberMoveProxy : public QThread
- {
- Q_OBJECT
- public:
- NumberMoveProxy(NumberListModel *oldSourceModel,NumberListModel *oldDestModel);
- ~NumberMoveProxy();
- void setMoveType(NumberMoveType moveType );
- void setRange(QString range1,QString range2);
- void setRegexpList(QList<QRegExp> regexpList);
- void setBatchSize(int batchSize);
- void abort();
- signals:
- void numberMoved(NumberListModel *newSourceModel,NumberListModel *newDestModel);
- void progressMaxUpdated(int max);
- void progressUpdated(int i);
- protected:
- void run();
- private:
- void appendModel();
- void importBlackList();
- void updateProgress();
- private:
- int counter;
- int progress;
- int batchSize;
- bool stop;
- QMutex mutex;
- QStringList sourceSegments;
- QList<QStringList> sourceNumbers;
- QStringList destSegments;
- QList<QStringList> destNumbers;
- NumberListModel *oldSourceModel;
- NumberListModel *oldDestModel;
- NumberListModel *newSourceModel;
- NumberListModel *newDestModel;
- NumberMoveType moveType;
- QString range1;
- QString range2;
- int step1Progress;
- int step2Progress;
- int groups;
- bool threadCreated;
- QList<QRegExp> regexpList;
- public slots:
- void onChildTaskFinished(QStringList sourceSegments,QList<QStringList> sourceNumbers,
- QStringList destSegments,QList<QStringList> destNumbers);
- };
- #endif // NUMBERMOVEPROXY_H
|