|
|
|
@ -130,6 +130,10 @@ bool nmGridRowUtils::createAndAddItem(iGridRowItem* pParent,
|
|
|
|
void nmGridRowUtils::connectSignalsOf(iGridRowItem* p)
|
|
|
|
void nmGridRowUtils::connectSignalsOf(iGridRowItem* p)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
iGridRowUtils::connectSignalsOf(p);
|
|
|
|
iGridRowUtils::connectSignalsOf(p);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 连接 sigValueChanged,值改变立即同步到数据层
|
|
|
|
|
|
|
|
connect(p, SIGNAL(sigValueChanged(QString, QVariant)),
|
|
|
|
|
|
|
|
this, SLOT(slotItemValueChanged(QString, QVariant)));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void nmGridRowUtils::bindItems()
|
|
|
|
void nmGridRowUtils::bindItems()
|
|
|
|
@ -141,15 +145,9 @@ void nmGridRowUtils::bindItems()
|
|
|
|
// 槽函数
|
|
|
|
// 槽函数
|
|
|
|
// ================================================================
|
|
|
|
// ================================================================
|
|
|
|
|
|
|
|
|
|
|
|
void nmGridRowUtils::onActiveItemChanged(iGridRowItem* p)
|
|
|
|
void nmGridRowUtils::slotItemValueChanged(QString sPara, QVariant o)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// 基类调用前,m_pItemSel 仍是上一个编辑项
|
|
|
|
emit sigParaChanged(sPara, o);
|
|
|
|
// 在此时同步其最终值,避免中间态非法值污染数据层
|
|
|
|
|
|
|
|
if (m_pItemSel && m_pItemSel != p) {
|
|
|
|
|
|
|
|
emit sigParaChanged(m_pItemSel->getName(), m_pItemSel->getCurValue());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
iGridRowUtils::onActiveItemChanged(p);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void nmGridRowUtils::slotGetValueOf(QString sPara, QVariant& o, bool& bOk)
|
|
|
|
void nmGridRowUtils::slotGetValueOf(QString sPara, QVariant& o, bool& bOk)
|
|
|
|
|