53 settings->beginGroup(name);
54 settings->setValue(
"index",
index());
55 settings->setValue(
"h",
h());
56 settings->setValue(
"k",
k());
57 settings->setValue(
"l",
l());
58 settings->setValue(
"n",
n());
59 settings->setValue(
"d",
d());
60 settings->setValue(
"tth",
tth());
74 return QObject::tr(
"{index:%1, h:%2, k:%3, l:%4, n:%5, d:%6, tth:%7}")
75 .arg(
index()).arg(
h()).arg(
k()).arg(
l()).arg(
n()).arg(
d()).arg(
tth());
80 qRegisterMetaType<QxrdCalibrantDSpacing>(
"QxrdCalibrantDSpacing");
82 qRegisterMetaTypeStreamOperators<QxrdCalibrantDSpacing>(
"QxrdCalibrantDSpacing");
89 QScriptValue obj = engine->newObject();
91 obj.setProperty(
"index", spc.
index());
92 obj.setProperty(
"h", spc.
h());
93 obj.setProperty(
"k", spc.
k());
94 obj.setProperty(
"l", spc.
l());
95 obj.setProperty(
"n", spc.
n());
96 obj.setProperty(
"d", spc.
d());
97 obj.setProperty(
"tth", spc.
tth());
104 spc.
index() = obj.property(
"index").toInteger();
105 spc.
h() = obj.property(
"h").toInteger();
106 spc.
k() = obj.property(
"k").toInteger();
107 spc.
l() = obj.property(
"l").toInteger();
108 spc.
n() = obj.property(
"n").toInteger();
109 spc.
d() = obj.property(
"d").toNumber();
110 spc.
tth() = obj.property(
"tth").toNumber();
113 #ifndef QT_NO_DATASTREAM
117 stream << pt.
index() << pt.
h() << pt.
k() << pt.
l() << pt.
n() << pt.
d() << pt.
tth();
124 stream >> pt.
index() >> pt.
h() >> pt.
k() >> pt.
l() >> pt.
n() >> pt.
d() >> pt.
tth();
static void registerMetaTypes()
static void fromScriptValue(const QScriptValue &obj, QxrdCalibrantDSpacing &spc)
QDataStream & operator<<(QDataStream &stream, const QxrdCalibrantDSpacing &pt)
static void customSaver(const QVariant &val, QSettings *settings, QString name)
bool operator!=(const QxrdCalibrantDSpacing &spc) const
void setSettingsValue(QSettings *settings, QString name)
static QScriptValue toScriptValue(QScriptEngine *engine, const QxrdCalibrantDSpacing &spc)
static void registerCustomSaver(QString typeName, CustomSettingsSaver *saver)
bool operator==(const QxrdCalibrantDSpacing &spc) const
QDataStream & operator>>(QDataStream &stream, QxrdCalibrantDSpacing &pt)