OSSP CVS Repository

ossp - Difference in ossp-pkg/as/as-gui/as_table.cpp versions 1.15 and 1.16
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/as/as-gui/as_table.cpp 1.15 -> 1.16

--- as_table.cpp 2002/12/17 16:47:30     1.15
+++ as_table.cpp 2002/12/17 16:55:08     1.16
@@ -124,6 +124,7 @@
         this->setText(nIter, TITRAQ_IDXLINE, QString::number(nIter).rightJustify(4, QChar('0')));
 }
 
+// Overriden member to render edge rows differently according to a sort key
 void TiTable::paintCell(QPainter *pPainter, int nRow, int nCol, const QRect &Recto, bool bSelect, const QColorGroup &Colgroup)
 {
     QColorGroup Cgroup(Colgroup);
@@ -140,3 +141,23 @@
 
     QTable::paintCell(pPainter, nRow, nCol, Recto, bSelect, Cgroup);
 };
+
+// Blah
+void TiTable::activateNextCell(void)
+{
+    int nIter = 1; // Logic to skip invisible or read only columns
+    while (columnWidth((currentColumn() + nIter) % TITRAQ_IDXTAIL) <= 0
+        || isColumnReadOnly((currentColumn() + nIter) % TITRAQ_IDXTAIL))
+        nIter++;
+
+    // Advance the column or both row and column possibly
+    int nColadvance = ((currentColumn() + nIter) % TITRAQ_IDXTAIL);
+    if ((currentColumn() + nIter) >= TITRAQ_IDXTAIL)
+        this->setCurrentCell(currentRow() + 1, nColadvance);
+    else
+        this->setCurrentCell(currentRow(), nColadvance);
+    this->setReadOnly(false);
+    this->editCell(currentRow(), currentColumn());
+    this->setEdition(currentColumn());
+    this->setReadOnly(true);
+}

CVSTrac 2.0.1