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

#include <qcepproperty.h>

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

Public Slots

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

Signals

void valueChanged (qint64 val, int index)
 
void stringValueChanged (QString val)
 

Public Member Functions

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

qint64 m_Default
 
qint64 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 599 of file qcepproperty.h.

Constructor & Destructor Documentation

QcepInt64Property::QcepInt64Property ( QcepSettingsSaverWPtr  saver,
QObject *  parent,
const char *  name,
qint64  value,
QString  toolTip 
)

Definition at line 2828 of file qcepproperty.cpp.

2829  : QcepProperty(saver, parent, name, toolTip),
2830  m_Default(value),
2831  m_Value(value)
2832 {
2833 }
qint64 value() const
QString name() const
QcepProperty(QcepSettingsSaverWPtr saver, QObject *parent, const char *name, QString toolTip)
QString toolTip() const

Member Function Documentation

qint64 QcepInt64Property::defaultValue ( ) const

Definition at line 2842 of file qcepproperty.cpp.

References m_Default, and QcepProperty::m_Mutex.

Referenced by resetValue().

2843 {
2844  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
2845 
2846  return m_Default;
2847 }
QMutex m_Mutex
Definition: qcepproperty.h:69

Here is the caller graph for this function:

void QcepInt64Property::incValue ( qint64  step)
slot

Definition at line 2889 of file qcepproperty.cpp.

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

2890 {
2891  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
2892 
2893  if (qcepDebug(DEBUG_PROPERTIES) || debug()) {
2894  printMessage(tr("%1: QcepInt64Property::incValue(qint64 %2)")
2895  .arg(name()).arg(step));
2896  }
2897 
2898  if (step) {
2899  m_Value += step;
2900 
2902 
2903  if (saver) {
2904  saver->changed(this);
2905  }
2906 
2907  emit valueChanged(value(), incIndex(1));
2908  emit stringValueChanged(tr("%1").arg(value()));
2909  }
2910 }
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())
qint64 value() const
QString name() const
QSharedPointer< QcepSettingsSaver > QcepSettingsSaverPtr
void valueChanged(qint64 val, int index)
int debug() const
void stringValueChanged(QString val)
QcepSettingsSaverWPtr m_Saver
Definition: qcepproperty.h:70

Here is the call graph for this function:

void QcepInt64Property::resetValue ( )
slot

Definition at line 2919 of file qcepproperty.cpp.

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

2920 {
2921  if (qcepDebug(DEBUG_PROPERTIES) || debug()) {
2922  printMessage(tr("%1: QcepInt64Property::resetValue").arg(name()));
2923  }
2924 
2926 }
qint64 qcepDebug(int cond)
Definition: qcepdebug.cpp:26
qint64 defaultValue() const
virtual void printMessage(QString msg, QDateTime dt=QDateTime::currentDateTime())
QString name() const
void setValue(qint64 val, int index)
int debug() const

Here is the call graph for this function:

void QcepInt64Property::setDefaultValue ( qint64  val)
slot

Definition at line 2912 of file qcepproperty.cpp.

References m_Default, and QcepProperty::m_Mutex.

2913 {
2914  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
2915 
2916  m_Default = val;
2917 }
QMutex m_Mutex
Definition: qcepproperty.h:69
void QcepInt64Property::setValue ( qint64  val,
int  index 
)
slot

Definition at line 2849 of file qcepproperty.cpp.

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

Referenced by resetValue().

2850 {
2851  if (debug()) {
2852  printMessage(tr("%1 QcepInt64Property::setValue(qint64 %2, int %3) [%4]")
2853  .arg(name()).arg(val).arg(index).arg(this->index()));
2854  }
2855 
2856  if (index == this->index()) {
2857  setValue(val);
2858  }
2859 }
virtual void printMessage(QString msg, QDateTime dt=QDateTime::currentDateTime())
QString name() const
void setValue(qint64 val, int index)
int debug() const

Here is the call graph for this function:

Here is the caller graph for this function:

void QcepInt64Property::setValue ( qint64  val)
slot

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

2862 {
2863  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
2864 
2865  if (qcepDebug(DEBUG_PROPERTIES)) {
2866  printMessage(tr("%1: QcepInt64Property::setValue(qint64 %2)")
2867  .arg(name()).arg(val));
2868  }
2869 
2870  if (val != m_Value) {
2871  if (debug()) {
2872  printMessage(tr("%1: QcepInt64Property::setValue(qint64 %2) [%3]")
2873  .arg(name()).arg(val).arg(index()));
2874  }
2875 
2876  m_Value = val;
2877 
2879 
2880  if (saver) {
2881  saver->changed(this);
2882  }
2883 
2884  emit valueChanged(val, incIndex(1));
2885  emit stringValueChanged(tr("%1").arg(val));
2886  }
2887 }
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())
QString name() const
QSharedPointer< QcepSettingsSaver > QcepSettingsSaverPtr
void valueChanged(qint64 val, int index)
int debug() const
void stringValueChanged(QString val)
QcepSettingsSaverWPtr m_Saver
Definition: qcepproperty.h:70

Here is the call graph for this function:

void QcepInt64Property::stringValueChanged ( QString  val)
signal

Referenced by incValue(), and setValue().

Here is the caller graph for this function:

qint64 QcepInt64Property::value ( ) const

Definition at line 2835 of file qcepproperty.cpp.

References QcepProperty::m_Mutex, and m_Value.

Referenced by incValue().

2836 {
2837  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
2838 
2839  return m_Value;
2840 }
QMutex m_Mutex
Definition: qcepproperty.h:69

Here is the caller graph for this function:

void QcepInt64Property::valueChanged ( qint64  val,
int  index 
)
signal

Referenced by incValue(), QxrdApplication::init(), and setValue().

Here is the caller graph for this function:

Member Data Documentation

qint64 QcepInt64Property::m_Default
private

Definition at line 625 of file qcepproperty.h.

Referenced by defaultValue(), and setDefaultValue().

qint64 QcepInt64Property::m_Value
private

Definition at line 626 of file qcepproperty.h.

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


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