Program Listing for File DdsIdVec3dBuffer.hpp

Return to documentation for file (sinspekto/DdsIdVec3dBuffer.hpp)

#pragma once

#include "sinspekto/QtToDds.hpp"
#include "sinspekto/DdsBuffer.hpp"

class DdsIdVec3dBuffer : public DdsBuffer
{
  Q_OBJECT
  Q_PROPERTY(QPointF rangeX READ rangeX NOTIFY rangeChanged)
  Q_PROPERTY(QPointF rangeY READ rangeY NOTIFY rangeChanged)
  Q_PROPERTY(QPointF rangeZ READ rangeZ NOTIFY rangeChanged)


public:
  explicit DdsIdVec3dBuffer(QObject *parent = nullptr);
  virtual ~DdsIdVec3dBuffer();
  QPointF rangeX() const;
  QPointF rangeY() const;
  QPointF rangeZ() const;
  Q_INVOKABLE void init(
      QtToDds* dds,
      const QString& topic,
      const QString& id,
      int buffer_size,
      bool with_listener=true);

signals:
  void rangeChanged(QPointF range, qml_enums::DimId dim);
  void eventHeard();
  void newData();

public slots:
  virtual void updateBuffers();

private:
  std::unique_ptr<sinspekto::Reader<fkin::IdVec3d>> m_reader;
  QString m_id;

};