Subversion Repositories svn1

Rev

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

Rev 279 Rev 292
Line 69... Line 69...
69
    cb_class = new QCheckBox("Class");
69
    cb_class = new QCheckBox("Class");
70
    cb_class->setChecked(true);
70
    cb_class->setChecked(true);
71
    cb_class->setToolTip("Check that teams have a valid class");
71
    cb_class->setToolTip("Check that teams have a valid class");
72
    horizontalLayout1->addWidget(cb_class);
72
    horizontalLayout1->addWidget(cb_class);
73
 
73
 
-
 
74
 
-
 
75
    cb_eqNames = new QCheckBox("EQ/Names");
-
 
76
    cb_eqNames->setChecked(true);
-
 
77
    cb_eqNames->setToolTip("Check that Equestrian teams do have a\nteam member for the equestrian leg");
-
 
78
    horizontalLayout1->addWidget(cb_eqNames);
-
 
79
 
74
    cb_neNames = new QCheckBox("NE/Names");
80
    cb_neNames = new QCheckBox("NE/Names");
75
    cb_neNames->setChecked(true);
81
    cb_neNames->setChecked(true);
76
    cb_neNames->setToolTip("Check that NE teams do not have a\nteam member for the equestrian leg");
82
    cb_neNames->setToolTip("Check that NE teams do not have a\nteam member for the equestrian leg");
77
    horizontalLayout1->addWidget(cb_neNames);
83
    horizontalLayout1->addWidget(cb_neNames);
78
 
84
 
Line 89... Line 95...
89
    horizontalLayout->addItem(horizontalSpacer1);
95
    horizontalLayout->addItem(horizontalSpacer1);
90
 
96
 
91
    buttonBox = new QDialogButtonBox();
97
    buttonBox = new QDialogButtonBox();
92
    pb_check = buttonBox->addButton("Check",QDialogButtonBox::ActionRole );
98
    pb_check = buttonBox->addButton("Check",QDialogButtonBox::ActionRole );
93
    pb_cancel = buttonBox->addButton("Clear",QDialogButtonBox::ActionRole );
99
    pb_cancel = buttonBox->addButton("Clear",QDialogButtonBox::ActionRole );
94
    horizontalLayout->addWidget(buttonBox);
100
    verticalLayout2->addWidget(buttonBox);
95
 
101
 
96
    leg->setMinimum(0);
102
    leg->setMinimum(0);
97
    leg->setMaximum(config.num_legs);
103
    leg->setMaximum(config.num_legs);
98
    leg->setValue(config.num_legs);
104
    leg->setValue(config.num_legs);
99
 
105
 
Line 165... Line 171...
165
                    addItem(tm, 0, QString("Team %1, No Team Name specified").arg(QString::number(tm) ) );
171
                    addItem(tm, 0, QString("Team %1, No Team Name specified").arg(QString::number(tm) ) );
166
                    badData = 1;
172
                    badData = 1;
167
                }
173
                }
168
 
174
 
169
                // Test for NE Team with a team name
175
                // Test for NE Team with a team name
170
                if (cb_neNames->isChecked() && team_buf.flags.non_equestrian && config.equestrian_leg )
176
                if ((cb_neNames->isChecked() || cb_eqNames->isChecked()) && config.equestrian_leg )
171
                {
177
                {
172
                    int neindex = config.equestrian_leg - 1;
178
                    int neindex = config.equestrian_leg - 1;
173
                    char *nptr = team_buf.members[neindex].name;
179
                    char *nptr = team_buf.members[neindex].name;
-
 
180
                    bool validTeamName = ( *nptr && strcmp(nptr, "0") != 0
-
 
181
                                        && strcmp(nptr, "-") != 0
-
 
182
                                        && stricmp(nptr, "N/A") != 0 );
174
 
183
 
175
                    // Ignore allowed NE names
-
 
176
                    if ( *nptr && strcmp(nptr, "0") != 0
184
                    if (cb_neNames->isChecked() && team_buf.flags.non_equestrian && validTeamName )
177
                               && strcmp(nptr, "-") != 0
-
 
178
                               && stricmp(nptr, "N/A") != 0 )
-
 
179
                    {
185
                    {
180
                        addItem(tm, 0, QString("Team %1, NE with named competitor: %2").arg(QString::number(tm)).arg(nptr) );
186
                        addItem(tm, 0, QString("Team %1, NE with named competitor: %2").arg(QString::number(tm)).arg(nptr) );
181
                        badData = 1;
187
                        badData = 1;
182
                    }
188
                    }
-
 
189
                    if (cb_eqNames->isChecked() && !team_buf.flags.non_equestrian && !validTeamName )
-
 
190
                    {
-
 
191
                        addItem(tm, 0, QString("Team %1, possible NE team").arg(QString::number(tm)) );
-
 
192
                        badData = 1;
-
 
193
                    }
183
                }
194
                }
184
 
195
 
185
                // Test Leg Data if required
196
                // Test Leg Data if required
186
                if (cb_checkLegs->isChecked() && leg_end)
197
                if (cb_checkLegs->isChecked() && leg_end)
187
                {
198
                {
Line 247... Line 258...
247
{
258
{
248
    bool all_state = cb_all->isChecked();
259
    bool all_state = cb_all->isChecked();
249
 
260
 
250
    cb_checkLegs->setChecked(all_state);
261
    cb_checkLegs->setChecked(all_state);
251
    cb_class->setChecked(all_state);
262
    cb_class->setChecked(all_state);
-
 
263
    cb_eqNames->setChecked(all_state);
252
    cb_neNames->setChecked(all_state);
264
    cb_neNames->setChecked(all_state);
253
    cb_teamName->setChecked(all_state);
265
    cb_teamName->setChecked(all_state);
254
}
266
}
255
 
267