QXRD  0.11.16
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
QxrdCalibrantDSpacing Class Reference

#include <qxrdcalibrantdspacing.h>

Public Member Functions

 QxrdCalibrantDSpacing (int calIndex, int h, int k, int l, int n, double d, double tth)
 
 QxrdCalibrantDSpacing (const QxrdCalibrantDSpacing &spc)
 
 QxrdCalibrantDSpacing ()
 
int index () const
 
int h () const
 
int k () const
 
int l () const
 
int n () const
 
double d () const
 
double tth () const
 
int & index ()
 
int & h ()
 
int & k ()
 
int & l ()
 
int & n ()
 
double & d ()
 
double & tth ()
 
bool operator== (const QxrdCalibrantDSpacing &spc) const
 
bool operator!= (const QxrdCalibrantDSpacing &spc) const
 
void setSettingsValue (QSettings *settings, QString name)
 
bool isValid () const
 
QString toString () const
 

Static Public Member Functions

static void customSaver (const QVariant &val, QSettings *settings, QString name)
 
static void registerMetaTypes ()
 
static QScriptValue toScriptValue (QScriptEngine *engine, const QxrdCalibrantDSpacing &spc)
 
static void fromScriptValue (const QScriptValue &obj, QxrdCalibrantDSpacing &spc)
 

Private Attributes

int m_Index
 
int m_H
 
int m_K
 
int m_L
 
int m_N
 
double m_D
 
double m_TTH
 

Detailed Description

Definition at line 10 of file qxrdcalibrantdspacing.h.

Constructor & Destructor Documentation

QxrdCalibrantDSpacing::QxrdCalibrantDSpacing ( int  calIndex,
int  h,
int  k,
int  l,
int  n,
double  d,
double  tth 
)
QxrdCalibrantDSpacing::QxrdCalibrantDSpacing ( const QxrdCalibrantDSpacing spc)
QxrdCalibrantDSpacing::QxrdCalibrantDSpacing ( )

Member Function Documentation

void QxrdCalibrantDSpacing::customSaver ( const QVariant &  val,
QSettings *  settings,
QString  name 
)
static

Definition at line 64 of file qxrdcalibrantdspacing.cpp.

References setSettingsValue().

Referenced by registerMetaTypes().

65 {
67 
68  spc.setSettingsValue(settings, name);
69 }
void setSettingsValue(QSettings *settings, QString name)

Here is the call graph for this function:

Here is the caller graph for this function:

double QxrdCalibrantDSpacing::d ( ) const
inline
double& QxrdCalibrantDSpacing::d ( )
inline

Definition at line 31 of file qxrdcalibrantdspacing.h.

References m_D.

31 { return m_D; }
void QxrdCalibrantDSpacing::fromScriptValue ( const QScriptValue &  obj,
QxrdCalibrantDSpacing spc 
)
static

Definition at line 102 of file qxrdcalibrantdspacing.cpp.

References d(), h(), index(), k(), l(), n(), and tth().

103 {
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();
111 }

Here is the call graph for this function:

int QxrdCalibrantDSpacing::h ( ) const
inline

Definition at line 19 of file qxrdcalibrantdspacing.h.

References m_H.

Referenced by fromScriptValue(), operator!=(), operator<<(), operator==(), operator>>(), QxrdCalibrantDSpacings::setSettingsValue(), setSettingsValue(), toScriptValue(), and toString().

19 { return m_H; }

Here is the caller graph for this function:

int& QxrdCalibrantDSpacing::h ( )
inline

Definition at line 27 of file qxrdcalibrantdspacing.h.

References m_H.

27 { return m_H; }
int QxrdCalibrantDSpacing::index ( ) const
inline

Definition at line 18 of file qxrdcalibrantdspacing.h.

References m_Index.

Referenced by fromScriptValue(), operator!=(), operator<<(), operator==(), operator>>(), QxrdCalibrantDSpacings::setSettingsValue(), setSettingsValue(), toScriptValue(), and toString().

18 { return m_Index; }

Here is the caller graph for this function:

int& QxrdCalibrantDSpacing::index ( )
inline

Definition at line 26 of file qxrdcalibrantdspacing.h.

References m_Index.

26 { return m_Index; }
bool QxrdCalibrantDSpacing::isValid ( ) const

Definition at line 36 of file qxrdcalibrantdspacing.cpp.

References m_D, m_H, m_Index, m_K, m_L, m_N, and m_TTH.

int QxrdCalibrantDSpacing::k ( ) const
inline

Definition at line 20 of file qxrdcalibrantdspacing.h.

References m_K.

Referenced by fromScriptValue(), operator!=(), operator<<(), operator==(), operator>>(), QxrdCalibrantDSpacings::setSettingsValue(), setSettingsValue(), toScriptValue(), and toString().

20 { return m_K; }

Here is the caller graph for this function:

int& QxrdCalibrantDSpacing::k ( )
inline

Definition at line 28 of file qxrdcalibrantdspacing.h.

References m_K.

28 { return m_K; }
int QxrdCalibrantDSpacing::l ( ) const
inline

Definition at line 21 of file qxrdcalibrantdspacing.h.

References m_L.

Referenced by fromScriptValue(), operator!=(), operator<<(), operator==(), operator>>(), QxrdCalibrantDSpacings::setSettingsValue(), setSettingsValue(), toScriptValue(), and toString().

21 { return m_L; }

Here is the caller graph for this function:

int& QxrdCalibrantDSpacing::l ( )
inline

Definition at line 29 of file qxrdcalibrantdspacing.h.

References m_L.

29 { return m_L; }
int QxrdCalibrantDSpacing::n ( ) const
inline

Definition at line 22 of file qxrdcalibrantdspacing.h.

References m_N.

Referenced by fromScriptValue(), QxrdCalibrantDSpacings::insertUnique(), operator<<(), operator>>(), setSettingsValue(), toScriptValue(), and toString().

22 { return m_N; }

Here is the caller graph for this function:

int& QxrdCalibrantDSpacing::n ( )
inline

Definition at line 30 of file qxrdcalibrantdspacing.h.

References m_N.

30 { return m_N; }
bool QxrdCalibrantDSpacing::operator!= ( const QxrdCalibrantDSpacing spc) const

Definition at line 46 of file qxrdcalibrantdspacing.cpp.

References d(), h(), index(), k(), l(), and tth().

47 {
48  return index()!=spc.index() || h()!=spc.h() || k()!=spc.k() || l()!=spc.l() || d()!=spc.d() || tth()!=spc.tth();
49 }

Here is the call graph for this function:

bool QxrdCalibrantDSpacing::operator== ( const QxrdCalibrantDSpacing spc) const

Definition at line 41 of file qxrdcalibrantdspacing.cpp.

References d(), h(), index(), k(), l(), and tth().

42 {
43  return index()==spc.index() && h()==spc.h() && k()==spc.k() && l()==spc.l() && d()==spc.d() && tth()==spc.tth();
44 }

Here is the call graph for this function:

void QxrdCalibrantDSpacing::registerMetaTypes ( )
static

Definition at line 78 of file qxrdcalibrantdspacing.cpp.

References customSaver(), and QcepProperty::registerCustomSaver().

Referenced by QxrdApplication::QxrdApplication().

79 {
80  qRegisterMetaType<QxrdCalibrantDSpacing>("QxrdCalibrantDSpacing");
81 
82  qRegisterMetaTypeStreamOperators<QxrdCalibrantDSpacing>("QxrdCalibrantDSpacing");
83 
85 }
static void customSaver(const QVariant &val, QSettings *settings, QString name)
static void registerCustomSaver(QString typeName, CustomSettingsSaver *saver)

Here is the call graph for this function:

Here is the caller graph for this function:

void QxrdCalibrantDSpacing::setSettingsValue ( QSettings *  settings,
QString  name 
)

Definition at line 51 of file qxrdcalibrantdspacing.cpp.

References d(), h(), index(), k(), l(), n(), and tth().

Referenced by customSaver().

52 {
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());
61  settings->endGroup();
62 }

Here is the call graph for this function:

Here is the caller graph for this function:

QScriptValue QxrdCalibrantDSpacing::toScriptValue ( QScriptEngine *  engine,
const QxrdCalibrantDSpacing spc 
)
static

Definition at line 87 of file qxrdcalibrantdspacing.cpp.

References d(), h(), index(), k(), l(), n(), and tth().

88 {
89  QScriptValue obj = engine->newObject();
90 
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());
98 
99  return obj;
100 }

Here is the call graph for this function:

QString QxrdCalibrantDSpacing::toString ( ) const

Definition at line 72 of file qxrdcalibrantdspacing.cpp.

References d(), h(), index(), k(), l(), n(), and tth().

73 {
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());
76 }

Here is the call graph for this function:

double QxrdCalibrantDSpacing::tth ( ) const
inline

Definition at line 24 of file qxrdcalibrantdspacing.h.

References m_TTH.

Referenced by fromScriptValue(), lessThan(), operator!=(), operator<<(), operator==(), operator>>(), QxrdCalibrantDSpacings::setSettingsValue(), setSettingsValue(), toScriptValue(), and toString().

24 { return m_TTH; }

Here is the caller graph for this function:

double& QxrdCalibrantDSpacing::tth ( )
inline

Definition at line 32 of file qxrdcalibrantdspacing.h.

References m_TTH.

32 { return m_TTH; }

Member Data Documentation

double QxrdCalibrantDSpacing::m_D
private

Definition at line 54 of file qxrdcalibrantdspacing.h.

Referenced by d(), and isValid().

int QxrdCalibrantDSpacing::m_H
private

Definition at line 50 of file qxrdcalibrantdspacing.h.

Referenced by h(), and isValid().

int QxrdCalibrantDSpacing::m_Index
private

Definition at line 49 of file qxrdcalibrantdspacing.h.

Referenced by index(), and isValid().

int QxrdCalibrantDSpacing::m_K
private

Definition at line 51 of file qxrdcalibrantdspacing.h.

Referenced by isValid(), and k().

int QxrdCalibrantDSpacing::m_L
private

Definition at line 52 of file qxrdcalibrantdspacing.h.

Referenced by isValid(), and l().

int QxrdCalibrantDSpacing::m_N
private

Definition at line 53 of file qxrdcalibrantdspacing.h.

Referenced by isValid(), and n().

double QxrdCalibrantDSpacing::m_TTH
private

Definition at line 55 of file qxrdcalibrantdspacing.h.

Referenced by isValid(), and tth().


The documentation for this class was generated from the following files: