QXRD  0.11.16
Public Slots | Signals | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
QcepMatrix3x3Property Class Reference

#include <qcepmatrix3x3property.h>

Inheritance diagram for QcepMatrix3x3Property:
Inheritance graph
[legend]
Collaboration diagram for QcepMatrix3x3Property:
Collaboration graph
[legend]

Public Slots

void setValue (QcepMatrix3x3 val, int index)
 
void setValue (QcepMatrix3x3 val)
 
void incValue (QcepMatrix3x3 step)
 
void setDefaultValue (QcepMatrix3x3 val)
 
void resetValue ()
 

Signals

void valueChanged (QcepMatrix3x3 val, int index)
 

Public Member Functions

 QcepMatrix3x3Property (QcepSettingsSaverWPtr saver, QObject *parent, const char *name, QcepMatrix3x3 value, QString toolTip)
 
 QcepMatrix3x3Property (QcepSettingsSaverWPtr saver, QObject *parent, const char *name, double r0c0, double r0c1, double r0c2, double r1c0, double r1c1, double r1c2, double r2c0, double r2c1, double r2c2, QString toolTip)
 
QcepMatrix3x3 value () const
 
QcepMatrix3x3 defaultValue () const
 
QString toString (const QcepMatrix3x3 &mat)
 
- Public Member Functions inherited from QcepProperty
 QcepProperty (QcepSettingsSaverWPtr saver, QObject *parent, const char *name, QString toolTip)
 
virtual void printMessage (QString msg, QDateTime dt=QDateTime::currentDateTime())
 
QString name () const
 
void setName (QString name)
 
QString parentName () const
 
QString toolTip () const
 
void setToolTip (QString tip)
 
QString expandedToolTip () const
 
void setWidgetToolTip (QWidget *widget)
 
int index ()
 
int incIndex (int step)
 
int debug () const
 
void setDebug (int dbg)
 
void setSaver (QcepSettingsSaverWPtr saver)
 

Static Public Member Functions

static void registerMetaTypes ()
 
- Static Public Member Functions inherited from QcepProperty
static void registerMetaTypes ()
 
static void setSettingsValue (QSettings *settings, QString name, QVariant value)
 
static void writeSettings (QObject *object, QSettings *settings, QString section)
 
static void readSettings (QObject *object, QSettings *settings, QString section)
 
static void writeSettings (QObject *object, const QMetaObject *meta, QString groupName, QSettings *settings, bool includeDynamic=false)
 
static void readSettings (QObject *object, const QMetaObject *meta, QString groupName, QSettings *settings, bool includeDynamic=false)
 
static void writeSettings (QObject *object, QString groupName, QSettings *settings, bool includeDynamic=false)
 
static void readSettings (QObject *object, QString groupName, QSettings *settings, bool includeDynamic=false)
 
static void registerCustomSaver (QString typeName, CustomSettingsSaver *saver)
 

Private Attributes

QcepMatrix3x3 m_Default
 
QcepMatrix3x3 m_Value
 

Additional Inherited Members

- Protected Attributes inherited from QcepProperty
QMutex m_Mutex
 
QcepSettingsSaverWPtr m_Saver
 

Detailed Description

Definition at line 7 of file qcepmatrix3x3property.h.

Constructor & Destructor Documentation

QcepMatrix3x3Property::QcepMatrix3x3Property ( QcepSettingsSaverWPtr  saver,
QObject *  parent,
const char *  name,
QcepMatrix3x3  value,
QString  toolTip 
)
explicit

Definition at line 6 of file qcepmatrix3x3property.cpp.

6  :
7  QcepProperty(saver, parent, name, toolTip),
8  m_Default(value),
9  m_Value(value)
10 {
11 }
QString name() const
QcepProperty(QcepSettingsSaverWPtr saver, QObject *parent, const char *name, QString toolTip)
QString toolTip() const
QcepMatrix3x3Property::QcepMatrix3x3Property ( QcepSettingsSaverWPtr  saver,
QObject *  parent,
const char *  name,
double  r0c0,
double  r0c1,
double  r0c2,
double  r1c0,
double  r1c1,
double  r1c2,
double  r2c0,
double  r2c1,
double  r2c2,
QString  toolTip 
)
explicit

Definition at line 13 of file qcepmatrix3x3property.cpp.

References m_Default, and m_Value.

17  :
18  QcepProperty(saver, parent, name, toolTip),
19  m_Default(),
20  m_Value()
21 {
22  QcepMatrix3x3 val;
23 
24  val(0,0) = r0c0; val(0,1) = r0c1; val(0,2) = r0c2;
25  val(1,0) = r1c0; val(1,1) = r1c1; val(1,2) = r1c2;
26  val(2,0) = r2c0; val(2,1) = r2c1; val(2,2) = r2c2;
27 
28  m_Default = val;
29  m_Value = val;
30 }
QString name() const
QcepProperty(QcepSettingsSaverWPtr saver, QObject *parent, const char *name, QString toolTip)
QString toolTip() const

Member Function Documentation

QcepMatrix3x3 QcepMatrix3x3Property::defaultValue ( ) const

Definition at line 46 of file qcepmatrix3x3property.cpp.

References m_Default, and QcepProperty::m_Mutex.

Referenced by resetValue().

47 {
48  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
49 
50  return m_Default;
51 }
QMutex m_Mutex
Definition: qcepproperty.h:69

Here is the caller graph for this function:

void QcepMatrix3x3Property::incValue ( QcepMatrix3x3  step)
slot

Definition at line 65 of file qcepmatrix3x3property.cpp.

References QcepProperty::debug(), DEBUG_PROPERTIES, QcepProperty::incIndex(), QcepProperty::m_Mutex, QcepProperty::m_Saver, m_Value, QcepProperty::name(), QcepProperty::printMessage(), qcepDebug(), toString(), and valueChanged().

66 {
67  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
68 
69  if (qcepDebug(DEBUG_PROPERTIES) || debug()) {
70  printMessage(tr("%1: QcepMatrix3x3Property::incValue(QcepMatrix3x3 %2...)")
71  .arg(name()).arg(toString(step)));
72  }
73 
74  m_Value += step;
75 
77 
78  if (saver) {
79  saver->changed(this);
80  }
81 
82  emit valueChanged(m_Value, incIndex(1));
83 }
qint64 qcepDebug(int cond)
Definition: qcepdebug.cpp:26
void valueChanged(QcepMatrix3x3 val, int index)
QMutex m_Mutex
Definition: qcepproperty.h:69
int incIndex(int step)
virtual void printMessage(QString msg, QDateTime dt=QDateTime::currentDateTime())
QString name() const
QSharedPointer< QcepSettingsSaver > QcepSettingsSaverPtr
int debug() const
QString toString(const QcepMatrix3x3 &mat)
QcepSettingsSaverWPtr m_Saver
Definition: qcepproperty.h:70

Here is the call graph for this function:

void QcepMatrix3x3Property::registerMetaTypes ( )
static

Definition at line 32 of file qcepmatrix3x3property.cpp.

33 {
34  qRegisterMetaType< QcepMatrix3x3 >("QcepMatrix3x3");
35 
36  qRegisterMetaTypeStreamOperators< QcepMatrix3x3 >("QcepMatrix3x3");
37 }
void QcepMatrix3x3Property::resetValue ( )
slot

Definition at line 138 of file qcepmatrix3x3property.cpp.

References DEBUG_PROPERTIES, defaultValue(), QcepProperty::name(), QcepProperty::printMessage(), qcepDebug(), and setValue().

139 {
141  printMessage(tr("%1: QcepMatrix3x3Property::resetValue").arg(name()));
142  }
143 
145 }
qint64 qcepDebug(int cond)
Definition: qcepdebug.cpp:26
virtual void printMessage(QString msg, QDateTime dt=QDateTime::currentDateTime())
void setValue(QcepMatrix3x3 val, int index)
QString name() const
QcepMatrix3x3 defaultValue() const

Here is the call graph for this function:

void QcepMatrix3x3Property::setDefaultValue ( QcepMatrix3x3  val)
slot

Definition at line 131 of file qcepmatrix3x3property.cpp.

References m_Default, and QcepProperty::m_Mutex.

132 {
133  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
134 
135  m_Default = val;
136 }
QMutex m_Mutex
Definition: qcepproperty.h:69
void QcepMatrix3x3Property::setValue ( QcepMatrix3x3  val,
int  index 
)
slot

Definition at line 53 of file qcepmatrix3x3property.cpp.

References QcepProperty::debug(), QcepProperty::index(), QcepProperty::name(), QcepProperty::printMessage(), and toString().

Referenced by resetValue().

54 {
55  if (debug()) {
56  printMessage(tr("%1 QcepMatrix3x3Property::setValue(QcepMatrix3x3 %2, int %3) [%4]")
57  .arg(name()).arg(toString(val)).arg(index).arg(this->index()));
58  }
59 
60  if (index == this->index()) {
61  setValue(val);
62  }
63 }
virtual void printMessage(QString msg, QDateTime dt=QDateTime::currentDateTime())
void setValue(QcepMatrix3x3 val, int index)
QString name() const
int debug() const
QString toString(const QcepMatrix3x3 &mat)

Here is the call graph for this function:

Here is the caller graph for this function:

void QcepMatrix3x3Property::setValue ( QcepMatrix3x3  val)
slot

Definition at line 104 of file qcepmatrix3x3property.cpp.

References QcepProperty::debug(), DEBUG_PROPERTIES, QcepProperty::incIndex(), QcepProperty::index(), QcepProperty::m_Mutex, QcepProperty::m_Saver, m_Value, QcepProperty::name(), QcepProperty::printMessage(), qcepDebug(), toString(), and valueChanged().

105 {
106  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
107 
109  printMessage(tr("%1 QcepMatrix3x3Property::setValue(QcepMatrix3x3 %2)")
110  .arg(name()).arg(toString(val)));
111  }
112 
113  if (val != m_Value) {
114  if (debug()) {
115  printMessage(tr("%1: QcepMatrix3x3Property::setValue(QcepMatrix3x3 %2) [%3]")
116  .arg(name()).arg(toString(val)).arg(index()));
117  }
118 
119  m_Value = val;
120 
122 
123  if (saver) {
124  saver->changed(this);
125  }
126 
127  emit valueChanged(m_Value, incIndex(1));
128  }
129 }
qint64 qcepDebug(int cond)
Definition: qcepdebug.cpp:26
void valueChanged(QcepMatrix3x3 val, int index)
QMutex m_Mutex
Definition: qcepproperty.h:69
int incIndex(int step)
virtual void printMessage(QString msg, QDateTime dt=QDateTime::currentDateTime())
QString name() const
QSharedPointer< QcepSettingsSaver > QcepSettingsSaverPtr
int debug() const
QString toString(const QcepMatrix3x3 &mat)
QcepSettingsSaverWPtr m_Saver
Definition: qcepproperty.h:70

Here is the call graph for this function:

QString QcepMatrix3x3Property::toString ( const QcepMatrix3x3 mat)

Definition at line 85 of file qcepmatrix3x3property.cpp.

References QcepProperty::m_Mutex.

Referenced by incValue(), and setValue().

86 {
87  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
88 
89  QString res = "[";
90 
91  for (int row=0; row<3; row++) {
92  res += " [ ";
93  for (int col=0; col<3; col++) {
94  res += tr("%1 ").arg(val(row, col));
95  }
96  res += "]";
97  }
98 
99  res += "]";
100 
101  return res;
102 }
QMutex m_Mutex
Definition: qcepproperty.h:69

Here is the caller graph for this function:

QcepMatrix3x3 QcepMatrix3x3Property::value ( ) const

Definition at line 39 of file qcepmatrix3x3property.cpp.

References QcepProperty::m_Mutex, and m_Value.

40 {
41  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
42 
43  return m_Value;
44 }
QMutex m_Mutex
Definition: qcepproperty.h:69
void QcepMatrix3x3Property::valueChanged ( QcepMatrix3x3  val,
int  index 
)
signal

Referenced by incValue(), and setValue().

Here is the caller graph for this function:

Member Data Documentation

QcepMatrix3x3 QcepMatrix3x3Property::m_Default
private

Definition at line 35 of file qcepmatrix3x3property.h.

Referenced by defaultValue(), QcepMatrix3x3Property(), and setDefaultValue().

QcepMatrix3x3 QcepMatrix3x3Property::m_Value
private

Definition at line 36 of file qcepmatrix3x3property.h.

Referenced by incValue(), QcepMatrix3x3Property(), setValue(), and value().


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