~ubuntu-branches/ubuntu/maverick/qgo/maverick

« back to all changes in this revision

Viewing changes to src/globals.h

  • Committer: Bazaar Package Importer
  • Author(s): Martin A. Godisch
  • Date: 2005-01-01 23:07:10 UTC
  • Revision ID: james.westby@ubuntu.com-20050101230710-fhng6yidm47xlb2i
Tags: upstream-1.0.0-r2
ImportĀ upstreamĀ versionĀ 1.0.0-r2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
* globals.h
 
3
*/
 
4
 
 
5
#ifndef GLOBALS_H
 
6
#define GLOBALS_H
 
7
 
 
8
#include "defines.h"
 
9
#include "parserdefs.h"
 
10
#include <qstring.h>
 
11
#include <qobject.h>
 
12
 
 
13
/*
 
14
* Global structs
 
15
*/
 
16
class GameData
 
17
{
 
18
public:
 
19
        GameData(QString _playerBlack=QObject::tr("Black"),
 
20
                QString _playerWhite=QObject::tr("White"),
 
21
                QString _rankBlack="",
 
22
                QString _rankWhite="",
 
23
                int _size=19,
 
24
                int _handicap=0,
 
25
                float _komi=5.5,
 
26
                int _byoTime=0,
 
27
                int _byoStones=25,
 
28
                int _timelimit=0,
 
29
                int _byoPeriods=0,
 
30
                int _gameNumber=0,
 
31
                int _style = 1,
 
32
                QString _result="",
 
33
                QString _date="",
 
34
                QString _place="",
 
35
                QString _copyright="",
 
36
                QString _gameName="",
 
37
                QString _fileName="",
 
38
                QString _overtime="",
 
39
                assessType _freegame=noREQ,
 
40
                TimeSystem _timeSystem=canadian,
 
41
    bool _oneColorGo=false)
 
42
        {
 
43
                playerBlack = _playerBlack;
 
44
                playerWhite = _playerWhite;
 
45
                rankBlack = _rankBlack;
 
46
                rankWhite = _rankWhite;
 
47
                result = _result;
 
48
                date = _date;
 
49
                place = _place;
 
50
                copyright = _copyright;
 
51
                gameName = _gameName;
 
52
                fileName = _fileName;
 
53
                overtime = _overtime;
 
54
                size = _size;
 
55
                handicap = _handicap;
 
56
                gameNumber = _gameNumber;
 
57
                byoTime = _byoTime;
 
58
                byoPeriods = _byoPeriods;
 
59
                byoStones = _byoStones;
 
60
                style = _style;
 
61
                timelimit = _timelimit;
 
62
                komi = _komi;
 
63
                freegame = _freegame;
 
64
                timeSystem = _timeSystem;
 
65
    oneColorGo = _oneColorGo;
 
66
        }
 
67
        GameData(GameData *d)
 
68
        {
 
69
                if (d)
 
70
                {
 
71
                        playerBlack = d->playerBlack;
 
72
                        playerWhite = d->playerWhite;
 
73
                        rankBlack = d->rankBlack;
 
74
                        rankWhite = d->rankWhite;
 
75
                        result = d->result;
 
76
                        date = d->date;
 
77
                        place = d->place;
 
78
                        copyright = d->copyright;
 
79
                        gameName = d->gameName;
 
80
                        fileName = d->fileName;
 
81
                        overtime = d->overtime;
 
82
                        size = d->size;
 
83
                        handicap = d->handicap;
 
84
                        gameNumber = d->gameNumber;
 
85
                        byoTime = d->byoTime;
 
86
                        byoPeriods = d->byoPeriods;
 
87
                        byoStones = d->byoStones;
 
88
                        style = d->style;
 
89
                        timelimit = d->timelimit;
 
90
                        komi = d->komi;
 
91
                        freegame = d->freegame;
 
92
                        timeSystem = d->timeSystem;
 
93
      oneColorGo = d->oneColorGo;
 
94
                }
 
95
        }
 
96
        ~GameData() {};
 
97
 
 
98
        QString    playerBlack, playerWhite, rankBlack, rankWhite, result,
 
99
                   date, place, copyright, gameName, fileName, overtime;
 
100
        int        size, handicap, gameNumber, byoTime, byoPeriods, byoStones, style, timelimit;
 
101
        float      komi;
 
102
        assessType freegame;
 
103
        TimeSystem timeSystem;
 
104
  bool oneColorGo;
 
105
};
 
106
 
 
107
struct FastLoadMark
 
108
{
 
109
        int x, y;
 
110
        MarkType t;
 
111
        QString txt;
 
112
};
 
113
 
 
114
/*
 
115
* Global variables declarations
 
116
*/
 
117
 
 
118
#ifdef Q_WS_WIN
 
119
extern QString applicationPath;
 
120
#endif
 
121
 
 
122
 
 
123
#endif