OSSP CVS Repository

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

Check-in Number: 3836
Date: 2002-Dec-04 21:30:54 (local)
2002-Dec-04 20:30:54 (UTC)
User:ms
Branch:
Comment: Various edition repairs and improvements.
Tickets:
Inspections:
Files:
ossp-pkg/as/as-gui/as_slot.cpp      1.35 -> 1.36     12 inserted, 1 deleted
ossp-pkg/as/as-gui/as_table.h      1.5 -> 1.6     4 inserted, 1 deleted
ossp-pkg/as/as-gui/as_tableitem.h      1.4 -> 1.5     2 inserted, 2 deleted

ossp-pkg/as/as-gui/as_slot.cpp 1.35 -> 1.36

--- as_slot.cpp  2002/12/04 18:56:59     1.35
+++ as_slot.cpp  2002/12/04 20:30:54     1.36
@@ -378,6 +378,11 @@
 //
 void Titraqform::updateTask(const QString &Taskup)
 {
+//    // FIXME: Broken
+//    RtTableItem *pTask = NULL;
+//    pTask = static_cast<RtTableItem *>(m_pMaintable->item(m_pMaintable->currentRow(), TITRAQ_IDXTASK));
+//    pTask->setText(Taskup);
+
     m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXTASK, Taskup);
 }
 
@@ -394,12 +399,18 @@
 //
 void Titraqform::confirmEdit(void)
 {
+    RtTableItem *pTask = NULL;  // Task item is a derived class
+
     // Conversions from edit control data formats to native tabular format
     m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXDATE, m_pDateedit->date().toString(Qt::ISODate));
     m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXSTART, m_pStarttime->time().toString(Qt::ISODate));
     m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXFINISH, m_pEndtime->time().toString(Qt::ISODate));
     m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXAMOUNT, m_pAmount->text());
-    m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXTASK, m_pTasks->currentText());
+
+    // Specially handle task fields
+    pTask = static_cast<RtTableItem *>(m_pMaintable->item(m_pMaintable->currentRow(), TITRAQ_IDXTASK));
+    pTask->setText(m_pTasks->currentText());
+
     m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXREMARK, m_pRemark->text());
 }
 


ossp-pkg/as/as-gui/as_table.h 1.5 -> 1.6

--- as_table.h   2002/12/04 17:31:20     1.5
+++ as_table.h   2002/12/04 20:30:54     1.6
@@ -55,9 +55,12 @@
     const int getEdition(void) {return m_nEdit;};   // Which edited column was confirmed
     void setEdition(const int nEdit = -1) {m_nEdit = nEdit;};   // Set edition status
 
+//    // Overridden accessors
+//    virtual QTableItem *item(int nRow, int nCol) const {QTable::item(nRow, nCol);};
+
     // Deny a cell special handling of the focus rectangle
     // by overriding class QTable's paintFocus method
-    void paintFocus(QPainter *, const QRect &) {};
+    virtual void paintFocus(QPainter *, const QRect &) {};
 };
 
 #endif // TITABLE_H


ossp-pkg/as/as-gui/as_tableitem.h 1.4 -> 1.5

--- as_tableitem.h       2002/11/28 20:44:36     1.4
+++ as_tableitem.h       2002/12/04 20:30:54     1.5
@@ -38,8 +38,8 @@
 class RtTableItem : public QTableItem
 {
 public:
-    RtTableItem(QTable *pTable, EditType eType, const QString &Text) : QTableItem(pTable, eType, Text) {m_nOwnalign = AlignRight | Qt::AlignVCenter;};
-    void setAlignment(int nAlign) {m_nOwnalign = nAlign;};
+    RtTableItem(QTable *pTable, EditType eType, const QString &Text) : QTableItem(pTable, eType, Text) {m_nOwnalign = AlignRight | AlignVCenter;};
+    void setAlignment(int nAlign = AlignRight | AlignVCenter) {m_nOwnalign = nAlign;};
     int alignment() const {return m_nOwnalign;};
 
 private:

CVSTrac 2.0.1