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

#include <qcepproperty.h>

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

Public Slots

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

Signals

void valueChanged (QcepIntList val, int index)
 

Public Member Functions

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

QcepIntList m_Default
 
QcepIntList 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 403 of file qcepproperty.h.

Constructor & Destructor Documentation

QcepIntListProperty::QcepIntListProperty ( QcepSettingsSaverWPtr  saver,
QObject *  parent,
const char *  name,
QcepIntList  value,
QString  toolTip 
)

Definition at line 1976 of file qcepproperty.cpp.

1977  : QcepProperty(saver, parent, name, toolTip),
1978  m_Default(value),
1979  m_Value(value)
1980 {
1981 }
QcepIntList value() const
QcepIntList m_Default
Definition: qcepproperty.h:425
QcepIntList m_Value
Definition: qcepproperty.h:426
QString name() const
QcepProperty(QcepSettingsSaverWPtr saver, QObject *parent, const char *name, QString toolTip)
QString toolTip() const

Member Function Documentation

void QcepIntListProperty::appendValue ( int  val)
slot

Definition at line 2038 of file qcepproperty.cpp.

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

2039 {
2040  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
2041 
2042  QcepIntList list = value();
2043  list.append(val);
2044 
2045  setValue(list);
2046 }
QcepIntList value() const
void setValue(QcepIntList val, int index)
QMutex m_Mutex
Definition: qcepproperty.h:69
QList< int > QcepIntList
Definition: qcepmacros.h:32

Here is the call graph for this function:

void QcepIntListProperty::clear ( )
slot

Definition at line 2031 of file qcepproperty.cpp.

References QcepProperty::m_Mutex, and setValue().

2032 {
2033  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
2034 
2035  setValue(QcepIntList());
2036 }
void setValue(QcepIntList val, int index)
QMutex m_Mutex
Definition: qcepproperty.h:69
QList< int > QcepIntList
Definition: qcepmacros.h:32

Here is the call graph for this function:

QcepIntList QcepIntListProperty::defaultValue ( ) const

Definition at line 1990 of file qcepproperty.cpp.

References m_Default, and QcepProperty::m_Mutex.

Referenced by resetValue().

1991 {
1992  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
1993 
1994  return m_Default;
1995 }
QMutex m_Mutex
Definition: qcepproperty.h:69
QcepIntList m_Default
Definition: qcepproperty.h:425

Here is the caller graph for this function:

void QcepIntListProperty::incValue ( QcepIntList  step)
slot

Definition at line 2009 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().

2010 {
2011  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
2012 
2013  if (qcepDebug(DEBUG_PROPERTIES) || debug()) {
2014  printMessage(tr("%1: QcepIntListProperty::incValue(QcepDoubleList %2...)")
2015  .arg(name()).arg(step.value(0)));
2016  }
2017 
2018  for (int i=0; i<m_Value.count(); i++) {
2019  m_Value[i] += step.value(i);
2020  }
2021 
2023 
2024  if (saver) {
2025  saver->changed(this);
2026  }
2027 
2028  emit valueChanged(m_Value, incIndex(1));
2029 }
qint64 qcepDebug(int cond)
Definition: qcepdebug.cpp:26
QMutex m_Mutex
Definition: qcepproperty.h:69
int incIndex(int step)
virtual void printMessage(QString msg, QDateTime dt=QDateTime::currentDateTime())
QcepIntList m_Value
Definition: qcepproperty.h:426
void valueChanged(QcepIntList val, int index)
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 QcepIntListProperty::resetValue ( )
slot

Definition at line 2102 of file qcepproperty.cpp.

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

2103 {
2104  if (qcepDebug(DEBUG_PROPERTIES)) {
2105  printMessage(tr("%1: QcepIntListProperty::resetValue").arg(name()));
2106  }
2107 
2109 }
QcepIntList defaultValue() const
qint64 qcepDebug(int cond)
Definition: qcepdebug.cpp:26
void setValue(QcepIntList val, int index)
virtual void printMessage(QString msg, QDateTime dt=QDateTime::currentDateTime())
QString name() const

Here is the call graph for this function:

void QcepIntListProperty::setDefaultValue ( QcepIntList  val)
slot

Definition at line 2095 of file qcepproperty.cpp.

References m_Default, and QcepProperty::m_Mutex.

2096 {
2097  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
2098 
2099  m_Default = val;
2100 }
QMutex m_Mutex
Definition: qcepproperty.h:69
QcepIntList m_Default
Definition: qcepproperty.h:425
void QcepIntListProperty::setValue ( QcepIntList  val,
int  index 
)
slot

Definition at line 1997 of file qcepproperty.cpp.

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

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

1998 {
1999  if (debug()) {
2000  printMessage(tr("%1 QcepIntListProperty::setValue(QcepIntList %2, int %3) [%4]")
2001  .arg(name()).arg(toString(val)).arg(index).arg(this->index()));
2002  }
2003 
2004  if (index == this->index()) {
2005  setValue(val);
2006  }
2007 }
void setValue(QcepIntList val, int index)
virtual void printMessage(QString msg, QDateTime dt=QDateTime::currentDateTime())
QString name() const
QString toString(const QcepIntList &list)
int debug() const

Here is the call graph for this function:

Here is the caller graph for this function:

void QcepIntListProperty::setValue ( QcepIntList  val)
slot

Definition at line 2068 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().

2069 {
2070  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
2071 
2072  if (qcepDebug(DEBUG_PROPERTIES)) {
2073  printMessage(tr("%1 QcepIntListProperty::setValue(QcepIntList %2)")
2074  .arg(name()).arg(toString(val)));
2075  }
2076 
2077  if (val != m_Value) {
2078  if (debug()) {
2079  printMessage(tr("%1: QcepIntListProperty::setValue(QcepIntList %2) [%3]")
2080  .arg(name()).arg(toString(val)).arg(index()));
2081  }
2082 
2083  m_Value = val;
2084 
2086 
2087  if (saver) {
2088  saver->changed(this);
2089  }
2090 
2091  emit valueChanged(m_Value, incIndex(1));
2092  }
2093 }
qint64 qcepDebug(int cond)
Definition: qcepdebug.cpp:26
QMutex m_Mutex
Definition: qcepproperty.h:69
int incIndex(int step)
virtual void printMessage(QString msg, QDateTime dt=QDateTime::currentDateTime())
QcepIntList m_Value
Definition: qcepproperty.h:426
void valueChanged(QcepIntList val, int index)
QString name() const
QSharedPointer< QcepSettingsSaver > QcepSettingsSaverPtr
QString toString(const QcepIntList &list)
int debug() const
QcepSettingsSaverWPtr m_Saver
Definition: qcepproperty.h:70

Here is the call graph for this function:

QString QcepIntListProperty::toString ( const QcepIntList list)

Definition at line 2048 of file qcepproperty.cpp.

References QcepProperty::m_Mutex.

Referenced by setValue().

2049 {
2050  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
2051 
2052  QString res = "[";
2053  int ct = val.count();
2054 
2055  for (int i=0; i<ct; i++) {
2056  if (i<(ct-1)) {
2057  res += tr("%1, ").arg(val[i]);
2058  } else {
2059  res += tr("%1").arg(val[i]);
2060  }
2061  }
2062 
2063  res += "]";
2064 
2065  return res;
2066 }
QMutex m_Mutex
Definition: qcepproperty.h:69

Here is the caller graph for this function:

QcepIntList QcepIntListProperty::value ( ) const

Definition at line 1983 of file qcepproperty.cpp.

References QcepProperty::m_Mutex, and m_Value.

Referenced by appendValue().

1984 {
1985  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
1986 
1987  return m_Value;
1988 }
QMutex m_Mutex
Definition: qcepproperty.h:69
QcepIntList m_Value
Definition: qcepproperty.h:426

Here is the caller graph for this function:

void QcepIntListProperty::valueChanged ( QcepIntList  val,
int  index 
)
signal

Referenced by incValue(), and setValue().

Here is the caller graph for this function:

Member Data Documentation

QcepIntList QcepIntListProperty::m_Default
private

Definition at line 425 of file qcepproperty.h.

Referenced by defaultValue(), and setDefaultValue().

QcepIntList QcepIntListProperty::m_Value
private

Definition at line 426 of file qcepproperty.h.

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


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