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

#include <qxrdpowderpointproperty.h>

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

Public Slots

void setValue (QxrdPowderPointVector val, int index)
 
void setValue (QxrdPowderPointVector val)
 
void setDefaultValue (QxrdPowderPointVector val)
 
void resetValue ()
 
void clear ()
 
void appendValue (QxrdPowderPoint val)
 

Signals

void valueChanged (QxrdPowderPointVector val, int index)
 

Public Member Functions

 QxrdPowderPointVectorProperty (QcepSettingsSaverWPtr saver, QcepObject *parent, const char *name, QxrdPowderPointVector value, QString toolTip)
 
QxrdPowderPointVector value () const
 
QxrdPowderPointVector defaultValue () const
 
QString toString (const QxrdPowderPointVector &vec)
 
- 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)
 

Private Attributes

QxrdPowderPointVector m_Default
 
QxrdPowderPointVector m_Value
 

Additional Inherited Members

- 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)
 
- Protected Attributes inherited from QcepProperty
QMutex m_Mutex
 
QcepSettingsSaverWPtr m_Saver
 

Detailed Description

Definition at line 84 of file qxrdpowderpointproperty.h.

Constructor & Destructor Documentation

QxrdPowderPointVectorProperty::QxrdPowderPointVectorProperty ( QcepSettingsSaverWPtr  saver,
QcepObject parent,
const char *  name,
QxrdPowderPointVector  value,
QString  toolTip 
)

Definition at line 452 of file qxrdpowderpointproperty.cpp.

453  : QcepProperty(saver, parent, name, toolTip),
454  m_Default(value),
455  m_Value(value)
456 {
457 }
QString name() const
QcepProperty(QcepSettingsSaverWPtr saver, QObject *parent, const char *name, QString toolTip)
QString toolTip() const

Member Function Documentation

void QxrdPowderPointVectorProperty::appendValue ( QxrdPowderPoint  val)
slot

Definition at line 492 of file qxrdpowderpointproperty.cpp.

References QcepProperty::m_Mutex, setValue(), and value().

493 {
494  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
495 
496  QxrdPowderPointVector list = value();
497  list.append(val);
498 
499  setValue(list);
500 }
QMutex m_Mutex
Definition: qcepproperty.h:69
QxrdPowderPointVector value() const
void setValue(QxrdPowderPointVector val, int index)

Here is the call graph for this function:

void QxrdPowderPointVectorProperty::clear ( )
slot

Definition at line 485 of file qxrdpowderpointproperty.cpp.

References QcepProperty::m_Mutex, and setValue().

486 {
487  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
488 
490 }
QMutex m_Mutex
Definition: qcepproperty.h:69
void setValue(QxrdPowderPointVector val, int index)

Here is the call graph for this function:

QxrdPowderPointVector QxrdPowderPointVectorProperty::defaultValue ( ) const

Definition at line 466 of file qxrdpowderpointproperty.cpp.

References m_Default, and QcepProperty::m_Mutex.

Referenced by resetValue().

467 {
468  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
469 
470  return m_Default;
471 }
QMutex m_Mutex
Definition: qcepproperty.h:69

Here is the caller graph for this function:

void QxrdPowderPointVectorProperty::resetValue ( )
slot

Definition at line 556 of file qxrdpowderpointproperty.cpp.

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

557 {
559  printMessage(tr("%1: QxrdPowderPointVectorProperty::resetValue").arg(name()));
560  }
561 
563 }
qint64 qcepDebug(int cond)
Definition: qcepdebug.cpp:26
QxrdPowderPointVector defaultValue() const
void setValue(QxrdPowderPointVector val, int index)
virtual void printMessage(QString msg, QDateTime dt=QDateTime::currentDateTime())
QString name() const

Here is the call graph for this function:

void QxrdPowderPointVectorProperty::setDefaultValue ( QxrdPowderPointVector  val)
slot

Definition at line 549 of file qxrdpowderpointproperty.cpp.

References m_Default, and QcepProperty::m_Mutex.

550 {
551  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
552 
553  m_Default = val;
554 }
QMutex m_Mutex
Definition: qcepproperty.h:69
void QxrdPowderPointVectorProperty::setValue ( QxrdPowderPointVector  val,
int  index 
)
slot

Definition at line 473 of file qxrdpowderpointproperty.cpp.

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

Referenced by appendValue(), clear(), and resetValue().

474 {
475  if (debug()) {
476  printMessage(tr("%1 QxrdPowderPointVectorProperty::setValue(QxrdPowderPointVector %2, int %3) [%4]")
477  .arg(name()).arg(toString(val)).arg(index).arg(this->index()));
478  }
479 
480  if (index == this->index()) {
481  setValue(val);
482  }
483 }
QString toString(const QxrdPowderPointVector &vec)
void setValue(QxrdPowderPointVector val, int index)
virtual void printMessage(QString msg, QDateTime dt=QDateTime::currentDateTime())
QString name() const
int debug() const

Here is the call graph for this function:

Here is the caller graph for this function:

void QxrdPowderPointVectorProperty::setValue ( QxrdPowderPointVector  val)
slot

Definition at line 522 of file qxrdpowderpointproperty.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().

523 {
524  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
525 
527  printMessage(tr("%1 QxrdPowderPointVectorProperty::setValue(QxrdPowderPointVector %2)")
528  .arg(name()).arg(toString(val)));
529  }
530 
531  if (val != m_Value) {
532  if (debug()) {
533  printMessage(tr("%1: QxrdPowderPointVectorProperty::setValue(QxrdPowderPointVector %2) [%3]")
534  .arg(name()).arg(toString(val)).arg(index()));
535  }
536 
537  m_Value = val;
538 
540 
541  if (saver) {
542  saver->changed(this);
543  }
544 
545  emit valueChanged(m_Value, incIndex(1));
546  }
547 }
qint64 qcepDebug(int cond)
Definition: qcepdebug.cpp:26
QMutex m_Mutex
Definition: qcepproperty.h:69
QString toString(const QxrdPowderPointVector &vec)
int incIndex(int step)
void valueChanged(QxrdPowderPointVector val, int index)
virtual void printMessage(QString msg, QDateTime dt=QDateTime::currentDateTime())
QString name() const
QSharedPointer< QcepSettingsSaver > QcepSettingsSaverPtr
int debug() const
QcepSettingsSaverWPtr m_Saver
Definition: qcepproperty.h:70

Here is the call graph for this function:

QString QxrdPowderPointVectorProperty::toString ( const QxrdPowderPointVector vec)

Definition at line 502 of file qxrdpowderpointproperty.cpp.

References QcepProperty::m_Mutex.

Referenced by setValue().

503 {
504  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
505 
506  QString res = "[";
507  int ct = val.count();
508 
509  for (int i=0; i<ct; i++) {
510  if (i<(ct-1)) {
511  res += tr("%1,\n").arg(val[i].toString());
512  } else {
513  res += tr("%1").arg(val[i].toString());
514  }
515  }
516 
517  res += "]";
518 
519  return res;
520 }
QMutex m_Mutex
Definition: qcepproperty.h:69
QString toString(const QxrdPowderPointVector &vec)

Here is the caller graph for this function:

QxrdPowderPointVector QxrdPowderPointVectorProperty::value ( ) const

Definition at line 459 of file qxrdpowderpointproperty.cpp.

References QcepProperty::m_Mutex, and m_Value.

Referenced by appendValue().

460 {
461  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
462 
463  return m_Value;
464 }
QMutex m_Mutex
Definition: qcepproperty.h:69

Here is the caller graph for this function:

void QxrdPowderPointVectorProperty::valueChanged ( QxrdPowderPointVector  val,
int  index 
)
signal

Referenced by QxrdImagePlot::setProcessor(), and setValue().

Here is the caller graph for this function:

Member Data Documentation

QxrdPowderPointVector QxrdPowderPointVectorProperty::m_Default
private

Definition at line 109 of file qxrdpowderpointproperty.h.

Referenced by defaultValue(), and setDefaultValue().

QxrdPowderPointVector QxrdPowderPointVectorProperty::m_Value
private

Definition at line 110 of file qxrdpowderpointproperty.h.

Referenced by setValue(), and value().


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