OSSP CVS Repository

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

Check-in Number: 3891
Date: 2002-Dec-17 17:47:30 (local)
2002-Dec-17 16:47:30 (UTC)
User:ms
Branch:
Comment: Implement rudimentary row shading on sort key, and add GUID and APPID.
Tickets:
Inspections:
Files:
ossp-pkg/as/as-gui/TODO      1.49 -> 1.50     1 inserted, 3 deleted
ossp-pkg/as/as-gui/as_const.h      1.30 -> 1.31     2 inserted, 0 deleted
ossp-pkg/as/as-gui/as_table.cpp      1.14 -> 1.15     17 inserted, 0 deleted
ossp-pkg/as/as-gui/as_table.h      1.10 -> 1.11     3 inserted, 0 deleted

ossp-pkg/as/as-gui/TODO 1.49 -> 1.50

--- TODO 2002/12/17 14:08:33     1.49
+++ TODO 2002/12/17 16:47:30     1.50
@@ -9,8 +9,6 @@
 
 Must do
 -------
-Add GUID
-Add Ex_ID
 Q_CHECK_PTR
 public/private
 Implement an unlimited and generic undo and redo buffer class
@@ -29,7 +27,7 @@
 Reduce dependence to STL by removing cout to QTextStream
 Some signals implemented in Titraqform really belong in satellite classes
 Write M4 macro for detecting cuserid, and prefer cuserid in ac_assist when present
-Krass date block data shading keyed to sort function
+Krassify data shading keyed to sort function
 Does resetting data clean make sense after closeEvent?
 Read config location from optional --confgen autoconf location
 Rework start/new/open/close/quit logic with disabled/enabled widgets


ossp-pkg/as/as-gui/as_const.h 1.30 -> 1.31

--- as_const.h   2002/12/17 14:08:33     1.30
+++ as_const.h   2002/12/17 16:47:30     1.31
@@ -36,6 +36,8 @@
 // General preferences
 #define TITRAQ_PREFNAME         ".asgui"
 #define TITRAQ_APPTITLE         "AS Gui"
+#define TITRAQ_STR_ID           "OSSPASGUI"                         /* APPID */
+#define TITRAQ_UID_ID           0x84fae747e1a64016bf049e98bbc4bd96  /* UUID */
 #define TITRAQ_PREFVER          "0.5"
 #define TITRAQ_PREFHOME         "homedir"
 #define TITRAQ_DEFHOME          "."


ossp-pkg/as/as-gui/as_table.cpp 1.14 -> 1.15

--- as_table.cpp 2002/12/16 17:13:17     1.14
+++ as_table.cpp 2002/12/17 16:47:30     1.15
@@ -123,3 +123,20 @@
     for (int nIter = this->numRows() - 1; nIter >= 0; nIter--)
         this->setText(nIter, TITRAQ_IDXLINE, QString::number(nIter).rightJustify(4, QChar('0')));
 }
+
+void TiTable::paintCell(QPainter *pPainter, int nRow, int nCol, const QRect &Recto, bool bSelect, const QColorGroup &Colgroup)
+{
+    QColorGroup Cgroup(Colgroup);
+
+    // Alternate color for nonmatching sort keys
+    QString Cur = this->text(nRow, this->getSortcol());
+    QString Las = this->text(nRow - 1, this->getSortcol());
+
+    // Set the base color conditionally
+    if (!Cur.isNull() && !Las.isNull() && Cur == Las)
+        Cgroup.setColor(QColorGroup::Base, QColor(248, 248, 240));
+    else
+        Cgroup.setColor(QColorGroup::Base, QColor(232, 232, 224));
+
+    QTable::paintCell(pPainter, nRow, nCol, Recto, bSelect, Cgroup);
+};


ossp-pkg/as/as-gui/as_table.h 1.10 -> 1.11

--- as_table.h   2002/12/16 17:13:17     1.10
+++ as_table.h   2002/12/17 16:47:30     1.11
@@ -71,6 +71,9 @@
     // by overriding class QTable's paintFocus method
     virtual void paintFocus(QPainter *, const QRect &) {};
 
+    // Override for special linewise shading according to sort key
+    virtual void paintCell(QPainter *, int, int, const QRect &, bool, const QColorGroup &);
+
 signals:
     void textEdited(void);  // A cell was edited and data was modified
 };

CVSTrac 2.0.1