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

#include <cctwintvector3dproperty.h>

Inheritance diagram for CctwIntVector3DPropertySpinBoxHelper:
Inheritance graph
Collaboration diagram for CctwIntVector3DPropertySpinBoxHelper:
Collaboration graph

Public Slots

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

Signals

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

Public Member Functions

 CctwIntVector3DPropertySpinBoxHelper (QSpinBox *spinBox, CctwIntVector3DProperty *property, int axis)
 
void connect ()
 

Private Attributes

QSpinBox * m_SpinBox
 
CctwIntVector3DPropertym_Property
 
int m_Axis
 

Detailed Description

Definition at line 45 of file cctwintvector3dproperty.h.

Constructor & Destructor Documentation

CctwIntVector3DPropertySpinBoxHelper::CctwIntVector3DPropertySpinBoxHelper ( QSpinBox *  spinBox,
CctwIntVector3DProperty property,
int  axis 
)

Definition at line 219 of file cctwintvector3dproperty.cpp.

220  : QObject(spinBox),
221  m_SpinBox(spinBox),
222  m_Property(property),
223  m_Axis(axis)
224 {
225 }

Member Function Documentation

void CctwIntVector3DPropertySpinBoxHelper::connect ( )

Definition at line 227 of file cctwintvector3dproperty.cpp.

References m_SpinBox, and setValue().

Referenced by CctwIntVector3DProperty::linkTo().

228 {
229  CONNECT_CHECK(QObject::connect(m_SpinBox, SIGNAL(valueChanged(int)), this, SLOT(setValue(int)), Qt::DirectConnection));
230 }
void CctwIntVector3DPropertySpinBoxHelper::setSubValue ( int  axis,
int  value,
int  index 
)
slot

Definition at line 232 of file cctwintvector3dproperty.cpp.

References m_Axis, m_Property, and m_SpinBox.

233 {
234  if (m_Property->index() == index) {
235  if (m_Axis == axis) {
236  if (m_SpinBox->value() != value) {
237  bool block = m_SpinBox->blockSignals(true);
238  m_SpinBox->setValue(value);
239  m_SpinBox->blockSignals(block);
240  }
241  }
242  }
243 }
void CctwIntVector3DPropertySpinBoxHelper::setValue ( int  value)
slot

Definition at line 245 of file cctwintvector3dproperty.cpp.

References m_Axis, m_Property, and subValueChanged().

Referenced by connect().

246 {
247  emit subValueChanged(m_Axis, value, m_Property->incIndex(1));
248 }
void subValueChanged(int axis, int value, int index)
void CctwIntVector3DPropertySpinBoxHelper::subValueChanged ( int  axis,
int  value,
int  index 
)
signal

Referenced by setValue().

Member Data Documentation

int CctwIntVector3DPropertySpinBoxHelper::m_Axis
private

Definition at line 62 of file cctwintvector3dproperty.h.

Referenced by setSubValue(), and setValue().

CctwIntVector3DProperty* CctwIntVector3DPropertySpinBoxHelper::m_Property
private

Definition at line 61 of file cctwintvector3dproperty.h.

Referenced by setSubValue(), and setValue().

QSpinBox* CctwIntVector3DPropertySpinBoxHelper::m_SpinBox
private

Definition at line 60 of file cctwintvector3dproperty.h.

Referenced by connect(), and setSubValue().


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