cctw  0.2.1
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
CctwUnitCell Class Reference

#include <cctwunitcell.h>

Collaboration diagram for CctwUnitCell:
Collaboration graph

Public Member Functions

 CctwUnitCell ()
 
 CctwUnitCell (double a, double b, double c, double alpha, double beta, double gamma)
 
 CctwUnitCell (CctwDoubleVector3D lengths, CctwDoubleVector3D angles)
 
double a () const
 
double & a ()
 
double b () const
 
double & b ()
 
double c () const
 
double & c ()
 
double alpha () const
 
double & alpha ()
 
double beta () const
 
double & beta ()
 
double gamma () const
 
double & gamma ()
 
void setValue (double a, double b, double c, double alpha, double beta, double gamma)
 
void setValue (CctwDoubleVector3D lengths, CctwDoubleVector3D angles)
 
CctwDoubleVector3D lengths () const
 
CctwDoubleVector3D angles () const
 
bool operator== (const CctwUnitCell &cell) const
 
bool operator!= (const CctwUnitCell &cell) const
 
void setSettingsValue (QSettings *settings, QString name)
 

Static Public Member Functions

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

Private Attributes

double m_A
 
double m_B
 
double m_C
 
double m_Alpha
 
double m_Beta
 
double m_Gamma
 

Detailed Description

Definition at line 9 of file cctwunitcell.h.

Constructor & Destructor Documentation

CctwUnitCell::CctwUnitCell ( )

Definition at line 3 of file cctwunitcell.cpp.

3  :
4  m_A(0),
5  m_B(0),
6  m_C(0),
7  m_Alpha(0),
8  m_Beta(0),
9  m_Gamma(0)
10 {
11 }
double m_Alpha
Definition: cctwunitcell.h:50
double m_Beta
Definition: cctwunitcell.h:51
double m_Gamma
Definition: cctwunitcell.h:52
CctwUnitCell::CctwUnitCell ( double  a,
double  b,
double  c,
double  alpha,
double  beta,
double  gamma 
)

Definition at line 13 of file cctwunitcell.cpp.

13  :
14  m_A(a),
15  m_B(b),
16  m_C(c),
17  m_Alpha(alpha),
18  m_Beta(beta),
19  m_Gamma(gamma)
20 {
21 }
double beta() const
double b() const
double m_Alpha
Definition: cctwunitcell.h:50
double a() const
double alpha() const
double m_Beta
Definition: cctwunitcell.h:51
double gamma() const
double c() const
double m_Gamma
Definition: cctwunitcell.h:52
CctwUnitCell::CctwUnitCell ( CctwDoubleVector3D  lengths,
CctwDoubleVector3D  angles 
)

Definition at line 23 of file cctwunitcell.cpp.

23  :
24  m_A(lengths.x()),
25  m_B(lengths.y()),
26  m_C(lengths.z()),
27  m_Alpha(angles.x()),
28  m_Beta(angles.y()),
29  m_Gamma(angles.z())
30 {
31 }
double m_Alpha
Definition: cctwunitcell.h:50
T x() const
Definition: cctwvector3d.h:17
double m_Beta
Definition: cctwunitcell.h:51
T z() const
Definition: cctwvector3d.h:19
double m_Gamma
Definition: cctwunitcell.h:52
T y() const
Definition: cctwvector3d.h:18

Member Function Documentation

double CctwUnitCell::a ( ) const
double & CctwUnitCell::a ( )

Definition at line 38 of file cctwunitcell.cpp.

References m_A.

39 {
40  return m_A;
41 }
double CctwUnitCell::alpha ( ) const
double & CctwUnitCell::alpha ( )

Definition at line 68 of file cctwunitcell.cpp.

References m_Alpha.

69 {
70  return m_Alpha;
71 }
double m_Alpha
Definition: cctwunitcell.h:50
CctwDoubleVector3D CctwUnitCell::angles ( ) const

Definition at line 119 of file cctwunitcell.cpp.

References m_Alpha, m_Beta, and m_Gamma.

120 {
122 }
double m_Alpha
Definition: cctwunitcell.h:50
double m_Beta
Definition: cctwunitcell.h:51
double m_Gamma
Definition: cctwunitcell.h:52
CctwVector3D< double > CctwDoubleVector3D
Definition: cctwvector3d.h:71
double CctwUnitCell::b ( ) const
double & CctwUnitCell::b ( )

Definition at line 48 of file cctwunitcell.cpp.

References m_B.

49 {
50  return m_B;
51 }
double CctwUnitCell::beta ( ) const
double & CctwUnitCell::beta ( )

Definition at line 78 of file cctwunitcell.cpp.

References m_Beta.

79 {
80  return m_Beta;
81 }
double m_Beta
Definition: cctwunitcell.h:51
double CctwUnitCell::c ( ) const
double & CctwUnitCell::c ( )

Definition at line 58 of file cctwunitcell.cpp.

References m_C.

59 {
60  return m_C;
61 }
void CctwUnitCell::customSaver ( const QVariant &  val,
QSettings *  settings,
QString  name 
)
static

Definition at line 150 of file cctwunitcell.cpp.

References setSettingsValue().

Referenced by CctwUnitCellProperty::registerMetaTypes().

151 {
152  CctwUnitCell vec = val.value<CctwUnitCell>();
153 
154  vec.setSettingsValue(settings, name);
155 }
void setSettingsValue(QSettings *settings, QString name)
double CctwUnitCell::gamma ( ) const
double & CctwUnitCell::gamma ( )

Definition at line 88 of file cctwunitcell.cpp.

References m_Gamma.

89 {
90  return m_Gamma;
91 }
double m_Gamma
Definition: cctwunitcell.h:52
CctwDoubleVector3D CctwUnitCell::lengths ( ) const

Definition at line 114 of file cctwunitcell.cpp.

References m_A, m_B, and m_C.

115 {
116  return CctwDoubleVector3D(m_A, m_B, m_C);
117 }
CctwVector3D< double > CctwDoubleVector3D
Definition: cctwvector3d.h:71
bool CctwUnitCell::operator!= ( const CctwUnitCell cell) const

Definition at line 130 of file cctwunitcell.cpp.

References a(), alpha(), b(), beta(), c(), and gamma().

131 {
132  return a()!=cell.a() || b()!=cell.b() || c()!=cell.c() ||
133  alpha()!=cell.alpha() || beta()!=cell.beta() || gamma()!=cell.gamma();
134 }
double beta() const
double b() const
double a() const
double alpha() const
double gamma() const
double c() const
bool CctwUnitCell::operator== ( const CctwUnitCell cell) const

Definition at line 124 of file cctwunitcell.cpp.

References a(), alpha(), b(), beta(), c(), and gamma().

125 {
126  return a()==cell.a() && b()==cell.b() && c()==cell.c() &&
127  alpha()==cell.alpha() && beta()==cell.beta() && gamma()==cell.gamma();
128 }
double beta() const
double b() const
double a() const
double alpha() const
double gamma() const
double c() const
void CctwUnitCell::setSettingsValue ( QSettings *  settings,
QString  name 
)

Definition at line 136 of file cctwunitcell.cpp.

References a(), alpha(), b(), beta(), c(), and gamma().

Referenced by customSaver().

137 {
138  settings->beginGroup(name);
139 
140  settings->setValue("a", a());
141  settings->setValue("b", b());
142  settings->setValue("c", c());
143  settings->setValue("alpha", alpha());
144  settings->setValue("beta", beta());
145  settings->setValue("gamma", gamma());
146 
147  settings->endGroup();
148 }
double beta() const
double b() const
double a() const
double alpha() const
double gamma() const
double c() const
void CctwUnitCell::setValue ( double  a,
double  b,
double  c,
double  alpha,
double  beta,
double  gamma 
)

Definition at line 93 of file cctwunitcell.cpp.

References a(), alpha(), b(), beta(), c(), gamma(), m_A, m_Alpha, m_B, m_Beta, m_C, and m_Gamma.

94 {
95  m_A = a;
96  m_B = b;
97  m_C = c;
98  m_Alpha = alpha;
99  m_Beta = beta;
100  m_Gamma = gamma;
101 }
double beta() const
double b() const
double m_Alpha
Definition: cctwunitcell.h:50
double a() const
double alpha() const
double m_Beta
Definition: cctwunitcell.h:51
double gamma() const
double c() const
double m_Gamma
Definition: cctwunitcell.h:52
void CctwUnitCell::setValue ( CctwDoubleVector3D  lengths,
CctwDoubleVector3D  angles 
)

Definition at line 103 of file cctwunitcell.cpp.

References m_A, m_Alpha, m_B, m_Beta, m_C, m_Gamma, CctwVector3D< T >::x(), CctwVector3D< T >::y(), and CctwVector3D< T >::z().

104 {
105  m_A = lengths.x();
106  m_B = lengths.y();
107  m_C = lengths.z();
108 
109  m_Alpha = angles.x();
110  m_Beta = angles.y();
111  m_Gamma = angles.z();
112 }
double m_Alpha
Definition: cctwunitcell.h:50
T x() const
Definition: cctwvector3d.h:17
double m_Beta
Definition: cctwunitcell.h:51
T z() const
Definition: cctwvector3d.h:19
double m_Gamma
Definition: cctwunitcell.h:52
T y() const
Definition: cctwvector3d.h:18

Member Data Documentation

double CctwUnitCell::m_A
private

Definition at line 47 of file cctwunitcell.h.

Referenced by a(), lengths(), and setValue().

double CctwUnitCell::m_Alpha
private

Definition at line 50 of file cctwunitcell.h.

Referenced by alpha(), angles(), and setValue().

double CctwUnitCell::m_B
private

Definition at line 48 of file cctwunitcell.h.

Referenced by b(), lengths(), and setValue().

double CctwUnitCell::m_Beta
private

Definition at line 51 of file cctwunitcell.h.

Referenced by angles(), beta(), and setValue().

double CctwUnitCell::m_C
private

Definition at line 49 of file cctwunitcell.h.

Referenced by c(), lengths(), and setValue().

double CctwUnitCell::m_Gamma
private

Definition at line 52 of file cctwunitcell.h.

Referenced by angles(), gamma(), and setValue().


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