5 settings->beginWriteArray(name, count());
7 for (
int i=0; i<count(); i++) {
8 settings->setArrayIndex(i);
10 settings->setValue(
"index", pt.
index());
11 settings->setValue(
"h", pt.
h());
12 settings->setValue(
"k", pt.
k());
13 settings->setValue(
"l", pt.
l());
14 settings->setValue(
"d", pt.
d());
15 settings->setValue(
"tth", pt.
tth());
32 for (
int i=0; i<count(); i++) {
37 res += at(i).toString();
47 qRegisterMetaType< QxrdCalibrantDSpacings >(
"QxrdCalibrantDSpacingVector");
49 qRegisterMetaTypeStreamOperators< QxrdCalibrantDSpacings >(
"QxrdCalibrantDSpacingVector");
58 for (
int i=0; i<n; i++) {
80 while (a.count() > 0 || b.count() > 0) {
81 if (a.count() > 0 && b.count() > 0) {
82 if (a.first().d() > b.first().d()) {
83 append(a.takeFirst());
85 append(b.takeFirst());
87 }
else if (a.count() > 0) {
88 append(a.takeFirst());
89 }
else if (b.count() > 0) {
90 append(b.takeFirst());
99 if (n >= 0 && n < count()) {
108 double res = qQNaN();
110 if (n >= 0 && n < count()) {
111 res = value(n).tth();
void setSettingsValue(QSettings *settings, QString name)
static void registerMetaTypes()
void insertUnique(int index, int h, int k, int l, double d, double tth)
double calibrantDSpacing(int n)
double calibrantTTH(int n)
static void registerCustomSaver(QString typeName, CustomSettingsSaver *saver)
static void customSaver(const QVariant &val, QSettings *settings, QString name)
void merge(const QxrdCalibrantDSpacings &vec)