author | unc0rr |
Thu, 22 Nov 2012 23:19:01 +0400 | |
branch | flibqtfrontend |
changeset 8094 | 6c5b4e69f03d |
parent 8092 | 08960209db8c |
child 8100 | 0e6fadf81a2c |
permissions | -rw-r--r-- |
8092 | 1 |
#include <QTimerEvent> |
2 |
||
3 |
#include "frontlibpoller.h" |
|
4 |
||
5 |
FrontLibPoller::FrontLibPoller(void (*poll)(void * data), void *data, QObject *parent) : |
|
6 |
QObject(parent) |
|
7 |
{ |
|
8 |
m_poll = poll; |
|
9 |
m_data = data; |
|
10 |
||
11 |
m_timer.start(50, this); |
|
12 |
} |
|
13 |
||
14 |
void FrontLibPoller::timerEvent(QTimerEvent *event) |
|
15 |
{ |
|
16 |
if(event->timerId() == m_timer.timerId()) |
|
17 |
m_poll(m_data); |
|
18 |
else |
|
19 |
QObject::timerEvent(event); |
|
20 |
} |