Subversion Repositories svn1-original

Rev

Rev 318 | Rev 372 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 318 Rev 328
Line 190... Line 190...
190
    //
190
    //
191
    if (reportDataLoaded)
191
    if (reportDataLoaded)
192
    {
192
    {
193
        tableWidget->setRowCount(tableWidget->rowCount() + 1);
193
        tableWidget->setRowCount(tableWidget->rowCount() + 1);
194
        tableWidget->setItem(entryIndex,COL_ABR,      new qmTwiString("Totals", 1));
194
        tableWidget->setItem(entryIndex,COL_ABR,      new qmTwiString("Totals", 1));
-
 
195
 
-
 
196
        tableWidget->setItem(entryIndex, COL_CLASS,         new qmTwiString(""));
-
 
197
        tableWidget->setItem(entryIndex, COL_TIME,          new qmTwiString(""));
-
 
198
        tableWidget->setItem(entryIndex, COL_WINNERS,       new qmTwiString(""));
-
 
199
        tableWidget->setItem(entryIndex, COL_NE,            new qmTwiString(""));
-
 
200
        tableWidget->setItem(entryIndex, COL_NE_WINNERS,    new qmTwiString(""));
-
 
201
        tableWidget->setItem(entryIndex, COL_INDEX,         new qmTwiString(""));
-
 
202
 
195
        tableWidget->setItem(entryIndex,COL_ST_TOTAL, new qmTwiNumber(data.total.total, 1));
203
        tableWidget->setItem(entryIndex,COL_ST_TOTAL, new qmTwiNumber(data.total.total, 1));
196
        tableWidget->setItem(entryIndex,COL_ST_VALID, new qmTwiNumber(data.total.valid, 1));
204
        tableWidget->setItem(entryIndex,COL_ST_VALID, new qmTwiNumber(data.total.valid, 1));
197
        tableWidget->setItem(entryIndex,COL_ST_DISQ,  new qmTwiNumber(data.total.disqualified, 1));
205
        tableWidget->setItem(entryIndex,COL_ST_DISQ,  new qmTwiNumber(data.total.disqualified, 1));
198
        tableWidget->setItem(entryIndex,COL_ST_NONEQ, new qmTwiNumber(data.total.non_equestrian, 1));
206
        tableWidget->setItem(entryIndex,COL_ST_NONEQ, new qmTwiNumber(data.total.non_equestrian, 1));
199
        tableWidget->setItem(entryIndex,COL_ST_VET,   new qmTwiNumber(data.total.vet_check, 1));
207
        tableWidget->setItem(entryIndex,COL_ST_VET,   new qmTwiNumber(data.total.vet_check, 1));
Line 224... Line 232...
224
    */
232
    */
225
    for (int entryIndex = 0; entryIndex < tableWidget->rowCount(); entryIndex++)
233
    for (int entryIndex = 0; entryIndex < tableWidget->rowCount(); entryIndex++)
226
    {
234
    {
227
 
235
 
228
        // Check that this is a real Entry or the 'Totals' header
236
        // Check that this is a real Entry or the 'Totals' header
229
        //      Real rows have a COL_INDEX entr
237
        //      Real rows have a COL_INDEX entry that is not empty
230
        //
238
        //
231
        QTableWidgetItem *item = tableWidget->item ( entryIndex, COL_INDEX );
239
        QTableWidgetItem *item = tableWidget->item ( entryIndex, COL_INDEX );
232
        if (! item)
240
        if (! item)
233
        {
241
        {
234
            //qDebug("Ignore row:%d", entryIndex);
242
            //qDebug("Ignore row:%d", entryIndex);
235
            continue;
243
            continue;
236
        }
244
        }
-
 
245
        if ( item->text().length() == 0)
-
 
246
        {
-
 
247
            //qDebug("Ignore empty row:%d", entryIndex);
-
 
248
            continue;
-
 
249
        }
237
        int ii = item->text().toInt();
250
        int ii = item->text().toInt();
238
        //qDebug("Processing: %d", ii);
251
        //qDebug("Processing: %d", ii);
239
 
252
 
240
        /*
253
        /*
241
        ** This is a new entry - allocate a new index 
254
        ** This is a new entry - allocate a new index 
Line 533... Line 546...
533
 
546
 
534
void QmConfClass::ctxMenuAddRow(void)
547
void QmConfClass::ctxMenuAddRow(void)
535
{
548
{
536
    tableWidget->setSortingEnabled(false);
549
    tableWidget->setSortingEnabled(false);
537
    tableWidget->setRowCount( 1+ tableWidget->rowCount());
550
    tableWidget->setRowCount( 1+ tableWidget->rowCount());
-
 
551
 
-
 
552
    /*
-
 
553
    **  Insert non-editable fields in the status part of the table
-
 
554
    */
538
    tableWidget->setItem(tableWidget->rowCount() - 1, COL_INDEX, new qmTwiNumber(-1));
555
    tableWidget->setItem(tableWidget->rowCount() - 1, COL_INDEX, new qmTwiNumber(-1));
-
 
556
    for (int ii= COL_ST_TOTAL; ii < COL_INDEX; ii++)
-
 
557
    {
-
 
558
        tableWidget->setItem(tableWidget->rowCount() - 1, ii, new qmTwiString(""));
-
 
559
    }
539
}
560
}
540
 
561
 
541
void QmConfClass::cellChanged(int row,int col)
562
void QmConfClass::cellChanged(int row,int col)
542
{
563
{
543
    if ( populating )
564
    if ( populating )