cctw  0.2.1
Public Slots | Signals | Public Member Functions | Private Attributes | List of all members
CctwDoubleVector3DPropertyDoubleSpinBoxHelper Class Reference

#include <cctwdoublevector3dproperty.h>

Inheritance diagram for CctwDoubleVector3DPropertyDoubleSpinBoxHelper:
Inheritance graph
Collaboration diagram for CctwDoubleVector3DPropertyDoubleSpinBoxHelper:
Collaboration graph

Public Slots

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

Signals

void subValueChanged (int axis, double value, int index)
 

Public Member Functions

 CctwDoubleVector3DPropertyDoubleSpinBoxHelper (QDoubleSpinBox *spinBox, CctwDoubleVector3DProperty *property, int axis)
 
void connect ()
 

Private Attributes

QDoubleSpinBox * m_DoubleSpinBox
 
CctwDoubleVector3DPropertym_Property
 
int m_Axis
 

Detailed Description

Definition at line 44 of file cctwdoublevector3dproperty.h.

Constructor & Destructor Documentation

CctwDoubleVector3DPropertyDoubleSpinBoxHelper::CctwDoubleVector3DPropertyDoubleSpinBoxHelper ( QDoubleSpinBox *  spinBox,
CctwDoubleVector3DProperty property,
int  axis 
)

Definition at line 204 of file cctwdoublevector3dproperty.cpp.

205  : QObject(spinBox),
206  m_DoubleSpinBox(spinBox),
207  m_Property(property),
208  m_Axis(axis)
209 {
210 }

Member Function Documentation

void CctwDoubleVector3DPropertyDoubleSpinBoxHelper::connect ( )

Definition at line 212 of file cctwdoublevector3dproperty.cpp.

References m_DoubleSpinBox, and setValue().

Referenced by CctwDoubleVector3DProperty::linkTo().

213 {
214  CONNECT_CHECK(QObject::connect(m_DoubleSpinBox, SIGNAL(valueChanged(double)), this, SLOT(setValue(double)), Qt::DirectConnection));
215 }
void CctwDoubleVector3DPropertyDoubleSpinBoxHelper::setSubValue ( int  axis,
double  value,
int  index 
)
slot

Definition at line 217 of file cctwdoublevector3dproperty.cpp.

References m_Axis, m_DoubleSpinBox, and m_Property.

218 {
219  if (m_Property->index() == index) {
220  if (m_Axis == axis) {
221  if (m_DoubleSpinBox->value() != value) {
222  bool block = m_DoubleSpinBox->blockSignals(true);
223  m_DoubleSpinBox->setValue(value);
224  m_DoubleSpinBox->blockSignals(block);
225  }
226  }
227  }
228 }
void CctwDoubleVector3DPropertyDoubleSpinBoxHelper::setValue ( double  value)
slot

Definition at line 230 of file cctwdoublevector3dproperty.cpp.

References m_Axis, m_Property, and subValueChanged().

Referenced by connect().

231 {
232  emit subValueChanged(m_Axis, value, m_Property->incIndex(1));
233 }
void subValueChanged(int axis, double value, int index)
void CctwDoubleVector3DPropertyDoubleSpinBoxHelper::subValueChanged ( int  axis,
double  value,
int  index 
)
signal

Referenced by setValue().

Member Data Documentation

int CctwDoubleVector3DPropertyDoubleSpinBoxHelper::m_Axis
private

Definition at line 61 of file cctwdoublevector3dproperty.h.

Referenced by setSubValue(), and setValue().

QDoubleSpinBox* CctwDoubleVector3DPropertyDoubleSpinBoxHelper::m_DoubleSpinBox
private

Definition at line 59 of file cctwdoublevector3dproperty.h.

Referenced by connect(), and setSubValue().

CctwDoubleVector3DProperty* CctwDoubleVector3DPropertyDoubleSpinBoxHelper::m_Property
private

Definition at line 60 of file cctwdoublevector3dproperty.h.

Referenced by setSubValue(), and setValue().


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