Subversion Repositories svn1

Rev

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

Rev 273 Rev 275
Line 44... Line 44...
44
    QSpacerItem *horizontalSpacer1;
44
    QSpacerItem *horizontalSpacer1;
45
 
45
 
46
    horizontalLayout1 = new QHBoxLayout();
46
    horizontalLayout1 = new QHBoxLayout();
47
    horizontalLayout1->setContentsMargins(5, 5, 5, 5);
47
    horizontalLayout1->setContentsMargins(5, 5, 5, 5);
48
    groupBox2->setLayout(horizontalLayout1);
48
    groupBox2->setLayout(horizontalLayout1);
-
 
49
    groupBox2->setToolTip("Set or clear one or more attributes for the specified team."
-
 
50
                           "\nThe attributes have three states: Set,Clear and Do Nothing."
-
 
51
                           "\nSelect the required attributes to change. Enter the team number"
-
 
52
                           "\nand use 'Set' or <Return> to Set/Clear the selected attributes.");
49
 
53
 
50
    cb_disq = new QCheckBox("Disq");
54
    cb_disq = new QCheckBox("Disq");
51
    cb_disq->setTristate(true);
55
    cb_disq->setTristate(true);
52
    horizontalLayout1->addWidget(cb_disq);
56
    horizontalLayout1->addWidget(cb_disq);
53
 
57
 
Line 80... Line 84...
80
 
84
 
81
    connect(pb_save, SIGNAL(clicked()), this, SLOT(save()) );
85
    connect(pb_save, SIGNAL(clicked()), this, SLOT(save()) );
82
    connect(pb_restore, SIGNAL(clicked()), this, SLOT(cancel()) );
86
    connect(pb_restore, SIGNAL(clicked()), this, SLOT(cancel()) );
83
    connect(setButton, SIGNAL(clicked()), this, SLOT(bulk_set()) );
87
    connect(setButton, SIGNAL(clicked()), this, SLOT(bulk_set()) );
84
    connect(teamNumber,SIGNAL(teamSelected()), this, SLOT(bulk_set()) );
88
    connect(teamNumber,SIGNAL(teamSelected()), this, SLOT(bulk_set()) );
-
 
89
    connect(teamNumber, SIGNAL(valueChanged(int)), this, SLOT(center_display(int)));
85
    connect(tableWidget, SIGNAL(itemChanged(QTableWidgetItem*)), this, SLOT(tableItemChanged(QTableWidgetItem *)));
90
    connect(tableWidget, SIGNAL(itemChanged(QTableWidgetItem*)), this, SLOT(tableItemChanged(QTableWidgetItem *)));
86
    updateChanged (false);
91
    updateChanged (false);
87
}
92
}
88
 
93
 
89
qmDisqualified::~qmDisqualified()
94
qmDisqualified::~qmDisqualified()
Line 328... Line 333...
328
    {
333
    {
329
        MainWindow::showMessage("Team not found");
334
        MainWindow::showMessage("Team not found");
330
    }
335
    }
331
}
336
}
332
 
337
 
-
 
338
/*----------------------------------------------------------------------------
-
 
339
** FUNCTION           : center_display
-
 
340
**
-
 
341
** DESCRIPTION        : Place the specified team in the center of the display
-
 
342
**                      If not found then place close item in display
-
 
343
**
-
 
344
**
-
 
345
** INPUTS             : teamNumber
-
 
346
**
-
 
347
** RETURNS            : Nothing
-
 
348
**
-
 
349
----------------------------------------------------------------------------*/
-
 
350
 
-
 
351
void qmDisqualified::center_display(int teamNumber)
-
 
352
{
-
 
353
    QTableWidgetItem *item = NULL;
-
 
354
    for ( int ii = 0; ii < tableWidget->rowCount(); ii++)
-
 
355
    {
-
 
356
        item = tableWidget->item(ii, 0);
-
 
357
        if ( item )
-
 
358
        {
-
 
359
            int team = item->data(Qt::EditRole).toInt();
-
 
360
            if ( team && team >= teamNumber )
-
 
361
            {
-
 
362
                break;
-
 
363
            }
-
 
364
        }
-
 
365
    }
-
 
366
    if ( item )
-
 
367
    {
-
 
368
        tableWidget->scrollToItem(item,QAbstractItemView::PositionAtCenter);
-
 
369
    }
-
 
370
}
333
 
371
 
334
qmDisqualifiedItem::qmDisqualifiedItem ( const QString & text, int type ) :  QTableWidgetItem(text, type+QTableWidgetItem::UserType)
372
qmDisqualifiedItem::qmDisqualifiedItem ( const QString & text, int type ) :  QTableWidgetItem(text, type+QTableWidgetItem::UserType)
335
{
373
{
336
    number = 0;
374
    number = 0;
337
}
375
}