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

#include <qcepproperty.h>

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

Public Slots

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

Signals

void valueChanged (int value, int index)
 

Public Member Functions

 QcepIntPropertySpinBoxHelper (QSpinBox *spinBox, QcepIntProperty *property)
 
void connect ()
 

Private Attributes

QSpinBox * m_SpinBox
 
QcepIntPropertym_Property
 

Detailed Description

Definition at line 161 of file qcepproperty.h.

Constructor & Destructor Documentation

QcepIntPropertySpinBoxHelper::QcepIntPropertySpinBoxHelper ( QSpinBox *  spinBox,
QcepIntProperty property 
)

Definition at line 1087 of file qcepproperty.cpp.

1088  : QObject(spinBox),
1089  m_SpinBox(spinBox),
1090  m_Property(property)
1091 {
1092 }
QcepIntProperty * m_Property
Definition: qcepproperty.h:177

Member Function Documentation

void QcepIntPropertySpinBoxHelper::connect ( )

Definition at line 1094 of file qcepproperty.cpp.

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

Referenced by QcepIntProperty::linkTo().

1095 {
1096  CONNECT_CHECK(QObject::connect(m_SpinBox, SIGNAL(valueChanged(int)), this, SLOT(setValue(int)), Qt::DirectConnection));
1097 }
void valueChanged(int value, int index)
#define CONNECT_CHECK(res)
Definition: qcepmacros.h:14
void setValue(int value, int index)

Here is the call graph for this function:

Here is the caller graph for this function:

void QcepIntPropertySpinBoxHelper::setValue ( int  value,
int  index 
)
slot

Definition at line 1099 of file qcepproperty.cpp.

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

Referenced by connect().

1100 {
1102  m_Property->printMessage(tr("%1: QcepIntPropertySpinBoxHelper::setValue(int %2, int %3) [%4,%5]")
1103  .arg(m_Property->name()).arg(value).arg(index).arg(m_Property->index()).arg(m_SpinBox->value()));
1104  }
1105 
1106  if (m_Property->index() == index) {
1107  if (m_SpinBox->value() != value) {
1109  m_Property->printMessage(tr("%1: QcepIntPropertySpinBoxHelper spinBox %2 set to %3")
1110  .arg(m_Property->name()).arg(m_SpinBox->objectName()).arg(value));
1111  }
1112 
1113  bool block = m_SpinBox->blockSignals(true);
1114  m_SpinBox->setValue(value);
1115  m_SpinBox->blockSignals(block);
1116  }
1117  }
1118 }
qint64 qcepDebug(int cond)
Definition: qcepdebug.cpp:26
virtual void printMessage(QString msg, QDateTime dt=QDateTime::currentDateTime())
QcepIntProperty * m_Property
Definition: qcepproperty.h:177
QString name() const
int debug() const

Here is the call graph for this function:

Here is the caller graph for this function:

void QcepIntPropertySpinBoxHelper::setValue ( int  value)
slot

Definition at line 1120 of file qcepproperty.cpp.

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

1121 {
1123  m_Property->printMessage(tr("%1: QcepIntPropertySpinBoxHelper::setValue(int %2)")
1124  .arg(m_Property->name()).arg(value));
1125  }
1126 
1127  emit valueChanged(value, m_Property->incIndex(1));
1128 }
qint64 qcepDebug(int cond)
Definition: qcepdebug.cpp:26
int incIndex(int step)
virtual void printMessage(QString msg, QDateTime dt=QDateTime::currentDateTime())
void valueChanged(int value, int index)
QcepIntProperty * m_Property
Definition: qcepproperty.h:177
QString name() const
int debug() const

Here is the call graph for this function:

void QcepIntPropertySpinBoxHelper::valueChanged ( int  value,
int  index 
)
signal

Referenced by connect(), and setValue().

Here is the caller graph for this function:

Member Data Documentation

QcepIntProperty* QcepIntPropertySpinBoxHelper::m_Property
private

Definition at line 177 of file qcepproperty.h.

Referenced by setValue().

QSpinBox* QcepIntPropertySpinBoxHelper::m_SpinBox
private

Definition at line 176 of file qcepproperty.h.

Referenced by connect(), and setValue().


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