Subversion Repositories svn1

Rev

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

Rev 236 Rev 241
Line 82... Line 82...
82
    connect(ui->name, SIGNAL(editingFinished()), this, SLOT(changed()));
82
    connect(ui->name, SIGNAL(editingFinished()), this, SLOT(changed()));
83
    connect(ui->category , SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
83
    connect(ui->category , SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
84
    connect(ui->category , SIGNAL(currentIndexChanged(int)), this, SLOT(updateCategory()));
84
    connect(ui->category , SIGNAL(currentIndexChanged(int)), this, SLOT(updateCategory()));
85
    connect(ui->members , SIGNAL(cellChanged(int,int)), this, SLOT(changed()));
85
    connect(ui->members , SIGNAL(cellChanged(int,int)), this, SLOT(changed()));
86
    connect(ui->disqualified , SIGNAL(clicked(bool)), this, SLOT(changed()));
86
    connect(ui->disqualified , SIGNAL(clicked(bool)), this, SLOT(changed()));
87
    connect(ui->nonEquestrian , SIGNAL(clicked(bool)), this, SLOT(changed()));
87
    connect(ui->nonEquestrian , SIGNAL(clicked(bool)), this, SLOT(recalculateTimes()));
88
    connect(ui->disabled , SIGNAL(clicked(bool)), this, SLOT(changed()));
88
    connect(ui->disabled , SIGNAL(clicked(bool)), this, SLOT(changed()));
89
    connect(ui->VetCheck , SIGNAL(clicked(bool)), this, SLOT(changed()));
89
    connect(ui->VetCheck , SIGNAL(clicked(bool)), this, SLOT(changed()));
90
 
90
 
91
    updateChanged(false);
91
    updateChanged(false);
92
    populating = false;
92
    populating = false;
Line 247... Line 247...
247
{
247
{
248
    for ( int ii = 0 ; ii <= config.num_legs; ii++)
248
    for ( int ii = 0 ; ii <= config.num_legs; ii++)
249
    {
249
    {
250
        lt[ii]->getData(&team_buf.leg[ii]);
250
        lt[ii]->getData(&team_buf.leg[ii]);
251
    }
251
    }
-
 
252
    suckData();
252
    set_times( &team_buf );
253
    set_times( &team_buf );
253
    test_times( &team_buf, 0 );
254
    test_times( &team_buf, 0 );
254
    for ( int ii = 0 ; ii <= config.num_legs; ii++)
255
    for ( int ii = 0 ; ii <= config.num_legs; ii++)
255
    {
256
    {
256
        lt[ii]->setData(&team_buf.leg[ii]);
257
        lt[ii]->setData(&team_buf.leg[ii]);
Line 259... Line 260...
259
    // Flag data as changed
260
    // Flag data as changed
260
    changed();
261
    changed();
261
}
262
}
262
 
263
 
263
/*----------------------------------------------------------------------------
264
/*----------------------------------------------------------------------------
264
** FUNCTION           : save
265
** FUNCTION           : suckData
265
**
266
**
266
** DESCRIPTION        : Save the data back to disk
267
** DESCRIPTION        : Save the data back to memory
267
**
268
**
268
** INPUTS             :
269
** INPUTS             :
269
**
270
**
270
** RETURNS            :
271
** RETURNS            :
271
**
272
**
272
----------------------------------------------------------------------------*/
273
----------------------------------------------------------------------------*/
273
 
274
 
274
void qmTeamDisplay::save(void)
275
void qmTeamDisplay::suckData(void)
275
{
276
{
276
    /*
277
    /*
277
    ** Extract data from the widgets
278
    ** Extract data from the widgets
278
    ** The time stuff is done on the fly as it changes
279
    ** The time stuff is done on the fly as it changes
279
    */
280
    */
Line 307... Line 308...
307
 
308
 
308
        item = ui->members->item ( ii, 2 );
309
        item = ui->members->item ( ii, 2 );
309
        team_buf.members[ii].age = item->data(Qt::EditRole).toInt();
310
        team_buf.members[ii].age = item->data(Qt::EditRole).toInt();
310
 
311
 
311
    }
312
    }
-
 
313
}
-
 
314
 
-
 
315
/*----------------------------------------------------------------------------
-
 
316
** FUNCTION           : save
-
 
317
**
-
 
318
** DESCRIPTION        : Save the data back to disk
-
 
319
**
-
 
320
** INPUTS             :
-
 
321
**
-
 
322
** RETURNS            :
-
 
323
**
-
 
324
----------------------------------------------------------------------------*/
-
 
325
 
-
 
326
void qmTeamDisplay::save(void)
-
 
327
{
312
 
328
 
313
    /*
329
    /*
314
    ** Save the record back to disk
330
    ** Save the record back to disk
315
    */
331
    */
-
 
332
    suckData();
316
    put_team_record( team, &team_buf );
333
    put_team_record( team, &team_buf );
317
    populate(team);
334
    populate(team);
318
}
335
}
319
 
336
 
320
/*----------------------------------------------------------------------------
337
/*----------------------------------------------------------------------------