#ifndef DRONE_CONTROLLER_HH #define DRONE_CONTROLLER_HH #include #include #include struct Waypoint { int frame; QVector3D pos; Waypoint(unsigned frame, QVector3D pos); Waypoint(const QJsonObject &json); }; class Drone { QVector waypoints; public: Drone(const QJsonObject &json); const QVector getWaypoints() const; }; class DroneController : public QObject { Q_OBJECT int framerate; int frame = 0; int duration = 0; QVector drones; QTimer timer; bool paused = true; public: DroneController(const QJsonObject &json); ~DroneController(); int getDuration() const; signals: void frameChanged(int frame); void playing(); void pausing(); private slots: void step(); public slots: void play(); void pause(); void suspend(); void resume(); void seek(int frame); }; #endif