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

#include <qcepproperty.h>

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

Public Slots

void setChecked (bool value, int index)
 
void setChecked (bool value)
 

Signals

void toggled (bool value, int index)
 

Public Member Functions

 QcepBoolPropertyButtonHelper (QAbstractButton *button, QcepBoolProperty *property)
 
void connect ()
 

Private Attributes

QAbstractButton * m_Button
 
QcepBoolPropertym_Property
 

Detailed Description

Definition at line 224 of file qcepproperty.h.

Constructor & Destructor Documentation

QcepBoolPropertyButtonHelper::QcepBoolPropertyButtonHelper ( QAbstractButton *  button,
QcepBoolProperty property 
)

Definition at line 1286 of file qcepproperty.cpp.

1287  : QObject(button),
1288  m_Button(button),
1289  m_Property(property)
1290 {
1291 }
QcepBoolProperty * m_Property
Definition: qcepproperty.h:240
QAbstractButton * m_Button
Definition: qcepproperty.h:239

Member Function Documentation

void QcepBoolPropertyButtonHelper::connect ( )

Definition at line 1293 of file qcepproperty.cpp.

References CONNECT_CHECK, m_Button, setChecked(), and toggled().

Referenced by QcepBoolProperty::linkTo().

1294 {
1295  CONNECT_CHECK(QObject::connect(m_Button, SIGNAL(toggled(bool)), this, SLOT(setChecked(bool)), Qt::DirectConnection));
1296 }
void toggled(bool value, int index)
#define CONNECT_CHECK(res)
Definition: qcepmacros.h:14
void setChecked(bool value, int index)
QAbstractButton * m_Button
Definition: qcepproperty.h:239

Here is the call graph for this function:

Here is the caller graph for this function:

void QcepBoolPropertyButtonHelper::setChecked ( bool  value,
int  index 
)
slot

Definition at line 1298 of file qcepproperty.cpp.

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

Referenced by connect().

1299 {
1301  m_Property->printMessage(tr("%1: QcepBoolPropertyButtonHelper::setChecked(bool %2, int %3) [%4,%5]")
1302  .arg(m_Property->name()).arg(value).arg(index)
1303  .arg(m_Property->index()).arg(m_Button->isChecked()));
1304  }
1305 
1306  if (m_Property->index() == index) {
1307  if (m_Button->isChecked() != value) {
1309  m_Property->printMessage(tr("%1: QcepBoolPropertyButtonHelper button %2 set to %3")
1310  .arg(m_Property->name()).arg(m_Button->objectName()).arg(value));
1311  }
1312 
1313  bool block = m_Button->blockSignals(true);
1314  m_Button->setChecked(value);
1315  m_Button->blockSignals(block);
1316  }
1317  }
1318 }
qint64 qcepDebug(int cond)
Definition: qcepdebug.cpp:26
QcepBoolProperty * m_Property
Definition: qcepproperty.h:240
virtual void printMessage(QString msg, QDateTime dt=QDateTime::currentDateTime())
QString name() const
int debug() const
QAbstractButton * m_Button
Definition: qcepproperty.h:239

Here is the call graph for this function:

Here is the caller graph for this function:

void QcepBoolPropertyButtonHelper::setChecked ( bool  value)
slot

Definition at line 1320 of file qcepproperty.cpp.

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

1321 {
1323  m_Property->printMessage(tr("%1: QcepBoolPropertyButtonHelper::setChecked(bool %2)")
1324  .arg(m_Property->name()).arg(value));
1325  }
1326 
1327  emit toggled(value, m_Property->incIndex(1));
1328 }
qint64 qcepDebug(int cond)
Definition: qcepdebug.cpp:26
QcepBoolProperty * m_Property
Definition: qcepproperty.h:240
int incIndex(int step)
void toggled(bool value, int index)
virtual void printMessage(QString msg, QDateTime dt=QDateTime::currentDateTime())
QString name() const
int debug() const

Here is the call graph for this function:

void QcepBoolPropertyButtonHelper::toggled ( bool  value,
int  index 
)
signal

Referenced by connect(), and setChecked().

Here is the caller graph for this function:

Member Data Documentation

QAbstractButton* QcepBoolPropertyButtonHelper::m_Button
private

Definition at line 239 of file qcepproperty.h.

Referenced by connect(), and setChecked().

QcepBoolProperty* QcepBoolPropertyButtonHelper::m_Property
private

Definition at line 240 of file qcepproperty.h.

Referenced by setChecked().


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