Source

kinect-playground / hidecam2 / workerthread.cpp

Full commit
#include "workerthread.h"

WorkerThread::WorkerThread(QObject *parent) :
    QThread(parent)
{
    kbinding = new KinectBinding();
}

void WorkerThread::run()
{
    this->running = true;
    while (this->running){
     //   qDebug() << "worker thread runs";
        kbinding->loop_step();
        emit ImageChanged(kbinding->img);
        sleep(0.5);


    }
    // do cleanup stuff
}

void WorkerThread::stop()
{
    this->running = false;
}