Select Git revision
-
Christoph Hellwig authored
This requires nose2 and can be run using make test Signed-off-by:
Christoph Hellwig <hch@lst.de>
Christoph Hellwig authoredThis requires nose2 and can be run using make test Signed-off-by:
Christoph Hellwig <hch@lst.de>
animhandler.h 984 B
#ifndef ANIMHANDLER_H
#define ANIMHANDLER_H
#include <QThread>
#include <QDebug>
class AnimHandler: public QThread
{
Q_OBJECT
void run() override {
qDebug() << "STARTED BITCHES";
while (!exitThread) {
usleep(100);
progress++;
emit progressUpdate(progress);
}
qDebug() << "KÖRTE";
emit resultReady("ALMA");
}
private:
bool exitThread = false;
uint32_t progress = 0;
public slots:
void enableExit()
{
exitThread = true;
}
signals:
void progressUpdate(uint32_t progress);
void resultReady(const QString &result);
};
class Alma: public QObject
{
Q_OBJECT
AnimHandler* animhandler;
public:
Alma() {
animhandler = new AnimHandler;
connect(this, &Alma::exit, animhandler, &AnimHandler::enableExit);
animhandler->start();
emit exit();
}
~Alma() {
}
signals:
void exit();
};
#endif // ANIMHANDLER_H