cutter/src/webserverthread.h
ballessay 1f36c55f6a fixes some problems with WebServerThrad
- use -h& command so the thread does end
- set the QRCore in the constructor
- try to disable the websever with =h-
2017-04-01 03:50:14 +02:00

34 lines
513 B
C++

#ifndef WEBSERVERTHREAD_H
#define WEBSERVERTHREAD_H
#include <QThread>
#include <QMutex>
class QRCore;
class WebServerThread : public QThread
{
Q_OBJECT
public:
explicit WebServerThread(QRCore *core, QObject *parent = 0);
~WebServerThread();
void startServer();
void stopServer();
bool isStarted() const;
private:
void run();
using QThread::start;
void toggleWebServer();
mutable QMutex mutex;
QRCore *core;
bool started;
};
#endif // WEBSERVERTHREAD_H