NemoInterface.h 670 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 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
#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);

  void start();
  void stop();

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

  NemoStatus status();
  QVector<int> progress();

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

private:
  PImpl pImpl;
};