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

#include <qcepproperty.h>

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

Public Slots

void setValue (double value, int index)
 
void setValue (double value)
 

Signals

void valueChanged (double value, int index)
 

Public Member Functions

 QcepDoublePropertyDoubleSpinBoxHelper (QDoubleSpinBox *spinBox, QcepDoubleProperty *property)
 
void connect ()
 

Private Attributes

QDoubleSpinBox * m_DoubleSpinBox
 
QcepDoublePropertym_Property
 

Detailed Description

Definition at line 112 of file qcepproperty.h.

Constructor & Destructor Documentation

QcepDoublePropertyDoubleSpinBoxHelper::QcepDoublePropertyDoubleSpinBoxHelper ( QDoubleSpinBox *  spinBox,
QcepDoubleProperty property 
)

Definition at line 869 of file qcepproperty.cpp.

870  : QObject(spinBox),
871  m_DoubleSpinBox(spinBox),
872  m_Property(property)
873 {
874 }

Member Function Documentation

void QcepDoublePropertyDoubleSpinBoxHelper::connect ( )

Definition at line 876 of file qcepproperty.cpp.

References CONNECT_CHECK, m_DoubleSpinBox, setValue(), and valueChanged().

Referenced by QcepDoubleProperty::linkTo().

877 {
878  CONNECT_CHECK(QObject::connect(m_DoubleSpinBox, SIGNAL(valueChanged(double)), this, SLOT(setValue(double)), Qt::DirectConnection));
879 }
#define CONNECT_CHECK(res)
Definition: qcepmacros.h:14
void valueChanged(double value, int index)
void setValue(double value, int index)

Here is the call graph for this function:

Here is the caller graph for this function:

void QcepDoublePropertyDoubleSpinBoxHelper::setValue ( double  value,
int  index 
)
slot

Definition at line 881 of file qcepproperty.cpp.

References QcepProperty::debug(), DEBUG_PROPERTIES, QcepProperty::index(), m_DoubleSpinBox, m_Property, QcepProperty::name(), QcepProperty::printMessage(), qcepDebug(), and QcepByteArrayProperty::value().

Referenced by connect().

882 {
884  m_Property->printMessage(tr("%1: QcepDoublePropertyDoubleSpinBoxHelper::setValue(double %2, int %3) [%4,%5]")
885  .arg(m_Property->name()).arg(value).arg(index).arg(m_Property->index()).arg(m_DoubleSpinBox->value()));
886  }
887 
888  if (m_Property->index() == index) {
889  if (m_DoubleSpinBox->value() != value) {
891  m_Property->printMessage(tr("%1: QcepDoublePropertyDoubleSpinBoxHelper spinBox %2 set to %3")
892  .arg(m_Property->name())
893  .arg(m_DoubleSpinBox->objectName())
894  .arg(value));
895  }
896 
897  bool block = m_DoubleSpinBox->blockSignals(true);
898  m_DoubleSpinBox->setValue(value);
899  m_DoubleSpinBox->blockSignals(block);
900  }
901  }
902 }
qint64 qcepDebug(int cond)
Definition: qcepdebug.cpp:26
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 QcepDoublePropertyDoubleSpinBoxHelper::setValue ( double  value)
slot

Definition at line 904 of file qcepproperty.cpp.

References QcepProperty::debug(), DEBUG_PROPERTIES, QcepProperty::incIndex(), m_Property, QcepProperty::name(), QcepProperty::printMessage(), qcepDebug(), and valueChanged().

905 {
907  m_Property->printMessage(tr("%1: QcepDoublePropertyDoubleSpinBoxHelper::setValue(double %2)")
908  .arg(m_Property->name()).arg(value));
909  }
910 
911  emit valueChanged(value, m_Property->incIndex(1));
912 }
qint64 qcepDebug(int cond)
Definition: qcepdebug.cpp:26
int incIndex(int step)
virtual void printMessage(QString msg, QDateTime dt=QDateTime::currentDateTime())
QString name() const
int debug() const
void valueChanged(double value, int index)

Here is the call graph for this function:

void QcepDoublePropertyDoubleSpinBoxHelper::valueChanged ( double  value,
int  index 
)
signal

Referenced by connect(), and setValue().

Here is the caller graph for this function:

Member Data Documentation

QDoubleSpinBox* QcepDoublePropertyDoubleSpinBoxHelper::m_DoubleSpinBox
private

Definition at line 127 of file qcepproperty.h.

Referenced by connect(), and setValue().

QcepDoubleProperty* QcepDoublePropertyDoubleSpinBoxHelper::m_Property
private

Definition at line 128 of file qcepproperty.h.

Referenced by setValue().


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