12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- #ifndef CLIENTWRAPPER_H
- #define CLIENTWRAPPER_H
- #include <QObject>
- #include "snakesimulatorclient.h"
- class ClientWrapper : public QObject
- {
- Q_OBJECT
- public:
- ClientWrapper(snakesimulator::SnakeSimulatorClient* client) :
- m_client(client){}
- Q_INVOKABLE void setSpeed(int speed) {
- m_client->setSpeed({(QtProtobuf::uint32)speed, nullptr});
- }
- private:
- snakesimulator::SnakeSimulatorClient* m_client;
- };
- #endif
|