24 #ifndef PD_SCALARVARIANT_H 25 #define PD_SCALARVARIANT_H 27 #include <QtPdCom1/ScalarSubscriber.h> 28 #include <QtPdCom1/Process.h> 30 #include <QScopedPointer> 37 class ScalarVariantPrivate;
46 public QObject,
public QtPdCom::ScalarSubscriber
49 Q_PROPERTY(QString path READ getPath WRITE setPath NOTIFY pathChanged)
59 Q_PROPERTY(QVariant connection READ getConnection WRITE setConnection NOTIFY connectionUpdated)
62 Q_PROPERTY(
bool connected READ getDataPresent NOTIFY dataPresentChanged)
64 Q_PROPERTY(QVariant value READ getValue WRITE setValue NOTIFY valueChanged)
65 Q_PROPERTY(
double mtime READ getMTimeToDouble NOTIFY valueUpdated)
70 QString getPath() const;
71 Q_INVOKABLE
bool getDataPresent() const;
72 QVariant getConnection() const;
75 Q_INVOKABLE
bool hasData() const;
76 QtPdCom::Process *getProcess() const;
78 void setPath(QString);
79 void setConnection(QVariant);
81 void setProcess(QtPdCom::Process *);
82 QVariant getValue() const;
83 Q_INVOKABLE
void setValue(QVariant);
84 std::chrono::nanoseconds getMTime() const;
85 double getMTimeToDouble() const;
86 Q_INVOKABLE
void inc();
90 QScopedPointer<ScalarVariantPrivate> const d_ptr;
95 void newValues(std::chrono::nanoseconds);
100 void processConnected();
101 void processDisconnected();
105 void valueChanged(QVariant);
107 void valueUpdated(
double);
109 void pathChanged(QString &);
110 void dataPresentChanged(
bool);
111 void connectionUpdated();