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

#include <qcepproperty.h>

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

Public Slots

void setCurrentIndex (int value, int index)
 
void setCurrentIndex (int value)
 

Signals

void currentIndexChanged (int value, int index)
 

Public Member Functions

 QcepIntPropertyComboBoxHelper (QComboBox *comboBox, QcepIntProperty *property)
 
void connect ()
 

Private Attributes

QComboBox * m_ComboBox
 
QcepIntPropertym_Property
 

Detailed Description

Definition at line 180 of file qcepproperty.h.

Constructor & Destructor Documentation

QcepIntPropertyComboBoxHelper::QcepIntPropertyComboBoxHelper ( QComboBox *  comboBox,
QcepIntProperty property 
)

Definition at line 1130 of file qcepproperty.cpp.

1131  : QObject(comboBox),
1132  m_ComboBox(comboBox),
1133  m_Property(property)
1134 {
1135 }
QcepIntProperty * m_Property
Definition: qcepproperty.h:196

Member Function Documentation

void QcepIntPropertyComboBoxHelper::connect ( )

Definition at line 1137 of file qcepproperty.cpp.

References CONNECT_CHECK, currentIndexChanged(), m_ComboBox, and setCurrentIndex().

Referenced by QcepIntProperty::linkTo().

1138 {
1139  CONNECT_CHECK(QObject::connect(m_ComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(setCurrentIndex(int)), Qt::DirectConnection));
1140 }
void currentIndexChanged(int value, int index)
void setCurrentIndex(int value, int index)
#define CONNECT_CHECK(res)
Definition: qcepmacros.h:14

Here is the call graph for this function:

Here is the caller graph for this function:

void QcepIntPropertyComboBoxHelper::currentIndexChanged ( int  value,
int  index 
)
signal

Referenced by connect(), and setCurrentIndex().

Here is the caller graph for this function:

void QcepIntPropertyComboBoxHelper::setCurrentIndex ( int  value,
int  index 
)
slot

Definition at line 1142 of file qcepproperty.cpp.

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

Referenced by connect().

1143 {
1145  m_Property->printMessage(tr("%1: QcepIntPropertyComboBoxHelper::setValue(int %2, int %3) [%4,%5]")
1146  .arg(m_Property->name()).arg(value).arg(index)
1147  .arg(m_Property->index()).arg(m_ComboBox->currentIndex()));
1148  }
1149 
1150  if (m_Property->index() == index) {
1151  if (m_ComboBox->currentIndex() != value) {
1153  m_Property->printMessage(tr("%1: QcepIntPropertyComboBoxHelper comboBox %2 set to %3")
1154  .arg(m_Property->name()).arg(m_ComboBox->objectName()).arg(value));
1155  }
1156 
1157  bool block = m_ComboBox->blockSignals(true);
1158  m_ComboBox->setCurrentIndex(value);
1159  m_ComboBox->blockSignals(block);
1160  }
1161  }
1162 }
qint64 qcepDebug(int cond)
Definition: qcepdebug.cpp:26
virtual void printMessage(QString msg, QDateTime dt=QDateTime::currentDateTime())
QString name() const
int debug() const
QcepIntProperty * m_Property
Definition: qcepproperty.h:196

Here is the call graph for this function:

Here is the caller graph for this function:

void QcepIntPropertyComboBoxHelper::setCurrentIndex ( int  value)
slot

Definition at line 1164 of file qcepproperty.cpp.

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

1165 {
1167  m_Property->printMessage(tr("%1: QcepIntPropertyComboBoxHelper::setValue(int %2)")
1168  .arg(m_Property->name()).arg(value));
1169  }
1170 
1171  emit currentIndexChanged(value, m_Property->incIndex(1));
1172 }
void currentIndexChanged(int value, int index)
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
QcepIntProperty * m_Property
Definition: qcepproperty.h:196

Here is the call graph for this function:

Member Data Documentation

QComboBox* QcepIntPropertyComboBoxHelper::m_ComboBox
private

Definition at line 195 of file qcepproperty.h.

Referenced by connect(), and setCurrentIndex().

QcepIntProperty* QcepIntPropertyComboBoxHelper::m_Property
private

Definition at line 196 of file qcepproperty.h.

Referenced by setCurrentIndex().


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