Subversion Repositories svn1-original

Rev

Rev 324 | Details | Compare with Previous | Last modification | View Log | RSS feed

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