Index: ossp-pkg/as/as-gui/TODO RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/TODO,v rcsdiff -q -kk '-r1.49' '-r1.50' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/TODO,v' 2>/dev/null --- 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 Index: ossp-pkg/as/as-gui/as_const.h RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/as_const.h,v rcsdiff -q -kk '-r1.30' '-r1.31' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/as_const.h,v' 2>/dev/null --- 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 "." Index: ossp-pkg/as/as-gui/as_table.cpp RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/as_table.cpp,v rcsdiff -q -kk '-r1.14' '-r1.15' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/as_table.cpp,v' 2>/dev/null --- 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); +}; Index: ossp-pkg/as/as-gui/as_table.h RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/as_table.h,v rcsdiff -q -kk '-r1.10' '-r1.11' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/as_table.h,v' 2>/dev/null --- 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 };