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

#include <qcepproperty.h>

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

Public Slots

void setValue (QcepDoubleList val, int index)
 
void setValue (QcepDoubleList val)
 
void incValue (QcepDoubleList step)
 
void setDefaultValue (QcepDoubleList val)
 
void resetValue ()
 
void clear ()
 
void appendValue (double val)
 

Signals

void valueChanged (QcepDoubleList val, int index)
 

Public Member Functions

 QcepDoubleListProperty (QcepSettingsSaverWPtr saver, QObject *parent, const char *name, QcepDoubleList value, QString toolTip)
 
QcepDoubleList value () const
 
QcepDoubleList defaultValue () const
 
QString toString (const QcepDoubleList &list)
 
- 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

QcepDoubleList m_Default
 
QcepDoubleList 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 351 of file qcepproperty.h.

Constructor & Destructor Documentation

QcepDoubleListProperty::QcepDoubleListProperty ( QcepSettingsSaverWPtr  saver,
QObject *  parent,
const char *  name,
QcepDoubleList  value,
QString  toolTip 
)

Definition at line 1706 of file qcepproperty.cpp.

1707  : QcepProperty(saver, parent, name, toolTip),
1708  m_Default(value),
1709  m_Value(value)
1710 {
1711 }
QcepDoubleList m_Default
Definition: qcepproperty.h:373
QcepDoubleList m_Value
Definition: qcepproperty.h:374
QcepDoubleList value() const
QString name() const
QcepProperty(QcepSettingsSaverWPtr saver, QObject *parent, const char *name, QString toolTip)
QString toolTip() const

Member Function Documentation

void QcepDoubleListProperty::appendValue ( double  val)
slot

Definition at line 1768 of file qcepproperty.cpp.

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

1769 {
1770  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
1771 
1772  QcepDoubleList list = value();
1773  list.append(val);
1774 
1775  setValue(list);
1776 }
QMutex m_Mutex
Definition: qcepproperty.h:69
void setValue(QcepDoubleList val, int index)
QcepDoubleList value() const
QList< double > QcepDoubleList
Definition: qcepmacros.h:28

Here is the call graph for this function:

void QcepDoubleListProperty::clear ( )
slot

Definition at line 1761 of file qcepproperty.cpp.

References QcepProperty::m_Mutex, and setValue().

1762 {
1763  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
1764 
1766 }
QMutex m_Mutex
Definition: qcepproperty.h:69
void setValue(QcepDoubleList val, int index)
QList< double > QcepDoubleList
Definition: qcepmacros.h:28

Here is the call graph for this function:

QcepDoubleList QcepDoubleListProperty::defaultValue ( ) const

Definition at line 1720 of file qcepproperty.cpp.

References m_Default, and QcepProperty::m_Mutex.

Referenced by resetValue().

1721 {
1722  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
1723 
1724  return m_Default;
1725 }
QcepDoubleList m_Default
Definition: qcepproperty.h:373
QMutex m_Mutex
Definition: qcepproperty.h:69

Here is the caller graph for this function:

void QcepDoubleListProperty::incValue ( QcepDoubleList  step)
slot

Definition at line 1739 of file qcepproperty.cpp.

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

1740 {
1741  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
1742 
1743  if (qcepDebug(DEBUG_PROPERTIES) || debug()) {
1744  printMessage(tr("%1: QcepDoubleListProperty::incValue(QcepDoubleList %2...)")
1745  .arg(name()).arg(step.value(0)));
1746  }
1747 
1748  for (int i=0; i<m_Value.count(); i++) {
1749  m_Value[i] += step.value(i);
1750  }
1751 
1753 
1754  if (saver) {
1755  saver->changed(this);
1756  }
1757 
1758  emit valueChanged(m_Value, incIndex(1));
1759 }
qint64 qcepDebug(int cond)
Definition: qcepdebug.cpp:26
QMutex m_Mutex
Definition: qcepproperty.h:69
int incIndex(int step)
void valueChanged(QcepDoubleList val, int index)
QcepDoubleList m_Value
Definition: qcepproperty.h:374
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:

void QcepDoubleListProperty::resetValue ( )
slot

Definition at line 1832 of file qcepproperty.cpp.

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

1833 {
1834  if (qcepDebug(DEBUG_PROPERTIES)) {
1835  printMessage(tr("%1: QcepDoubleListProperty::resetValue").arg(name()));
1836  }
1837 
1839 }
qint64 qcepDebug(int cond)
Definition: qcepdebug.cpp:26
void setValue(QcepDoubleList val, int index)
virtual void printMessage(QString msg, QDateTime dt=QDateTime::currentDateTime())
QcepDoubleList defaultValue() const
QString name() const

Here is the call graph for this function:

void QcepDoubleListProperty::setDefaultValue ( QcepDoubleList  val)
slot

Definition at line 1825 of file qcepproperty.cpp.

References m_Default, and QcepProperty::m_Mutex.

1826 {
1827  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
1828 
1829  m_Default = val;
1830 }
QcepDoubleList m_Default
Definition: qcepproperty.h:373
QMutex m_Mutex
Definition: qcepproperty.h:69
void QcepDoubleListProperty::setValue ( QcepDoubleList  val,
int  index 
)
slot

Definition at line 1727 of file qcepproperty.cpp.

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

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

1728 {
1729  if (debug()) {
1730  printMessage(tr("%1 QcepDoubleListProperty::setValue(QcepDoubleList %2, int %3) [%4]")
1731  .arg(name()).arg(toString(val)).arg(index).arg(this->index()));
1732  }
1733 
1734  if (index == this->index()) {
1735  setValue(val);
1736  }
1737 }
QString toString(const QcepDoubleList &list)
void setValue(QcepDoubleList 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 QcepDoubleListProperty::setValue ( QcepDoubleList  val)
slot

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

1799 {
1800  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
1801 
1802  if (qcepDebug(DEBUG_PROPERTIES)) {
1803  printMessage(tr("%1 QcepDoubleListProperty::setValue(QcepDoubleList %2)")
1804  .arg(name()).arg(toString(val)));
1805  }
1806 
1807  if (val != m_Value) {
1808  if (debug()) {
1809  printMessage(tr("%1: QcepDoubleListProperty::setValue(QcepDoubleList %2) [%3]")
1810  .arg(name()).arg(toString(val)).arg(index()));
1811  }
1812 
1813  m_Value = val;
1814 
1816 
1817  if (saver) {
1818  saver->changed(this);
1819  }
1820 
1821  emit valueChanged(m_Value, incIndex(1));
1822  }
1823 }
qint64 qcepDebug(int cond)
Definition: qcepdebug.cpp:26
QMutex m_Mutex
Definition: qcepproperty.h:69
int incIndex(int step)
void valueChanged(QcepDoubleList val, int index)
QcepDoubleList m_Value
Definition: qcepproperty.h:374
QString toString(const QcepDoubleList &list)
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 QcepDoubleListProperty::toString ( const QcepDoubleList list)

Definition at line 1778 of file qcepproperty.cpp.

References QcepProperty::m_Mutex.

Referenced by setValue().

1779 {
1780  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
1781 
1782  QString res = "[";
1783  int ct = val.count();
1784 
1785  for (int i=0; i<ct; i++) {
1786  if (i<(ct-1)) {
1787  res += tr("%1, ").arg(val[i]);
1788  } else {
1789  res += tr("%1").arg(val[i]);
1790  }
1791  }
1792 
1793  res += "]";
1794 
1795  return res;
1796 }
QMutex m_Mutex
Definition: qcepproperty.h:69

Here is the caller graph for this function:

QcepDoubleList QcepDoubleListProperty::value ( ) const

Definition at line 1713 of file qcepproperty.cpp.

References QcepProperty::m_Mutex, and m_Value.

Referenced by appendValue().

1714 {
1715  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
1716 
1717  return m_Value;
1718 }
QMutex m_Mutex
Definition: qcepproperty.h:69
QcepDoubleList m_Value
Definition: qcepproperty.h:374

Here is the caller graph for this function:

void QcepDoubleListProperty::valueChanged ( QcepDoubleList  val,
int  index 
)
signal

Referenced by incValue(), and setValue().

Here is the caller graph for this function:

Member Data Documentation

QcepDoubleList QcepDoubleListProperty::m_Default
private

Definition at line 373 of file qcepproperty.h.

Referenced by defaultValue(), and setDefaultValue().

QcepDoubleList QcepDoubleListProperty::m_Value
private

Definition at line 374 of file qcepproperty.h.

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


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