Index: ossp-pkg/as/as-gui/as_assist.cpp RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/as_assist.cpp,v rcsdiff -q -kk '-r1.59' '-r1.60' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/as_assist.cpp,v' 2>/dev/null --- as_assist.cpp 2002/12/12 13:20:43 1.59 +++ as_assist.cpp 2002/12/12 16:20:15 1.60 @@ -516,7 +516,8 @@ connect(m_pMaintable, SIGNAL(currentChanged(int, int)), this, SLOT(updEdit(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(dataChanged(void))); + connect(m_pMaintable, SIGNAL(textEdited(void)), this, SLOT(dataChanged(void))); } // Index: ossp-pkg/as/as-gui/as_gui.h RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/as_gui.h,v rcsdiff -q -kk '-r1.50' '-r1.51' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/as_gui.h,v' 2>/dev/null --- as_gui.h 2002/12/12 13:20:43 1.50 +++ as_gui.h 2002/12/12 16:20:15 1.51 @@ -135,7 +135,7 @@ void inplaceEdit(int, int, int, const QPoint &); // Enter in place edit mode void updEdit(int, int); // Update edit controls void updSizes(int, int, int); // Update edit sizes - void dataChanged(int, int); // Timesheet data changed + void dataChanged(void); // Timesheet data changed void updateStatus(const QString &); // Update status column void updateLine(const QString &); // Update line number column void updateUser(const QString &); // Update user column Index: ossp-pkg/as/as-gui/as_table.cpp RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/as_table.cpp,v rcsdiff -q -kk '-r1.8' '-r1.9' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/as_table.cpp,v' 2>/dev/null --- as_table.cpp 2002/12/10 12:06:56 1.8 +++ as_table.cpp 2002/12/12 16:20:15 1.9 @@ -67,3 +67,17 @@ else // Default behaviour is to pass the event onwards return QTable::eventFilter(pObject, pEvent); } + +// Overridden member hack to allow externally connected control +// widgets to influence dirty or clean state of table data +void TiTable::setText(int nRow, int nCol, const QString &nText) +{ + if (this->numRows() > 0) { + // If a cell was edited, emit a signal indicating so + // We can't rely on valueChanged for unknown reasons + if (nText != this->text(nRow, nCol)) + emit textEdited(); + + QTable::setText(nRow, nCol, nText); + } +} Index: ossp-pkg/as/as-gui/as_table.h RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/as_table.h,v rcsdiff -q -kk '-r1.7' '-r1.8' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/as_table.h,v' 2>/dev/null --- as_table.h 2002/12/05 14:51:29 1.7 +++ as_table.h 2002/12/12 16:20:15 1.8 @@ -55,12 +55,16 @@ const int getEdition(void) {return m_nEdit;}; // Which edited column was confirmed void setEdition(const int nEdit = -1) {m_nEdit = nEdit;}; // Set edition status -// // Overridden accessors + // Overridden accessors + void setText(int, int, const QString &); // virtual QTableItem *item(int nRow, int nCol) const {QTable::item(nRow, nCol);}; // Deny a cell special handling of the focus rectangle // by overriding class QTable's paintFocus method virtual void paintFocus(QPainter *, const QRect &) {}; + +signals: + void textEdited(void); // A cell was edited and data was modified }; #endif // TITABLE_H