BLEProthesisInterfaceQtWorkerThread.cpp
Go to the documentation of this file.
2
4 const std::string& mac,
6 _owner{&owner}, _mac{QString::fromStdString(mac)}
7{
8}
9
11
12void
14{
15 _worker->kill();
16}
17
18void
20{
21 _worker->sendCommand(cmd);
22}
23
24void
25BLEProthesisInterfaceQtWorkerThread::run()
26{
27 _worker = new BLEProthesisInterfaceQtWorker{_mac, *_owner};
28 qDebug() << '[' << _mac << ']' << " Starting qt event loop.";
29 int r = exec();
30 if (_worker)
31 {
32 _worker->kill();
33 delete _worker;
34 }
35 qDebug() << '[' << _mac << ']' << " Sopped qt event loop -> " << r;
36}
BLEProthesisInterfaceQtWorkerThread(const std::string &mac, BLEProthesisInterface &owner)