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

#include <qcepproperty.h>

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

Public Slots

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

Signals

void valueChanged (QRectF val, int index)
 

Public Member Functions

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

QRectF m_Default
 
QRectF 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 553 of file qcepproperty.h.

Constructor & Destructor Documentation

QcepDoubleRectProperty::QcepDoubleRectProperty ( QcepSettingsSaverWPtr  saver,
QObject *  parent,
const char *  name,
QRectF  value,
QString  toolTip 
)

Definition at line 2657 of file qcepproperty.cpp.

2658  : QcepProperty(saver, parent, name, toolTip),
2659  m_Default(value),
2660  m_Value(value)
2661 {
2662 }
QString name() const
QcepProperty(QcepSettingsSaverWPtr saver, QObject *parent, const char *name, QString toolTip)
QString toolTip() const

Member Function Documentation

QRectF QcepDoubleRectProperty::defaultValue ( ) const

Definition at line 2671 of file qcepproperty.cpp.

References m_Default, and QcepProperty::m_Mutex.

Referenced by resetValue().

2672 {
2673  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
2674 
2675  return m_Default;
2676 }
QMutex m_Mutex
Definition: qcepproperty.h:69

Here is the caller graph for this function:

void QcepDoubleRectProperty::resetValue ( )
slot

Definition at line 2726 of file qcepproperty.cpp.

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

2727 {
2728  if (qcepDebug(DEBUG_PROPERTIES)) {
2729  printMessage(tr("%1: QcepDoubleRectProperty::resetValue").arg(name()));
2730  }
2731 
2733 }
QRectF defaultValue() const
qint64 qcepDebug(int cond)
Definition: qcepdebug.cpp:26
void setValue(QRectF val, int index)
virtual void printMessage(QString msg, QDateTime dt=QDateTime::currentDateTime())
QString name() const

Here is the call graph for this function:

void QcepDoubleRectProperty::setDefaultValue ( QRectF  val)
slot

Definition at line 2717 of file qcepproperty.cpp.

References m_Default, and QcepProperty::m_Mutex.

2718 {
2719  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
2720 
2721  if (val != m_Default) {
2722  m_Default = val;
2723  }
2724 }
QMutex m_Mutex
Definition: qcepproperty.h:69
void QcepDoubleRectProperty::setValue ( QRectF  val,
int  index 
)
slot

Definition at line 2678 of file qcepproperty.cpp.

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

Referenced by resetValue().

2679 {
2680  if (debug()) {
2681  printMessage(tr("%1 QcepDoubleRectProperty::setValue(QRectF([%2,%3],[%4,%5]), int %6) [%7]")
2682  .arg(name()).arg(val.left()).arg(val.top()).arg(val.right()).arg(val.bottom()).arg(index).arg(this->index()));
2683  }
2684 
2685  if (index == this->index()) {
2686  setValue(val);
2687  }
2688 }
void setValue(QRectF 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 QcepDoubleRectProperty::setValue ( QRectF  val)
slot

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

2691 {
2692  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
2693 
2694  if (qcepDebug(DEBUG_PROPERTIES)) {
2695  printMessage(tr("%1: QcepDoubleRectProperty::setValue(QRectF([%2,%3],[%4,%5])")
2696  .arg(name()).arg(val.top()).arg(val.right()).arg(val.bottom()));
2697  }
2698 
2699  if (val != m_Value) {
2700  if (debug()) {
2701  printMessage(tr("%1: QcepDoubleRectProperty::setValue(QRectF([%2,%3],[%4,%5])) [%6]")
2702  .arg(name()).arg(val.top()).arg(val.right()).arg(val.bottom()).arg(index()));
2703  }
2704 
2705  m_Value = val;
2706 
2708 
2709  if (saver) {
2710  saver->changed(this);
2711  }
2712 
2713  emit valueChanged(m_Value, incIndex(1));
2714  }
2715 }
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())
void valueChanged(QRectF 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:

QRectF QcepDoubleRectProperty::value ( ) const

Definition at line 2664 of file qcepproperty.cpp.

References QcepProperty::m_Mutex, and m_Value.

2665 {
2666  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
2667 
2668  return m_Value;
2669 }
QMutex m_Mutex
Definition: qcepproperty.h:69
void QcepDoubleRectProperty::valueChanged ( QRectF  val,
int  index 
)
signal

Referenced by setValue().

Here is the caller graph for this function:

Member Data Documentation

QRectF QcepDoubleRectProperty::m_Default
private

Definition at line 571 of file qcepproperty.h.

Referenced by defaultValue(), and setDefaultValue().

QRectF QcepDoubleRectProperty::m_Value
private

Definition at line 572 of file qcepproperty.h.

Referenced by setValue(), and value().


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