OSSP CVS Repository

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

ossp-pkg/as/as-gui/as_slot.cpp 1.12 -> 1.13

--- as_slot.cpp  2002/11/25 11:40:07     1.12
+++ as_slot.cpp  2002/11/25 15:45:06     1.13
@@ -1,5 +1,7 @@
 // Qt headers
 #include <qfiledialog.h>
+#include <qcombobox.h>
+#include <qregexp.h>
 
 // User interface
 #include "titraq.h"             // Main classes
@@ -189,10 +191,22 @@
 //
 // Update the edit controls contents
 //
-void Titraqform::updEdit(int, int)
+void Titraqform::updEdit(int nRow, int nCol)
 {
-    Prototype Unimp;
-    Unimp.doMbox();
+    QString Tasktext;               // For searching through prefixed task text
+    QRegExp Shorten("/(\\w+)$");    // For stripping prefix off the current task
+
+    m_pDateedit->setDate(QDate::fromString(m_pMaintable->text(nRow, TITRAQ_INDEXDATE), Qt::ISODate));
+    m_pStarttime->setTime(QTime::fromString(m_pMaintable->text(nRow, TITRAQ_INDEXAMOUNT), Qt::ISODate));
+    m_pEndtime->setTime(QTime::fromString(m_pMaintable->text(nRow, TITRAQ_INDEXAMOUNT), Qt::ISODate));
+    m_pAmount->setText(m_pMaintable->text(nRow, TITRAQ_INDEXAMOUNT));
+
+    // Process the task combo box to compress text length
+    Tasktext = m_pMaintable->text(nRow, TITRAQ_INDEXTASK);
+    Tasktext.remove(0, Shorten.search(Tasktext) + 1);       // Add one to strip leading slash
+
+    m_pTasks->setCurrentText(Tasktext);
+    m_pRemark->setText(m_pMaintable->text(nRow, TITRAQ_INDEXREMARK));
 }
 
 //

CVSTrac 2.0.1