Index: ossp-pkg/as/as-gui/as_dataop.cpp RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/as_dataop.cpp,v rcsdiff -q -kk '-r1.23' '-r1.24' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/as_dataop.cpp,v' 2>/dev/null --- as_dataop.cpp 2002/12/16 09:58:34 1.23 +++ as_dataop.cpp 2002/12/16 10:45:25 1.24 @@ -295,8 +295,16 @@ // Calculate rows to delete from selection highlight for (int nIter = 0; nIter < nTotal; ++nIter) { // Build the row data string one field at a time, adding seps inbetween + Rowdata += m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXLINE); + Rowdata += trUtf8(TITRAQ_SEPARATORTOK); Rowdata += m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXUSER); Rowdata += trUtf8(TITRAQ_SEPARATORTOK); + Rowdata += m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXGUID); + Rowdata += trUtf8(TITRAQ_SEPARATORTOK); + Rowdata += m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXCRC); + Rowdata += trUtf8(TITRAQ_SEPARATORTOK); + Rowdata += m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXREV); + Rowdata += trUtf8(TITRAQ_SEPARATORTOK); Rowdata += m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXDATE); Rowdata += trUtf8(TITRAQ_SEPARATORTOK); Rowdata += m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXSTART); @@ -322,17 +330,21 @@ int nRows = Rowdata.contains(QChar('\n')); // Set so many rows int nCurrentrow = m_pMaintable->currentRow(); // Current table row QTableItem *pItem = NULL; // Old item to change out - QString User; // Admin fields in table + QString Line, User, Guid, Crc, Rev; // Admin fields in table QString Date, Start, Finish, Amount, Task, Remark; // Viewable fields in table QTextStream Datastream(&Rowdata, IO_ReadOnly); // Convert data to stream for (int nIter = 0; nIter < nRows; ++nIter) { - Datastream >> User >> Date >> Start; // Stream data fields - Datastream >> Finish >> Amount >> Task; // to corresponding vars - Remark = Datastream.readLine(); // Remark is a whole line + Datastream >> Line >> User >> Guid >> Crc >> Rev; // Stream data fields + Datastream >> Date >> Start >> Finish >> Amount >> Task; // to corresponding vars + Remark = Datastream.readLine(); // Remark is a whole line // Set the table row data one field at a time, skipping seps inbetween + m_pMaintable->setText(nCurrentrow + nIter, TITRAQ_IDXLINE, Line); m_pMaintable->setText(nCurrentrow + nIter, TITRAQ_IDXUSER, User); + m_pMaintable->setText(nCurrentrow + nIter, TITRAQ_IDXGUID, Guid); + m_pMaintable->setText(nCurrentrow + nIter, TITRAQ_IDXCRC, Crc); + m_pMaintable->setText(nCurrentrow + nIter, TITRAQ_IDXREV, Rev); m_pMaintable->setText(nCurrentrow + nIter, TITRAQ_IDXDATE, Date); m_pMaintable->setText(nCurrentrow + nIter, TITRAQ_IDXSTART, Start); m_pMaintable->setText(nCurrentrow + nIter, TITRAQ_IDXFINISH, Finish); Index: ossp-pkg/as/as-gui/as_slot.cpp RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/as_slot.cpp,v rcsdiff -q -kk '-r1.61' '-r1.62' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/as_slot.cpp,v' 2>/dev/null --- as_slot.cpp 2002/12/13 23:42:37 1.61 +++ as_slot.cpp 2002/12/16 10:45:25 1.62 @@ -92,6 +92,12 @@ nRows = Selection.contains(QChar('\n')); // How many rows this->addEntry(nRows); // Reuse slot setRowdata(Selection); // Use accessor + + // Update line numbers for this new row and all subsequent rows + for (int nIter = m_pMaintable->currentRow(); nIter < m_pMaintable->numRows(); nIter++) + m_pMaintable->setText(nIter, TITRAQ_IDXLINE, QString::number(nIter).rightJustify(4, QChar('0'))); + + // Do basic data validation to warn against missing fields for (int nIter = 0; nIter <= nRows; nIter++) this->validateData(m_pMaintable->currentRow() + nIter, 0); }