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

#include <qcepproperty.h>

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

Public Slots

void setValue (QDateTime val, int index)
 
void setValue (QDateTime val)
 
void setDefaultValue (QDateTime val)
 
void resetValue ()
 

Signals

void valueChanged (QDateTime val, int index)
 

Public Member Functions

 QcepDateTimeProperty (QcepSettingsSaverWPtr saver, QObject *parent, const char *name, QDateTime value, QString toolTip)
 
QDateTime value () const
 
QDateTime defaultValue () const
 
- 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

QDateTime m_Default
 
QDateTime 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 328 of file qcepproperty.h.

Constructor & Destructor Documentation

QcepDateTimeProperty::QcepDateTimeProperty ( QcepSettingsSaverWPtr  saver,
QObject *  parent,
const char *  name,
QDateTime  value,
QString  toolTip 
)

Definition at line 1628 of file qcepproperty.cpp.

1629  : QcepProperty(saver, parent, name, toolTip),
1630  m_Default(value),
1631  m_Value(value)
1632 {
1633 }
QString name() const
QcepProperty(QcepSettingsSaverWPtr saver, QObject *parent, const char *name, QString toolTip)
QDateTime value() const
QString toolTip() const

Member Function Documentation

QDateTime QcepDateTimeProperty::defaultValue ( ) const

Definition at line 1642 of file qcepproperty.cpp.

References m_Default, and QcepProperty::m_Mutex.

Referenced by resetValue().

1643 {
1644  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
1645 
1646  return m_Default;
1647 }
QMutex m_Mutex
Definition: qcepproperty.h:69

Here is the caller graph for this function:

void QcepDateTimeProperty::resetValue ( )
slot

Definition at line 1697 of file qcepproperty.cpp.

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

1698 {
1699  if (qcepDebug(DEBUG_PROPERTIES)) {
1700  printMessage(tr("%1: QcepDateTimeProperty::resetValue").arg(name()));
1701  }
1702 
1704 }
qint64 qcepDebug(int cond)
Definition: qcepdebug.cpp:26
void setValue(QDateTime val, int index)
QDateTime defaultValue() const
virtual void printMessage(QString msg, QDateTime dt=QDateTime::currentDateTime())
QString name() const

Here is the call graph for this function:

void QcepDateTimeProperty::setDefaultValue ( QDateTime  val)
slot

Definition at line 1688 of file qcepproperty.cpp.

References m_Default, and QcepProperty::m_Mutex.

1689 {
1690  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
1691 
1692  if (val != m_Default) {
1693  m_Default = val;
1694  }
1695 }
QMutex m_Mutex
Definition: qcepproperty.h:69
void QcepDateTimeProperty::setValue ( QDateTime  val,
int  index 
)
slot

Definition at line 1649 of file qcepproperty.cpp.

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

Referenced by resetValue().

1650 {
1651  if (debug()) {
1652  printMessage(tr("%1 QcepDateTimeProperty::setValue(QDateTime \"%2\", int %3) [%4]")
1653  .arg(name()).arg(val.toString()).arg(index).arg(this->index()));
1654  }
1655 
1656  if (index == this->index()) {
1657  setValue(val);
1658  }
1659 }
void setValue(QDateTime 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 QcepDateTimeProperty::setValue ( QDateTime  val)
slot

Definition at line 1661 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(), and valueChanged().

1662 {
1663  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
1664 
1665  if (qcepDebug(DEBUG_PROPERTIES)) {
1666  printMessage(tr("%1: QcepDateTimeProperty::setValue(QDateTime \"%2\")")
1667  .arg(name()).arg(val.toString()));
1668  }
1669 
1670  if (val != m_Value) {
1671  if (debug()) {
1672  printMessage(tr("%1: QcepDateTimeProperty::setValue(QDateTime \"%2\") [%3]")
1673  .arg(name()).arg(val.toString()).arg(index()));
1674  }
1675 
1676  m_Value = val;
1677 
1679 
1680  if (saver) {
1681  saver->changed(this);
1682  }
1683 
1684  emit valueChanged(m_Value, incIndex(1));
1685  }
1686 }
qint64 qcepDebug(int cond)
Definition: qcepdebug.cpp:26
void valueChanged(QDateTime 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
QcepSettingsSaverWPtr m_Saver
Definition: qcepproperty.h:70

Here is the call graph for this function:

QDateTime QcepDateTimeProperty::value ( ) const

Definition at line 1635 of file qcepproperty.cpp.

References QcepProperty::m_Mutex, and m_Value.

1636 {
1637  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
1638 
1639  return m_Value;
1640 }
QMutex m_Mutex
Definition: qcepproperty.h:69
void QcepDateTimeProperty::valueChanged ( QDateTime  val,
int  index 
)
signal

Referenced by setValue().

Here is the caller graph for this function:

Member Data Documentation

QDateTime QcepDateTimeProperty::m_Default
private

Definition at line 346 of file qcepproperty.h.

Referenced by defaultValue(), and setDefaultValue().

QDateTime QcepDateTimeProperty::m_Value
private

Definition at line 347 of file qcepproperty.h.

Referenced by setValue(), and value().


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