forked from bnufree/Hq
-
Notifications
You must be signed in to change notification settings - Fork 1
/
qeastmoneyblockthread.h
55 lines (46 loc) · 1.43 KB
/
qeastmoneyblockthread.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#ifndef QEASTMONEYBLOCKTHREAD_H
#define QEASTMONEYBLOCKTHREAD_H
#include <QThread>
#include <QMap>
#include <QList>
#include "blockdata.h"
typedef enum enBlockType
{
BLOCK_DISTRICT = 1 ,
BLOCK_INDUSTORY,
BLOCK_CONCEPT,
}BLOCK_OPT_TYPE;
typedef enum enBlockDisplayRule
{
BLOCK_DISPLAY_SORT_NONE = 0,
BLOCK_DISPLAY_SORT_DESCEND,
BLOCK_DISPLAY_SORT_ASCEND
}BLOCK_DISPLAY_RULE;
typedef QList<BlockData> BlockDataList;
class QEastMoneyBlockThread : public QObject
{
Q_OBJECT
public:
explicit QEastMoneyBlockThread(int pBlockID, QObject *parent = 0);
~QEastMoneyBlockThread();
void setSortRule(BLOCK_DISPLAY_RULE rule);
void reverseSortRule();
signals:
void sendBlockDataList(int type, const BlockDataList& list);
void sendStkinfoUpdateProgress(int cur, int total);
void signalUpdateMsg(const QString& msg);
void start();
public slots:
void slotUpdateBlockShare();
void slotUpdateBlockInfos();
void slotUpdateBlockShareCodeList(const QString& pBlockCode, const QStringList& pShareCodesList);
void slotBlockShareThreadFinished();
private:
int mSortRule;
int mBlockType;
QMap<QString,BlockData> mBlockDataList;
QList<QThread*> mWorkThreadList;
QMap<int, BlockDataList> mBlockRealInfo;
QThread mWorkthread;
};
#endif // QEASTMONEYBLOCKTHREAD_H