5 #include <QScriptEngine>
18 int n1,
int n2,
int n3,
double x,
double y,
double r1,
double r2,
double az,
79 printMessage(tr(
"%1 QxrdPowderPointProperty::setValue(CctwDoubleVector3D %2, int %3) [%4]")
83 if (index == this->
index()) {
90 if (index == this->
index()) {
97 if (index == this->
index()) {
216 QString res = tr(
"[ %1 %2 %3 %4 %5 %6 %7 %8 ]").arg(val.
n1()).arg(val.
n2()).arg(val.
n3()).arg(val.
x()).arg(val.
y()).arg(val.
r1()).arg(val.
r2()).arg(val.
az());
226 printMessage(tr(
"%1 QxrdPowderPointProperty::setValue(QxrdPowderPoint %2)")
234 printMessage(tr(
"%1: QxrdPowderPointProperty::setValue(QxrdPowderPoint %2) [%3]")
275 saver->changed(
this);
301 QDoubleSpinBox *xSpinBox,
302 QDoubleSpinBox *ySpinBox,
303 QDoubleSpinBox *r1SpinBox,
304 QDoubleSpinBox *r2SpinBox,
305 QDoubleSpinBox *azSpinBox)
344 if (axis>=0 && axis<=2) {
348 helper->moveToThread(spinBox->thread());
352 spinBox -> setKeyboardTracking(
false);
367 if (axis>=3 && axis<=7) {
371 helper->moveToThread(spinBox->thread());
375 spinBox -> setKeyboardTracking(
false);
390 m_Property(property),
406 bool block =
m_SpinBox->blockSignals(
true);
422 m_DoubleSpinBox(spinBox),
423 m_Property(property),
476 printMessage(tr(
"%1 QxrdPowderPointVectorProperty::setValue(QxrdPowderPointVector %2, int %3) [%4]")
480 if (index == this->
index()) {
507 int ct = val.count();
509 for (
int i=0; i<ct; i++) {
511 res += tr(
"%1,\n").arg(val[i].
toString());
513 res += tr(
"%1").arg(val[i].
toString());
527 printMessage(tr(
"%1 QxrdPowderPointVectorProperty::setValue(QxrdPowderPointVector %2)")
533 printMessage(tr(
"%1: QxrdPowderPointVectorProperty::setValue(QxrdPowderPointVector %2) [%3]")
542 saver->changed(
this);
559 printMessage(tr(
"%1: QxrdPowderPointVectorProperty::resetValue").arg(
name()));
void appendValue(QxrdPowderPoint val)
qint64 qcepDebug(int cond)
void subValueChanged(int axis, double value, int index)
void setWidgetToolTip(QWidget *widget)
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
virtual void printMessage(QString msg, QDateTime dt=QDateTime::currentDateTime())
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)
QSharedPointer< QcepSettingsSaver > QcepSettingsSaverPtr
void setValue(QxrdPowderPoint val, int index)
void setSubValue(int axis, double value, int index)
#define CONNECT_CHECK(res)
QxrdPowderPointProperty * m_Property
void setSubValue(int axis, int value, int index)
void setDefaultValue(QxrdPowderPoint val)
QWeakPointer< QcepSettingsSaver > QcepSettingsSaverWPtr
QcepSettingsSaverWPtr m_Saver
QxrdPowderPointVector m_Value