Subversion Repositories svn1

Rev

Rev 227 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 227 Rev 380
Line 1... Line 1...
1
#ifndef QMCONFIG_H
1
#ifndef QMCONFIG_H
2
#define QMCONFIG_H
2
#define QMCONFIG_H
3
 
3
 
4
#include <QString>
4
#include <QString>
5
#include <QFile>
5
#include <QFile>
-
 
6
#include <QSettings>
6
 
7
 
7
#include    "consts.h"
8
#include    "consts.h"
8
#include    "structs.h"
9
#include    "structs.h"
9
#include    "proto.h"
10
#include    "proto.h"
10
 
11
 
-
 
12
extern QSettings   *appSettings;
-
 
13
 
11
class QmConfig
14
class QmConfig
12
{
15
{
13
public:
16
public:
14
    //QmConfig(const QString &cnfFile);
17
    //QmConfig(const QString &cnfFile);
15
    QmConfig(void){}
18
    QmConfig(void);
-
 
19
    ~QmConfig();
16
    bool open_read_config( void );
20
    bool open_read_config( void );
17
    bool read_config( QFile &configFile  );
21
    bool read_config( QFile &configFile  );
18
    bool write_config( void );
22
    bool write_config( void );
19
    int lookup_class( const char *text);
23
    int lookup_class( const char *text);
20
    void load(const QString &cnfFile);
24
    void load(const QString &cnfFile);
21
    static const char *getAddendemFile(const QString &, bool create=false);
25
    static const QString getAddendemFile(const QString &, bool create=false);
22
 
26
 
23
    QString fileName;
27
    QString fileName;
24
 
28
 
25
    // Exact copy of the original config
29
    // Exact copy of the original config
26
    char        event_name[MAX_EVENT_NAME + 1]; /* Name of the event */
30
    char        event_name[MAX_EVENT_NAME + 1]; /* Name of the event */
Line 47... Line 51...
47
    short       class_winners[MAX_CLASS];    /* Winners for each class */
51
    short       class_winners[MAX_CLASS];    /* Winners for each class */
48
    short       class_ne_winners[MAX_CLASS]; /* Winners for each class  in NE*/
52
    short       class_ne_winners[MAX_CLASS]; /* Winners for each class  in NE*/
49
    bool        class_ne_winners_by_class;   /* NE winners by class */
53
    bool        class_ne_winners_by_class;   /* NE winners by class */
50
    char        hall_fame[MAX_FAME][MAX_PERSON_NAME + 1];   /* Names */
54
    char        hall_fame[MAX_FAME][MAX_PERSON_NAME + 1];   /* Names */
51
    short       num_fame;                   /* Number of fame numbers */
55
    short       num_fame;                   /* Number of fame numbers */
52
 
-
 
-
 
56
    char        webUrl[MAX_WEBPATH];        /* Web Url for import */
-
 
57
    char        awardsfilename[20];         /* Name of the data file */
53
};
58
};
54
 
59
 
55
#endif // QMCONFIG_H
60
#endif // QMCONFIG_H