OSSP CVS Repository

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

Check-in Number: 3824
Date: 2002-Dec-04 12:18:12 (local)
2002-Dec-04 11:18:12 (UTC)
User:ms
Branch:
Comment: Integrate mandatory start and finish time fields into current load processing.
Tickets:
Inspections:
Files:
ossp-pkg/as/as-gui/as_dataop.cpp      1.12 -> 1.13     21 inserted, 6 deleted

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

--- as_dataop.cpp        2002/12/03 18:46:25     1.12
+++ as_dataop.cpp        2002/12/04 11:18:12     1.13
@@ -63,6 +63,7 @@
     bool bValid = true; // Used to warn on invalid accounting data
     int nIter = 0;      // Iterator used in loop and also as a count
     QString Line;       // Used for linewise editing and whitespace eating
+    QString Bitbucket;  // Used for null device until we find a better way
 
     // Strip out extra line feeds at stream start
     while (Line.isEmpty() && !Tstream.atEnd())
@@ -74,7 +75,7 @@
     // Set the table text by linewise reading from the input stream
     // and parsing date, time, account, and other columns out of it
     while (!Line.isEmpty()) {
-        QString Date, Account, Amount, Remark;  // Fields of a valid AS file
+        QString Date, Start, Finish, Account, Amount, Remark; // Valid fields
         QTextStream Asline(&Line, IO_ReadOnly); // Convert a single line now
 
         if (nIter % g_knBlocks == 0) // Add blocks of rows to optimize loading
@@ -83,16 +84,30 @@
         Asline.skipWhiteSpace();    // Remove whitespaces
         Asline >> Date;             // Copy the date field
         if (Date != NULL)
-            m_pMaintable->setText(nIter, 0, Date);
+            m_pMaintable->setText(nIter, TITRAQ_IDXDATE, Date);
         else
             bValid = false;
 
-        Asline >> Account;          // Copy to the bit bucket
+        Asline >> Bitbucket;        // Ignore user field
+
+        Asline.skipWhiteSpace();    // Remove whitespaces
+        Asline >> Start;            // Copy the date field
+        if (Start != NULL)
+            m_pMaintable->setText(nIter, TITRAQ_IDXSTART, Start);
+        else
+            bValid = false;
+
+        Asline.skipWhiteSpace();    // Remove whitespaces
+        Asline >> Finish;           // Copy the date field
+        if (Start != NULL)
+            m_pMaintable->setText(nIter, TITRAQ_IDXFINISH, Finish);
+        else
+            bValid = false;
 
         Asline.skipWhiteSpace();    // Remove whitespaces
         Asline >> Account;          // Copy the account field
         if (Account != NULL) {
-            m_pMaintable->setItem(nIter, 4, new RtTableItem(m_pMaintable, QTableItem::WhenCurrent, Account));
+            m_pMaintable->setItem(nIter, TITRAQ_IDXTASK, new RtTableItem(m_pMaintable, QTableItem::WhenCurrent, Account));
         }
         else
             bValid = false;
@@ -100,14 +115,14 @@
         Asline.skipWhiteSpace();    // Remove whitespaces
         Asline >> Amount;           // Copy the amount field
         if (Amount != NULL)
-            m_pMaintable->setText(nIter, 3, Amount);
+            m_pMaintable->setText(nIter, TITRAQ_IDXAMOUNT, Amount);
         else
             bValid = false;
 
         Asline.skipWhiteSpace();    // Remove whitespaces
         Remark = Asline.read();     // Copy the remark field
         if (Remark != NULL)
-            m_pMaintable->setText(nIter, 5, Remark);
+            m_pMaintable->setText(nIter, TITRAQ_IDXREMARK, Remark);
 
         nIter++;    // The big increment
         Line = "";  // Clear line for next round

CVSTrac 2.0.1