4 #ifndef pqVectorWidget_h 5 #define pqVectorWidget_h 20 Q_PROPERTY(QVariant value READ value USER
true);
29 const QVariant&
value()
const {
return this->Vector; }
35 void valueChanged(
const QVariant&);
43 virtual void setValue(
int index,
float value) = 0;
52 void CreateUI(
unsigned int nbElem);
53 virtual float getValue(
int index) = 0;
63 template <
class T,
unsigned int S>
74 T
value()
const {
return this->Vector.template value<T>(); }
78 T vec = this->Vector.template value<T>();
80 this->Vector = QVariant::fromValue(vec);
81 Q_EMIT this->valueChanged(this->Vector);
85 float getValue(
int index)
override {
return this->Vector.template value<T>()[index]; }