#pragma once

#include <QObject>
#include <QSharedPointer>

#include "WimaPlanData.h"

class WimaController;
class WimaPlaner;

//!
//! \brief The WimaBridge class
//!
//! A singelton bridge establishing a link between WimaController and WimaPlaner
class WimaBridge : public QObject {
  Q_OBJECT
  WimaBridge(QObject *parent = nullptr);
  WimaBridge(WimaBridge &other) = delete;
  static WimaBridge *createInstance();

public:
  ~WimaBridge();
  static WimaBridge *instance();
  const WimaPlanData &planData() const;
  const QVector<int> &progress() const;

public slots:
  void setPlanData(const WimaPlanData &planData);
  void setProgress(const QVector<int> &p);
signals:
  void planDataChanged();
  void progressChanged();

private:
  WimaPlanData planData_;
  QVector<int> progress_;
};
