Program Listing for File DdsIdVec4dBuffer.hpp

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

#pragma once

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

class DdsIdVec4dBuffer : 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)
  Q_PROPERTY(QPointF rangeW READ rangeZ NOTIFY rangeChanged)


public:
  explicit DdsIdVec4dBuffer(QObject *parent = nullptr);
  virtual ~DdsIdVec4dBuffer();
  QPointF rangeX() const;
  QPointF rangeY() const;
  QPointF rangeZ() const;
  QPointF rangeW() 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::IdVec4d>> m_reader;
  QString m_id;

};