1 #ifndef CCTWINTVECTOR3DPROPERTY_H
2 #define CCTWINTVECTOR3DPROPERTY_H
5 #include "qcepproperty.h"
13 explicit CctwIntVector3DProperty(QcepSettingsSaverWPtr saver, QObject *parent,
const char *name,
int x,
int y,
int z, QString toolTip);
24 void linkTo(QSpinBox *xSpinBox, QSpinBox *ySpinBox, QSpinBox *zSpinBox);
25 void linkTo(
int axis, QSpinBox *spinBox);
65 #define CCTW_INTVECTOR3D_PROPERTY(propname) \
67 CctwIntVector3D get_##propname() const \
69 return m_##propname.value(); \
72 void set_##propname(CctwIntVector3D val) \
74 m_##propname.setValue(val); \
77 CctwIntVector3D def_##propname() const \
79 return m_##propname.defaultValue(); \
82 void setdef_##propname(CctwIntVector3D val) \
84 m_##propname.setDefaultValue(val); \
87 void reset_##propname() \
89 m_##propname.resetValue(); \
92 CctwIntVector3DProperty *prop_##propname() { \
93 return &m_##propname; \
97 CctwIntVector3DProperty m_##propname;
99 #ifndef QT_NO_DATASTREAM
106 #endif // CCTWINTVECTOR3DPROPERTY_H
QDataStream & operator<<(QDataStream &stream, const CctwIntVector3D &vec)
QDataStream & operator>>(QDataStream &stream, CctwIntVector3D &vec)
CctwIntVector3DPropertySpinBoxHelper(QSpinBox *spinBox, CctwIntVector3DProperty *property, int axis)
static void registerMetaTypes()
int subValue(int axis) const
void setSubValue(int axis, int value, int index)
void valueChanged(CctwIntVector3D val, int index)
void incValue(CctwIntVector3D step)
void subValueChanged(int axis, int val, int index)
static void fromScriptValue(const QScriptValue &obj, CctwIntVector3D &vec)
void setSubValue(int axis, int value, int index)
CctwIntVector3D value() const
void setValue(CctwIntVector3D val, int index)
void setDefaultValue(CctwIntVector3D val)
void subValueChanged(int axis, int value, int index)
static QScriptValue toScriptValue(QScriptEngine *engine, const CctwIntVector3D &vec)
CctwIntVector3D m_Default
CctwIntVector3DProperty(QcepSettingsSaverWPtr saver, QObject *parent, const char *name, CctwIntVector3D value, QString toolTip)
CctwIntVector3DProperty * m_Property
QString toString(const CctwIntVector3D &mat)
CctwIntVector3D defaultValue() const
void linkTo(QSpinBox *xSpinBox, QSpinBox *ySpinBox, QSpinBox *zSpinBox)