1 #ifndef QXRDPOWDERPOINTPROPERTY_H
2 #define QXRDPOWDERPOINTPROPERTY_H
13 explicit QxrdPowderPointProperty(
QcepSettingsSaverWPtr saver,
QcepObject *parent,
const char *name,
int n1,
int n2,
int n3,
double x,
double y,
double r1,
double r2,
double az, QString toolTip);
20 void linkTo(QSpinBox *n1SpinBox, QSpinBox *n2SpinBox, QSpinBox *n3SpinBox, QDoubleSpinBox *xSpinBox, QDoubleSpinBox *ySpinBox, QDoubleSpinBox *r1SpinBox, QDoubleSpinBox *r2SpinBox, QDoubleSpinBox *azSpinBox);
21 void linkTo(
int axis, QSpinBox *spinBox);
22 void linkTo(
int axis, QDoubleSpinBox *spinBox);
31 void setSubValue(
int axis,
double value,
int index);
72 void setSubValue(
int axis,
double value,
int index);
113 #define QXRD_POWDERPOINT_PROPERTY(propname) \
115 QxrdPowderPoint get_##propname() const \
117 return m_##propname.value(); \
120 void set_##propname(QxrdPowderPoint val) \
122 m_##propname.setValue(val); \
125 QxrdPowderPoint def_##propname() const \
127 return m_##propname.defaultValue(); \
130 void setdef_##propname(QxrdPowderPoint val) \
132 m_##propname.setDefaultValue(val); \
135 void reset_##propname() \
137 m_##propname.resetValue(); \
140 QxrdPowderPointProperty *prop_##propname() { \
141 return &m_##propname; \
145 QxrdPowderPointProperty m_##propname;
147 #define QXRD_POWDERPOINTVECTOR_PROPERTY(propname) \
149 QxrdPowderPointVector get_##propname() const \
151 return m_##propname.value(); \
154 void set_##propname(QxrdPowderPointVector val) \
156 m_##propname.setValue(val); \
159 QxrdPowderPointVector def_##propname() const \
161 return m_##propname.defaultValue(); \
164 void setdef_##propname(QxrdPowderPointVector val) \
166 m_##propname.setDefaultValue(val); \
169 void reset_##propname() \
171 m_##propname.resetValue(); \
174 QxrdPowderPointVectorProperty *prop_##propname() { \
175 return &m_##propname; \
179 QxrdPowderPointVectorProperty m_##propname;
181 #endif // QXRDPOWDERPOINTPROPERTY_H
void appendValue(QxrdPowderPoint val)
void subValueChanged(int axis, double value, int index)
void setSubValue(int axis, int value, int index)
double subValue(int axis) const
void subValueChanged(int axis, int value, int index)
QxrdPowderPoint value() const
QxrdPowderPointPropertySpinBoxHelper(QSpinBox *spinBox, QxrdPowderPointProperty *property, int axis)
QDoubleSpinBox * m_DoubleSpinBox
QString toString(const QxrdPowderPoint &pt)
QString toString(const QxrdPowderPointVector &vec)
QxrdPowderPointVector defaultValue() const
QxrdPowderPointProperty * m_Property
void valueChanged(QxrdPowderPointVector val, int index)
void subValueChanged(int axis, int val, int index)
QxrdPowderPointVector value() const
void setValue(QxrdPowderPointVector val, int index)
void linkTo(QSpinBox *n1SpinBox, QSpinBox *n2SpinBox, QSpinBox *n3SpinBox, QDoubleSpinBox *xSpinBox, QDoubleSpinBox *ySpinBox, QDoubleSpinBox *r1SpinBox, QDoubleSpinBox *r2SpinBox, QDoubleSpinBox *azSpinBox)
QxrdPowderPoint m_Default
void valueChanged(QxrdPowderPoint val, int index)
QxrdPowderPointVector m_Default
QxrdPowderPointVectorProperty(QcepSettingsSaverWPtr saver, QcepObject *parent, const char *name, QxrdPowderPointVector value, QString toolTip)
QxrdPowderPointPropertyDoubleSpinBoxHelper(QDoubleSpinBox *spinBox, QxrdPowderPointProperty *property, int axis)
QxrdPowderPointProperty(QcepSettingsSaverWPtr saver, QcepObject *parent, const char *name, QxrdPowderPoint value, QString toolTip)
QxrdPowderPoint defaultValue() const
void setDefaultValue(QxrdPowderPointVector val)
void setValue(double value)
void setValue(QxrdPowderPoint val, int index)
void setSubValue(int axis, double value, int index)
QxrdPowderPointProperty * m_Property
void setSubValue(int axis, int value, int index)
void setDefaultValue(QxrdPowderPoint val)
QWeakPointer< QcepSettingsSaver > QcepSettingsSaverWPtr
QxrdPowderPointVector m_Value