NotifyQt::NotifyQt() : cDialog(NULL) { runningToasterTimer = new QTimer(this); connect(runningToasterTimer, SIGNAL(timeout()), this, SLOT(runningTick())); runningToasterTimer->setInterval(10); // tick 100 times a second runningToasterTimer->setSingleShot(true); }
NotifyQt::NotifyQt() : cDialog(NULL) { runningToasterTimer = new QTimer(this); connect(runningToasterTimer, SIGNAL(timeout()), this, SLOT(runningTick())); runningToasterTimer->setInterval(10); // tick 100 times a second runningToasterTimer->setSingleShot(true); { QMutexLocker m(&_mutex) ; _enabled = false ; } // register to allow sending over Qt::QueuedConnection qRegisterMetaType<ChatId>("ChatId"); qRegisterMetaType<ChatMessage>("ChatMessage"); qRegisterMetaType<RsGxsChanges>("RsGxsChanges"); qRegisterMetaType<RsGxsId>("RsGxsId"); }
virtual void onStep() { std::cout << "Tick: " << runningTick() << std::endl; boost::this_thread::sleep_for(boost::chrono::milliseconds(100)); }