OSSP CVS Repository

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

Check-in Number: 3852
Date: 2002-Dec-10 13:06:56 (local)
2002-Dec-10 12:06:56 (UTC)
User:ms
Branch:
Comment: In order to prepare for missing data format implementations, replace last globals with constants, remove unused constants, and remove incomplete task truncating until a better solution is found.
Tickets:
Inspections:
Files:
ossp-pkg/as/as-gui/as_assist.cpp      1.53 -> 1.54     3 inserted, 3 deleted
ossp-pkg/as/as-gui/as_const.h      1.16 -> 1.17     2 inserted, 4 deleted
ossp-pkg/as/as-gui/as_gui.h      1.43 -> 1.44     0 inserted, 1 deleted
ossp-pkg/as/as-gui/as_slot.cpp      1.44 -> 1.45     2 inserted, 2 deleted
ossp-pkg/as/as-gui/as_table.cpp      1.7 -> 1.8     1 inserted, 1 deleted

ossp-pkg/as/as-gui/as_assist.cpp 1.53 -> 1.54

--- as_assist.cpp        2002/12/10 00:00:57     1.53
+++ as_assist.cpp        2002/12/10 12:06:56     1.54
@@ -469,7 +469,7 @@
     m_pMaintable = new TiTable(m_pCenframe, "Maintable");
     if (m_pMaintable == NULL)   // Sanity check
         throw Genexcept("Main window table creation failed.");
-    m_pMaintable->setNumCols(g_knCols);
+    m_pMaintable->setNumCols(TITRAQ_IDXTAIL);
     m_pMaintable->setReadOnly(true);                    // Table is read only
     m_pMaintable->setColumnMovingEnabled(false);        // Ctrl-drag disabled
     m_pMaintable->setSelectionMode(QTable::MultiRow);   // Multi row selection
@@ -478,9 +478,9 @@
     m_pMaintable->setLeftMargin(0);             // Get rid of the vertical header
     m_pMaintable->verticalHeader()->hide();     // by hiding it with a margin of 0
     m_pMaintable->horizontalHeader()->setResizeEnabled(true);
-    m_pMaintable->horizontalHeader()->setClickEnabled(true); // No click signals
+    m_pMaintable->horizontalHeader()->setClickEnabled(true); // Allow click signals
     m_pMaintable->horizontalHeader()->setTracking(false); // No continuous tracking
-    m_pMaintable->setColumnStretchable(g_knCols - 1, true);
+    m_pMaintable->setColumnStretchable(TITRAQ_IDXTAIL - 1, true);
     m_pMaintable->setSorting(false);
 
     // Table header row


ossp-pkg/as/as-gui/as_const.h 1.16 -> 1.17

--- as_const.h   2002/12/05 14:51:29     1.16
+++ as_const.h   2002/12/10 12:06:56     1.17
@@ -62,7 +62,7 @@
 #define TITRAQ_IDXAMOUNT        3
 #define TITRAQ_IDXTASK          4
 #define TITRAQ_IDXREMARK        5
-#define TITRAQ_IDXEND           6
+#define TITRAQ_IDXTAIL          6
 
 // Indexes of popup menu submenus
 #define TITRAQ_IDXFILEBAR       1
@@ -74,12 +74,10 @@
 #define TITRAQ_MAINWINHEIGHT    480         // Default main window height
 #define TITRAQ_MARGIN           10          // Default layout margin
 #define TITRAQ_SPACING          6           // Default layout spacing
+#define TITRAQ_NUMBLOCKS        32          // Block size of a timesheet
 #define TITRAQ_MAXAMOUNT        960         // Maximum valid amount
 #define TITRAQ_MINAMOUNT        0           // Minimum valid amount
 #define TITRAQ_STEPAMOUNT       15          // Line step interval
 #define TITRAQ_MINSINHOUR       60          // Only idiots don't know this
-#define TITRAQ_YES              1           // To signal yes in general
-#define TITRAQ_NO               0           // To signal no in general
-#define TITRAQ_CANCEL           -1          // To not signal anything
 
 #endif // TITCONST_H


ossp-pkg/as/as-gui/as_gui.h 1.43 -> 1.44

--- as_gui.h     2002/12/05 18:03:53     1.43
+++ as_gui.h     2002/12/10 12:06:56     1.44
@@ -58,7 +58,6 @@
 
 // Main table size
 const int g_knBlocks = 32;
-const int g_knCols = 6;
 
 // Styles enumeration
 typedef enum


ossp-pkg/as/as-gui/as_slot.cpp 1.44 -> 1.45

--- as_slot.cpp  2002/12/10 00:00:57     1.44
+++ as_slot.cpp  2002/12/10 12:06:56     1.45
@@ -439,7 +439,7 @@
 //
 void Titraqform::updEdit(int nRow, int nCol)
 {
-    QRegExp Shorten("/(\\w+)$");    // For stripping prefix off the current task
+//    QRegExp Shorten("/(\\w+)$");    // For stripping prefix off the current task
 
     // Field strings to check for validity and process
     QString Textdate(m_pMaintable->text(nRow, TITRAQ_IDXDATE));
@@ -465,7 +465,7 @@
         m_pAmount->setText(Textamount);
 
     if (!Texttask.isNull()) { // Process task combo box to compress text length
-        Texttask.remove(0, Shorten.search(Texttask) + 1); // Strip leading slash
+//        Texttask.remove(0, Shorten.search(Texttask) + 1); // Strip leading slash
         m_pTasks->setCurrentText(Texttask);
     }
 


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

--- as_table.cpp 2002/12/09 16:44:37     1.7
+++ as_table.cpp 2002/12/10 12:06:56     1.8
@@ -46,7 +46,7 @@
     else if (pEvent->type() == QEvent::KeyPress) {
         if (((QKeyEvent *)pEvent)->key() == Qt::Key_Tab) {          // Handle tab key
             if (this->getEdition() >= 0) {
-                int nColadvance = ((currentColumn() + 1) % TITRAQ_IDXEND);
+                int nColadvance = ((currentColumn() + 1) % TITRAQ_IDXTAIL);
                 if (nColadvance == 0)   // Advance the column and possibly the row too
                     this->setCurrentCell(currentRow() + 1, nColadvance);
                 else

CVSTrac 2.0.1