32 #ifndef pqVectorWidget_h 33 #define pqVectorWidget_h 48 Q_PROPERTY(QVariant value READ value USER
true);
57 const QVariant&
value()
const {
return this->Vector; }
63 void valueChanged(
const QVariant&);
71 virtual void setValue(
int index,
float value) = 0;
80 void CreateUI(
unsigned int nbElem);
81 virtual float getValue(
int index) = 0;
91 template <
class T,
unsigned int S>
102 T
value()
const {
return this->Vector.template value<T>(); }
106 T vec = this->Vector.template value<T>();
108 this->Vector = QVariant::fromValue(vec);
109 Q_EMIT this->valueChanged(this->Vector);
113 float getValue(
int index)
override {
return this->Vector.template value<T>()[index]; }