--- as_assist.cpp 2003/01/22 23:57:01 1.82
+++ as_assist.cpp 2003/01/24 16:32:18 1.83
@@ -655,11 +655,8 @@
// Table update signals
connect(m_pMaintable, SIGNAL(currentChanged(int, int)), this, SLOT(updEdit(int, int)));
- connect(m_pMaintable, SIGNAL(currentChanged(int, int)), this, SLOT(validateData(int, int)));
connect(m_pMaintable, SIGNAL(doubleClicked(int, int, int, const QPoint&)), this, SLOT(inplaceEdit(int, int, int, const QPoint&)));
connect(m_pTablehead, SIGNAL(sizeChange(int, int, int)), this, SLOT(updSizes(int, int, int)));
- connect(m_pMaintable, SIGNAL(valueChanged(int, int)), this, SLOT(dataChanged(int, int)));
- connect(m_pMaintable, SIGNAL(valueChanged(int, int)), this, SLOT(validateData(int, int)));
connect(m_pMaintable, SIGNAL(textEdited(int, int)), this, SLOT(dataChanged(int, int)));
}
@@ -918,6 +915,23 @@
connect(m_pAmount, SIGNAL(valueChanged(const QString &)), this, SLOT(updateAmount(const QString &)));
connect(m_pTasks, SIGNAL(textChanged(const QString &)), this, SLOT(updateTask(const QString &)));
connect(m_pRemark, SIGNAL(textChanged(const QString &)), this, SLOT(updateRemark(const QString &)));
+
+ // Validate data just as it is being entered
+ connect(m_pDateedit, SIGNAL(valueChanged(const QDate &)), this, SLOT(validateData(void)));
+ connect(m_pStarttime, SIGNAL(valueChanged(const QTime &)), this, SLOT(validateData(void)));
+ connect(m_pEndtime, SIGNAL(valueChanged(const QTime &)), this, SLOT(validateData(void)));
+ connect(m_pAmount, SIGNAL(valueChanged(const QString &)), this, SLOT(validateData(void)));
+ connect(m_pTasks, SIGNAL(textChanged(const QString &)), this, SLOT(validateData(void)));
+ connect(m_pRemark, SIGNAL(textChanged(const QString &)), this, SLOT(validateData(void)));
+
+ // Correctly update checksum and revision fields also
+ connect(m_pUseredit, SIGNAL(textChanged(const QString &)), this, SLOT(calcCrc(void)));
+ connect(m_pDateedit, SIGNAL(valueChanged(const QDate &)), this, SLOT(calcCrc(void)));
+ connect(m_pStarttime, SIGNAL(valueChanged(const QTime &)), this, SLOT(calcCrc(void)));
+ connect(m_pEndtime, SIGNAL(valueChanged(const QTime &)), this, SLOT(calcCrc(void)));
+ connect(m_pAmount, SIGNAL(valueChanged(const QString &)), this, SLOT(calcCrc(void)));
+ connect(m_pTasks, SIGNAL(textChanged(const QString &)), this, SLOT(calcCrc(void)));
+ connect(m_pRemark, SIGNAL(textChanged(const QString &)), this, SLOT(calcCrc(void)));
}
//
|