--- as_slot.cpp 2002/12/18 14:50:58 1.69
+++ as_slot.cpp 2002/12/18 15:47:18 1.70
@@ -132,6 +132,7 @@
// Update relevant data fields for all new rows
for (int nIter = 0; nIter < nTotal; nIter++) {
+ m_pMaintable->setText(Select.topRow() + nIter, TITRAQ_IDXSTATUS, QString(QChar('W')));
m_pMaintable->setPixmap(Select.topRow() + nIter, TITRAQ_IDXSTATUS, QPixmap(s_kpcStatwarn_xpm));
m_pMaintable->setText(Select.topRow() + nIter, TITRAQ_IDXUSER, m_pPrefs->getString(TITRAQ_PREFUSER, TITRAQ_DEFUSER));
m_pMaintable->setText(Select.topRow() + nIter, TITRAQ_IDXGUID, ".");
@@ -153,6 +154,7 @@
// Update relevant data fields for all new rows
for (int nIter = 1; nIter <= nTotal; nIter++) {
+ m_pMaintable->setText(Select.bottomRow() + nIter, TITRAQ_IDXSTATUS, QString(QChar('W')));
m_pMaintable->setPixmap(Select.bottomRow() + nIter, TITRAQ_IDXSTATUS, QPixmap(s_kpcStatwarn_xpm));
m_pMaintable->setText(Select.bottomRow() + nIter, TITRAQ_IDXUSER, m_pPrefs->getString(TITRAQ_PREFUSER, TITRAQ_DEFUSER));
m_pMaintable->setText(Select.bottomRow() + nIter, TITRAQ_IDXGUID, ".");
@@ -171,6 +173,8 @@
for (int nIter = m_pMaintable->currentRow(); nIter < m_pMaintable->numRows(); nIter++)
m_pMaintable->setText(nIter, TITRAQ_IDXLINE, QString::number(nIter).rightJustify(4, QChar('0')));
+ m_pStatusedit->setPixmap(QPixmap(s_kpcStatwarn_xpm)); // Show pixmap
+
// char szGuitext[37];
// uuid_t Guid;
//
@@ -228,7 +232,7 @@
}
m_pMaintable->repaintContents(true); // Do a general repaint of table
- m_pStatbar->message(trUtf8("Refreshed display"), 4000); // Announce result
+ m_pStatbar->message(trUtf8("Display was refreshed"), 4000); // Announce result
}
//
@@ -669,7 +673,6 @@
// QRegExp Shorten("/(\\w+)$"); // For stripping prefix off the current task
// Field strings to check for validity and process
- QString Textstat(m_pMaintable->text(nRow, TITRAQ_IDXSTATUS));
QString Textline(m_pMaintable->text(nRow, TITRAQ_IDXLINE));
QString Textuser(m_pMaintable->text(nRow, TITRAQ_IDXUSER));
QString Textguid(m_pMaintable->text(nRow, TITRAQ_IDXGUID));
@@ -686,7 +689,7 @@
m_pMaintable->setEdition();
// Set text of member edit controls
- m_pStatusedit->setPixmap(m_pMaintable->pixmap(nRow, nCol));
+ m_pStatusedit->setPixmap(m_pMaintable->pixmap(nRow, TITRAQ_IDXSTATUS));
m_pLineedit->setText(Textline);
m_pUseredit->setText(Textuser);
m_pGuidedit->setText(Textguid);
@@ -736,15 +739,20 @@
m_pMaintable->text(nRow, TITRAQ_IDXAMOUNT).isEmpty() ||
m_pMaintable->text(nRow, TITRAQ_IDXTASK).isEmpty())
{ // No K&R style to show where actual code begins
- if (!Statis.startsWith(QString("E"))) { // Conditionally set pixmap to avoid overhead
+ if (Statis.startsWith(QString("W"))) { // Conditionally set pixmap to avoid overhead
+ m_pStatusedit->setPixmap(m_pMaintable->pixmap(nRow, TITRAQ_IDXSTATUS));
+ }
+ else if (!Statis.startsWith(QString("E"))) { // Conditionally set pixmap to avoid overhead
m_pMaintable->setText(nRow, TITRAQ_IDXSTATUS, Statis.replace(TITRAQ_IDXSTATERROR, sizeof(char), 'E'));
m_pMaintable->setPixmap(nRow, TITRAQ_IDXSTATUS, QPixmap(s_kpcStaterror_xpm));
+ m_pStatusedit->setPixmap(m_pMaintable->pixmap(nRow, TITRAQ_IDXSTATUS));
}
}
else {
if (!Statis.startsWith(QString("O"))) { // Conditionally set pixmap to avoid overhead
m_pMaintable->setText(nRow, TITRAQ_IDXSTATUS, Statis.replace(TITRAQ_IDXSTATERROR, sizeof(char), 'O'));
m_pMaintable->setPixmap(nRow, TITRAQ_IDXSTATUS, QPixmap(s_kpcStatokay_xpm));
+ m_pStatusedit->setPixmap(m_pMaintable->pixmap(nRow, TITRAQ_IDXSTATUS));
}
}
}
|