NemoInterface.h 711 Bytes
Newer Older
Valentin Platzgummer's avatar
Valentin Platzgummer committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
#pragma once

#include <QGeoCoordinate>
#include <QObject>

#include "SnakeTilesLocal.h"

#include <memory>

class NemoInterface : public QObject {
  Q_OBJECT
  class Impl;
  using PImpl = std::unique_ptr<Impl>;

public:
  enum class NemoStatus {
    NotConnected = 0,
    Connected = 1,
    Timeout = -1,
    InvalidHeartbeat = -2
  };

  explicit NemoInterface(QObject *parent = nullptr);
Valentin Platzgummer's avatar
Valentin Platzgummer committed
24
  ~NemoInterface() override;
Valentin Platzgummer's avatar
Valentin Platzgummer committed
25 26 27 28 29 30 31

  void start();
  void stop();

  void setTilesENU(const SnakeTilesLocal &tilesENU);
  void setENUOrigin(const QGeoCoordinate &ENUOrigin);

Valentin Platzgummer's avatar
Valentin Platzgummer committed
32 33
  NemoStatus status() const;
  QVector<int> progress() const;
Valentin Platzgummer's avatar
Valentin Platzgummer committed
34 35 36 37 38 39 40 41

signals:
  void statusChanged();
  void progressChanged();

private:
  PImpl pImpl;
};