--- as_table.cpp 2003/02/14 19:27:03 1.22
+++ as_table.cpp 2003/02/21 10:12:02 1.23
@@ -145,6 +145,16 @@
void TiTable::paintCell(QPainter *pPainter, int nRow, int nCol, const QRect &Recto, bool bSelect, const QColorGroup &Colgroup)
{
QColorGroup Cgroup(Colgroup);
+ int nRed, nGreen, nBlue;
+
+ nRed = m_pTiprefs->getNumber(TITRAQ_PREFLIGHTRED, TITRAQ_DEFLIGHTRED);
+ nGreen = m_pTiprefs->getNumber(TITRAQ_PREFLIGHTGREEN, TITRAQ_DEFLIGHTGREEN);
+ nBlue = m_pTiprefs->getNumber(TITRAQ_PREFLIGHTBLUE, TITRAQ_DEFLIGHTBLUE);
+ QColor Bright = QColor(nRed, nGreen, nBlue);
+ nRed = m_pTiprefs->getNumber(TITRAQ_PREFDARKRED, TITRAQ_DEFDARKRED);
+ nGreen = m_pTiprefs->getNumber(TITRAQ_PREFDARKGREEN, TITRAQ_DEFDARKGREEN);
+ nBlue = m_pTiprefs->getNumber(TITRAQ_PREFDARKBLUE, TITRAQ_DEFDARKBLUE);
+ QColor Dark = QColor(nRed, nGreen, nBlue);
// Alternate color for nonmatching sort keys
QString Cur = this->text(nRow, this->getSortcol());
@@ -158,24 +168,24 @@
// 3 Store information about which color we chose for the current row
if (!Cur.isNull() && !Las.isNull() && Cur == Las) { // Set the base color conditionally
if (this->text(nRow - 1, TITRAQ_IDXSTATUS).at(TITRAQ_IDXSTATCOLOR) == QChar(TITRAQ_BRIGHT)) {
- Cgroup.setColor(QColorGroup::Base, QColor(248, 248, 240)); // Bright
+ Cgroup.setColor(QColorGroup::Base, Bright); // Bright
if (this->text(nRow, TITRAQ_IDXSTATUS).at(TITRAQ_IDXSTATCOLOR) != QChar(TITRAQ_BRIGHT))
this->setText(nRow, TITRAQ_IDXSTATUS, this->text(nRow, TITRAQ_IDXSTATUS).replace(TITRAQ_IDXSTATCOLOR, sizeof(char), QChar(TITRAQ_BRIGHT)));
}
else {
- Cgroup.setColor(QColorGroup::Base, QColor(224, 224, 216)); // Dark
+ Cgroup.setColor(QColorGroup::Base, Dark); // Dark
if (this->text(nRow, TITRAQ_IDXSTATUS).at(TITRAQ_IDXSTATCOLOR) != QChar(TITRAQ_DARK))
this->setText(nRow, TITRAQ_IDXSTATUS, this->text(nRow, TITRAQ_IDXSTATUS).replace(TITRAQ_IDXSTATCOLOR, sizeof(char), QChar(TITRAQ_DARK)));
}
}
else {
if (this->text(nRow - 1, TITRAQ_IDXSTATUS).at(TITRAQ_IDXSTATCOLOR) == QChar(TITRAQ_BRIGHT)) {
- Cgroup.setColor(QColorGroup::Base, QColor(224, 224, 216)); // Dark
+ Cgroup.setColor(QColorGroup::Base, Dark); // Dark
if (this->text(nRow, TITRAQ_IDXSTATUS).at(TITRAQ_IDXSTATCOLOR) != QChar(TITRAQ_DARK))
this->setText(nRow, TITRAQ_IDXSTATUS, this->text(nRow, TITRAQ_IDXSTATUS).replace(TITRAQ_IDXSTATCOLOR, sizeof(char), QChar(TITRAQ_DARK)));
}
else {
- Cgroup.setColor(QColorGroup::Base, QColor(248, 248, 240)); // Bright
+ Cgroup.setColor(QColorGroup::Base, Bright); // Bright
if (this->text(nRow, TITRAQ_IDXSTATUS).at(TITRAQ_IDXSTATCOLOR) != QChar(TITRAQ_BRIGHT))
this->setText(nRow, TITRAQ_IDXSTATUS, this->text(nRow, TITRAQ_IDXSTATUS).replace(TITRAQ_IDXSTATCOLOR, sizeof(char), QChar(TITRAQ_BRIGHT)));
}
|