Subversion Repositories svn1

Rev

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

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