forked from bnufree/Hq
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
810 additions
and
755 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#include "qeastmoneyblockmangagerthread.h" | ||
#include <QDebug> | ||
|
||
QEastMoneyBlockMangagerThread::QEastMoneyBlockMangagerThread(QObject *parent) : QThread(parent) | ||
{ | ||
mCurBlockType = 2; | ||
//this->moveToThread(&mWorkThread); | ||
//connect(this, SIGNAL(signalReceiveBlockDataList(int,BlockDataList)), this,SLOT(slotReceiveBlockDataList(int,BlockDataList)), Qt::QueuedConnection); | ||
} | ||
|
||
QEastMoneyBlockMangagerThread::~QEastMoneyBlockMangagerThread() | ||
{ | ||
|
||
} | ||
|
||
void QEastMoneyBlockMangagerThread::run() | ||
{ | ||
//创建板块线程,开始更新板块信息 | ||
for(int i= 1; i<=3; i++) | ||
{ | ||
QEastMoneyBlockThread *hy = new QEastMoneyBlockThread(i); | ||
connect(hy, SIGNAL(sendBlockDataList(int,BlockDataList)), this, SLOT(slotReceiveBlockDataList(int,BlockDataList))); | ||
mWorkThreadList.append(hy); | ||
emit hy->start(); | ||
} | ||
while (1) { | ||
emit signalBlockDataListUpdated(mBlockDataMapList[mCurBlockType]); | ||
sleep(3); | ||
} | ||
|
||
} | ||
|
||
void QEastMoneyBlockMangagerThread::setCurBlockType(int type) | ||
{ | ||
mCurBlockType = type; | ||
} | ||
|
||
void QEastMoneyBlockMangagerThread::slotReceiveBlockDataList(int type, const BlockDataList &list) | ||
{ | ||
qDebug()<<__FUNCTION__<<__LINE__; | ||
mBlockDataMapList[type] = list; | ||
} | ||
|
||
void QEastMoneyBlockMangagerThread::reverseSortRule() | ||
{ | ||
foreach (QEastMoneyBlockThread *t, mWorkThreadList) { | ||
t->reverseSortRule(); | ||
} | ||
} | ||
|
Oops, something went wrong.