OSSP CVS Repository

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

Check-in Number: 2903
Date: 2002-Nov-26 23:22:53 (local)
2002-Nov-26 22:22:53 (UTC)
User:ms
Branch:
Comment: Corrected add row on empty table special case, and added an ugly hack to allow for invalid zero dates.
Tickets:
Inspections:
Files:
ossp-pkg/as/as-gui/as_assist.cpp      1.27 -> 1.28     5 inserted, 3 deleted
ossp-pkg/as/as-gui/as_gui.h      1.29 -> 1.30     8 inserted, 7 deleted
ossp-pkg/as/as-gui/as_slot.cpp      1.21 -> 1.22     3 inserted, 2 deleted
ossp-pkg/titraq/titassist.cpp      1.27 -> 1.28     5 inserted, 3 deleted
ossp-pkg/titraq/titraq.h      1.29 -> 1.30     8 inserted, 7 deleted
ossp-pkg/titraq/titslot.cpp      1.21 -> 1.22     3 inserted, 2 deleted

ossp-pkg/as/as-gui/as_assist.cpp 1.27 -> 1.28

--- as_assist.cpp        2002/11/26 21:28:57     1.27
+++ as_assist.cpp        2002/11/26 22:22:53     1.28
@@ -404,6 +404,7 @@
     m_pMaintable->setReadOnly(true);                    // Table is read only
     m_pMaintable->setColumnMovingEnabled(false);        // Ctrl-drag disabled
     m_pMaintable->setSelectionMode(QTable::SingleRow);  // Multi row selection
+    m_pMaintable->setCurrentCell(-1, 0);                // Initial row value -1
     m_pMaintable->setFocusStyle(QTable::FollowStyle);   // How cells are drawn
     m_pMaintable->setLeftMargin(0);             // Get rid of the vertical header
     m_pMaintable->verticalHeader()->hide();     // by hiding it with a margin of 0
@@ -436,8 +437,8 @@
 void Titraqform::setupEditlay(void)
 {
     // Make the date selector
-    QDate Sylvestre(2002, 12, 31);
-    m_pDateedit = new QDateEdit(Sylvestre, m_pCenframe, "Date");
+    m_pDateedit = new QDateEdit(m_pCenframe, "Date");
+    m_pDatezero = new QDate(m_pDateedit->date());                   // Hack to store empty date
     if (m_pDateedit == NULL)                                        // Sanity check
         throw Genexcept("Main window date edit creation failed.");  // Spew errors
 
@@ -446,7 +447,7 @@
     m_pDateedit->setAutoAdvance(true);
     m_pDateedit->setSeparator(trUtf8("."));
 
-    m_pDatelayout->addWidget(m_pDateedit);                       // Finally add the date editor
+    m_pDatelayout->addWidget(m_pDateedit);                          // Finally add the date editor
     QToolTip::add(m_pDateedit, trUtf8("Task Date"));
 
     // Whatsthis info for the date editor
@@ -562,6 +563,7 @@
     if (m_pConfirmbutton == NULL)   // Sanity check
         throw Genexcept("Main window confirm button creation failed.");
     m_pConfirmbutton->setCursor(QCursor(13));
+    m_pConfirmbutton->setPaletteBackgroundColor(QColor(206, 192, 176));
     m_pConfirmbutton->setText(trUtf8("&Confirm"));
     QToolTip::add(m_pConfirmbutton, trUtf8("Confirm Editing"));
     connect(m_pConfirmbutton, SIGNAL(clicked()), this, SLOT(confirmEdit()));


ossp-pkg/as/as-gui/as_gui.h 1.29 -> 1.30

--- as_gui.h     2002/11/26 21:18:48     1.29
+++ as_gui.h     2002/11/26 22:22:53     1.30
@@ -65,13 +65,14 @@
     QStringList *m_pTaskentries;
 
     // Edition widgets
-    QDateEdit   *m_pDateedit;
-    QTimeEdit   *m_pStarttime;
-    QTimeEdit   *m_pEndtime;
-    AmountBox   *m_pAmount;
-    QComboBox   *m_pTasks;
-    QLineEdit   *m_pRemark;
-    QPushButton *m_pConfirmbutton;
+    QDate       *m_pDatezero;           // Hack to store empty date
+    QDateEdit   *m_pDateedit;           // Control used to edit dates
+    QTimeEdit   *m_pStarttime;          // Control used to edit start time
+    QTimeEdit   *m_pEndtime;            // Control used to edit finish time
+    AmountBox   *m_pAmount;             // Control used to edit total time
+    QComboBox   *m_pTasks;              // Control used to choose a task
+    QLineEdit   *m_pRemark;             // Control used to edit remark
+    QPushButton *m_pConfirmbutton;      // Button used to confirm edition
 
 protected slots:
     void cutEntry(void);                // Cut a task entry from the list


ossp-pkg/as/as-gui/as_slot.cpp 1.21 -> 1.22

--- as_slot.cpp  2002/11/26 21:18:48     1.21
+++ as_slot.cpp  2002/11/26 22:22:53     1.22
@@ -13,6 +13,7 @@
 #include "gfx/cwlogo.xpm"       // static const char *s_kpcCwlogo_xpm[]
 #include "gfx/ossplogo.xpm"     // static const char *s_kpcOssplogo_xpm[]
 
+
 //
 // Cut an entry
 //
@@ -75,7 +76,7 @@
 //
 void Titraqform::newDoc(void)
 {
-    m_pMaintable->setNumRows(0);    // Get rid of any data in table
+    m_pMaintable->setNumRows(0); // Get rid of any data in table
 }
 
 //
@@ -200,7 +201,7 @@
     if (!Textdate.isEmpty())
         m_pDateedit->setDate(QDate::fromString(Textdate, Qt::ISODate));
     else
-        m_pDateedit->setDate(QDate::currentDate());
+        m_pDateedit->setDate(*m_pDatezero);
 
     if (!Textstart.isEmpty())
         m_pStarttime->setTime(QTime::fromString(Textstart, Qt::ISODate));




CVSTrac 2.0.1