You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
418 B
29 lines
418 B
|
3 years ago
|
#ifndef APPLIVE_H
|
||
|
|
#define APPLIVE_H
|
||
|
|
|
||
|
|
#include <QObject>
|
||
|
|
|
||
|
|
class QUdpSocket;
|
||
|
|
|
||
|
|
class AppLive : public QObject
|
||
|
|
{
|
||
|
|
Q_OBJECT
|
||
|
|
public:
|
||
|
|
static AppLive *Instance();
|
||
|
|
explicit AppLive(QObject *parent = 0);
|
||
|
|
|
||
|
|
private:
|
||
|
|
static QScopedPointer<AppLive> self;
|
||
|
|
QUdpSocket *udpServer;
|
||
|
|
QString appName;
|
||
|
|
|
||
|
|
private slots:
|
||
|
|
void readData();
|
||
|
|
|
||
|
|
public slots:
|
||
|
|
bool start(int port);
|
||
|
|
void stop();
|
||
|
|
};
|
||
|
|
|
||
|
|
#endif // APPLIVE_H
|