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

#include <qcepproperty.h>

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

Public Slots

void setText (QString value, int index)
 
void setText ()
 

Signals

void textEdited (QString value, int index)
 

Public Member Functions

 QcepStringPropertyTextEditHelper (QTextEdit *textEdit, QcepStringProperty *property)
 
void connect ()
 

Private Attributes

QTextEdit * m_TextEdit
 
QcepStringPropertym_Property
 

Detailed Description

Definition at line 309 of file qcepproperty.h.

Constructor & Destructor Documentation

QcepStringPropertyTextEditHelper::QcepStringPropertyTextEditHelper ( QTextEdit *  textEdit,
QcepStringProperty property 
)

Definition at line 1533 of file qcepproperty.cpp.

1534  : QObject(textEdit),
1535  m_TextEdit(textEdit),
1536  m_Property(property)
1537 {
1538 }
QcepStringProperty * m_Property
Definition: qcepproperty.h:325

Member Function Documentation

void QcepStringPropertyTextEditHelper::connect ( )

Definition at line 1540 of file qcepproperty.cpp.

References CONNECT_CHECK, m_TextEdit, and setText().

1541 {
1542  CONNECT_CHECK(QObject::connect(m_TextEdit, SIGNAL(textChanged()), this, SLOT(setText()), Qt::DirectConnection));
1543 }
#define CONNECT_CHECK(res)
Definition: qcepmacros.h:14

Here is the call graph for this function:

void QcepStringPropertyTextEditHelper::setText ( QString  value,
int  index 
)
slot

Definition at line 1545 of file qcepproperty.cpp.

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

1546 {
1548  m_Property->printMessage(tr("%1: QcepStringPropertyTextEditHelper::setText(QString \"%2\", int %3) [%4,%5]")
1549  .arg(m_Property->name()).arg(value).arg(index)
1550  .arg(m_Property->index()).arg(m_TextEdit->toPlainText()));
1551  }
1552 
1553  if (m_Property->index() == index) {
1554  if (m_TextEdit->toPlainText() != value) {
1556  m_Property->printMessage(tr("%1: QcepStringPropertyTextEditHelper textEdit %2 set to %3")
1557  .arg(m_Property->name()).arg(m_TextEdit->objectName()).arg(value));
1558  }
1559 
1560  bool block = m_TextEdit->blockSignals(true);
1561  m_TextEdit->setText(value);
1562  m_TextEdit->blockSignals(block);
1563  }
1564  }
1565 }
qint64 qcepDebug(int cond)
Definition: qcepdebug.cpp:26
virtual void printMessage(QString msg, QDateTime dt=QDateTime::currentDateTime())
QString name() const
QcepStringProperty * m_Property
Definition: qcepproperty.h:325
int debug() const

Here is the call graph for this function:

void QcepStringPropertyTextEditHelper::setText ( )
slot

Definition at line 1567 of file qcepproperty.cpp.

References QcepProperty::debug(), DEBUG_PROPERTIES, QcepProperty::incIndex(), m_Property, m_TextEdit, QcepProperty::name(), QcepProperty::printMessage(), qcepDebug(), textEdited(), and QcepByteArrayProperty::value().

Referenced by connect().

1568 {
1569  QString value = m_TextEdit->toPlainText();
1570 
1572  m_Property->printMessage(tr("%1: QcepStringPropertyTextEditHelper::setText(QString \"%2\")")
1573  .arg(m_Property->name()).arg(value));
1574  }
1575 
1576  emit textEdited(value, m_Property->incIndex(1));
1577 }
qint64 qcepDebug(int cond)
Definition: qcepdebug.cpp:26
int incIndex(int step)
virtual void printMessage(QString msg, QDateTime dt=QDateTime::currentDateTime())
void textEdited(QString value, int index)
QString name() const
QcepStringProperty * m_Property
Definition: qcepproperty.h:325
int debug() const

Here is the call graph for this function:

Here is the caller graph for this function:

void QcepStringPropertyTextEditHelper::textEdited ( QString  value,
int  index 
)
signal

Referenced by setText().

Here is the caller graph for this function:

Member Data Documentation

QcepStringProperty* QcepStringPropertyTextEditHelper::m_Property
private

Definition at line 325 of file qcepproperty.h.

Referenced by setText().

QTextEdit* QcepStringPropertyTextEditHelper::m_TextEdit
private

Definition at line 324 of file qcepproperty.h.

Referenced by connect(), and setText().


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