switched from qsettings to json added editng of actors

This commit is contained in:
2019-06-06 21:19:12 +02:00
parent b04fbfb5bc
commit df27b622a0
141 changed files with 4402 additions and 5068 deletions

42
src/broadcast.h Normal file
View File

@ -0,0 +1,42 @@
#ifndef BROADCAST_H
#define BROADCAST_H
#include <QIODevice>
#include <QObject>
#include <QString>
#include <QJsonObject>
class BroadCast: public QObject
{
Q_OBJECT
private:
static constexpr uint8_t MODE_PREPACKET = 0;
static constexpr uint8_t MODE_PACKET = 1;
QByteArray buffer_;
QIODevice* const iodevice_;
void write(const char * const buffer, const size_t length);
void write(const QByteArray& buffer);
void decode();
private slots:
void readyRead();
signals:
void gotJson(QJsonObject json);
public:
BroadCast(QIODevice* const iodevice = nullptr);
void sendJson(const QJsonObject& json);
};
#endif // BROADCAST_H