| 172 |
- |
1 |
#ifndef QMCONFIG_H
|
|
|
2 |
#define QMCONFIG_H
|
|
|
3 |
|
|
|
4 |
#include <QString>
|
|
|
5 |
#include <QFile>
|
|
|
6 |
|
|
|
7 |
#include "consts.h"
|
|
|
8 |
#include "structs.h"
|
|
|
9 |
#include "proto.h"
|
|
|
10 |
|
|
|
11 |
class QmConfig
|
|
|
12 |
{
|
|
|
13 |
public:
|
| 199 |
david |
14 |
//QmConfig(const QString &cnfFile);
|
|
|
15 |
QmConfig(void){}
|
| 172 |
- |
16 |
bool open_read_config( void );
|
| 176 |
- |
17 |
bool read_config( QFile &configFile );
|
|
|
18 |
bool write_config( void );
|
|
|
19 |
int lookup_class( const char *text);
|
|
|
20 |
void load(const QString &cnfFile);
|
| 199 |
david |
21 |
static const char *getAddendemFile(const QString &, bool create=false);
|
| 172 |
- |
22 |
|
| 176 |
- |
23 |
QString fileName;
|
| 172 |
- |
24 |
|
| 176 |
- |
25 |
// Exact copy of the original config
|
|
|
26 |
char event_name[MAX_EVENT_NAME + 1]; /* Name of the event */
|
|
|
27 |
char leg_name[MAX_LEGS][MAX_LEG_NAME + 1]; /* Names of each leg */
|
|
|
28 |
ty_t_def t_def[MAX_TMS_SPLIT]; /* Team defintion data */
|
|
|
29 |
short num_legs; /* Number of legs in use */
|
|
|
30 |
short num_teams; /* Number of entries in team def array */
|
|
|
31 |
short max_team; /* Max team number */
|
|
|
32 |
short min_team; /* Min team number */
|
|
|
33 |
ty_t_class team_class[MAX_CLASS]; /* Define team classes */
|
|
|
34 |
short num_class; /* Number of classes */
|
|
|
35 |
ty_t_country country_name[MAX_COUNTRY]; /* Define country names */
|
|
|
36 |
short num_countries; /* Number of countries */
|
|
|
37 |
char addendum[20]; /* Name of ledgend addendum file */
|
|
|
38 |
char datafilename[8]; /* Name of the data file */
|
|
|
39 |
|
|
|
40 |
char nonequestrian_class_abr[3]; /* The non-equestrian class abr */
|
|
|
41 |
short nonequestrian_class; /* Index of non-equestrian class */
|
|
|
42 |
short equestrian_leg; /* The Equestrian leg - only used if nonequestrian_class */
|
|
|
43 |
|
|
|
44 |
short lines_per_page; /* .txt file printing */
|
|
|
45 |
short perf_skip; /* .txt file printing */
|
|
|
46 |
|
|
|
47 |
short class_winners[MAX_CLASS]; /* Winners for each class */
|
| 227 |
- |
48 |
short class_ne_winners[MAX_CLASS]; /* Winners for each class in NE*/
|
|
|
49 |
bool class_ne_winners_by_class; /* NE winners by class */
|
| 176 |
- |
50 |
char hall_fame[MAX_FAME][MAX_PERSON_NAME + 1]; /* Names */
|
|
|
51 |
short num_fame; /* Number of fame numbers */
|
|
|
52 |
|
| 172 |
- |
53 |
};
|
|
|
54 |
|
|
|
55 |
#endif // QMCONFIG_H
|