OSSP CVS Repository

ossp - Check-in [3863]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 3863
Date: 2002-Dec-12 17:20:15 (local)
2002-Dec-12 16:20:15 (UTC)
User:ms
Branch:
Comment: Fix closure on clean state bug in a better way.
Tickets:
Inspections:
Files:
ossp-pkg/as/as-gui/as_assist.cpp      1.59 -> 1.60     2 inserted, 1 deleted
ossp-pkg/as/as-gui/as_gui.h      1.50 -> 1.51     1 inserted, 1 deleted
ossp-pkg/as/as-gui/as_table.cpp      1.8 -> 1.9     14 inserted, 0 deleted
ossp-pkg/as/as-gui/as_table.h      1.7 -> 1.8     5 inserted, 1 deleted

ossp-pkg/as/as-gui/as_assist.cpp 1.59 -> 1.60

--- 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)));
 }
 
 //


ossp-pkg/as/as-gui/as_gui.h 1.50 -> 1.51

--- 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


ossp-pkg/as/as-gui/as_table.cpp 1.8 -> 1.9

--- 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);
+    }
+}


ossp-pkg/as/as-gui/as_table.h 1.7 -> 1.8

--- 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

CVSTrac 2.0.1