Debian Codegraph @

src/board/board.h

raw symbols SCIP
1 /***************************************************************************
2 * Copyright (C) 2009 by The qGo Project *
3 * *
4 * This file is part of qGo. *
5 * *
6 * qGo is free software: you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by *
8 * the Free Software Foundation; either version 2 of the License, or *
9 * (at your option) any later version. *
10 * *
11 * This program is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU General Public License *
17 * along with this program; if not, see <http://www.gnu.org/licenses/> *
18 * or write to the Free Software Foundation, Inc., *
19 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
20 ***************************************************************************/
21
22
23 #ifndef BOARD_H
24 #define BOARD_Hcxx . . $ `src/board/board.h:24:9`!
25
26 #include "defines.h"cxx . . $ `<file>/src/defines.h`/
27
28 #include <QGraphicsView>
29
30 enum CursorTypecxx . . $ CursorType# { cursorIdlecxx . . $ cursorIdle., cursorGhostBlackcxx . . $ cursorGhostBlack. , cursorGhostWhitecxx . . $ cursorGhostWhite. , cursorWaitcxx . . $ cursorWait. , cursorNavTocxx . . $ cursorNavTo. };
31 enum CoordTypecxx . . $ CoordType# { uninitcxx . . $ uninit., sgfcxx . . $ sgf., numbertopnoicxx . . $ numbertopnoi., numberbottomicxx . . $ numberbottomi. };
32
33 class ImageHandlercxx . . $ ImageHandler#;
34 class Movecxx . . $ Move#;
35 class Markcxx . . $ Mark#;
36 class Stonecxx . . $ Stone#;
37 class Gattercxx . . $ Gatter#;
38
39 class Boardcxx . . $ Board# : public QGraphicsViewcxx . . $ QGraphicsView#
40 {
41 Q_OBJECTcxx . . $ Board#trUtf8(75d9f1c324b4579d).
42
43 public:
44 Boardcxx . . $ Board#Board(569870a2e0b0fd5d).(QWidgetcxx . . $ QWidget# *parent=0, QGraphicsScenecxx . . $ QGraphicsScene# *c=0 );
45 ~cxx . . $ Board#`~Board`(ced63f7c635d850d).Boardcxx . . $ Board#();
46 void clearDatacxx . . $ Board#clearData(49f6e7a06ebc5aa8).();
47 void initcxx . . $ Board#init(d4f767463ce0a6b3).(int size);
48 void setCoordTypecxx . . $ Board#setCoordType(5fd3bb02e28546ac).(CoordTypecxx . . $ CoordType# c) { coordTypecxx . . $ Board#coordType. = c; }
49 void resizeBoardcxx . . $ Board#resizeBoard(49f6e7a06ebc5aa8).();
50
51 void removeGhostscxx . . $ Board#removeGhosts(49f6e7a06ebc5aa8).();
52 void setVarGhostcxx . . $ Board#setVarGhost(e6b2860cd25699f2).(StoneColorcxx . . $ StoneColor# c, int x, int y);
53 void setMarkcxx . . $ Board#setMark(18adccc0109412ba).(int x, int y, MarkTypecxx . . $ MarkType# t, bool update=true, QStringcxx . . $ QString# txt=QStringcxx . . $ QString#QString(ee6b7ef95d0103b6).::nullcxx . . $ QString#null., bool overlay=true);
54 Markcxx . . $ Mark#* hasMarkcxx . . $ Board#hasMark(9649d5d3ce79ba50).(int x, int y);
55 void removeMarkcxx . . $ Board#removeMark(6908015b96d379c0).(int x, int y, bool update = false);
56 void updateLastMovecxx . . $ Board#updateLastMove(490cd2a4f5caa810).(Movecxx . . $ Move# * move);
57
58 // Stone* addStoneSprite(StoneColor c, int x, int y, bool shown=true);//TODO shown ?
59 void updateStonecxx . . $ Board#updateStone(615937dc839e801b).(StoneColorcxx . . $ StoneColor# c, int x, int y, bool dead = false);
60 void setCursorTypecxx . . $ Board#setCursorType(926e1983f0360a22).(CursorTypecxx . . $ CursorType# cur);
61 // void updateDeadMarks(int &black, int &white);
62 unsigned int getSizecxx . . $ Board#getSize(db52760e79bf9054).() {return board_sizecxx . . $ Board#board_size.;}
63 void exportPicturecxx . . $ Board#exportPicture(9753f68407e56b8c).(const QStringcxx . . $ QString# &fileName, QStringcxx . . $ QString# *filter, bool toClipboard);
64 bool updateAllcxx . . $ Board#updateAll(2b3560a733ced049).(Movecxx . . $ Move# *move);
65 void updateVariationGhostscxx . . $ Board#updateVariationGhosts(490cd2a4f5caa810).(Movecxx . . $ Move# *m);
66
67 public:
68 void setShowCoordscxx . . $ Board#setShowCoords(b45ddcbc8423892c).(bool b);
69
70 signalscxx . . $ `<external>/1208926524888476972/qobjectdefs.h:89:14`!:
71 void signalClickedcxx . . $ Board#signalClicked(916cfd9b6aad83bf).(bool , int, int, Qtcxx . . $ Qt/::MouseButtoncxx . . $ Qt/MouseButton# );
72 void signalWheelEventcxx . . $ Board#signalWheelEvent(92d40974398e4832).(QWheelEventcxx . . $ QWheelEvent# *);
73
74
75 protected:
76 void calculateSizecxx . . $ Board#calculateSize(49f6e7a06ebc5aa8).();
77 void drawBackcxx . . $ Board#drawBack(49f6e7a06ebc5aa8).(); // old drawBackground
78 void initGattercxx . . $ Board#initGatter(49f6e7a06ebc5aa8).();
79 void drawGattercxx . . $ Board#drawGatter(49f6e7a06ebc5aa8).();
80 void setupCoordscxx . . $ Board#setupCoords(49f6e7a06ebc5aa8).(void);
81 void drawCoordinatescxx . . $ Board#drawCoordinates(49f6e7a06ebc5aa8).();
82 // void drawStarPoint(int x, int y);
83 int convertCoordsToPointcxx . . $ Board#convertCoordsToPoint(9b79fb6aee4c0440).(int c, int o);
84 void resizeEventcxx . . $ Board#resizeEvent(eeeec21cf8dc0387).(QResizeEventcxx . . $ QResizeEvent#*);
85 QHashcxx . . $ QHash#<int,Stonecxx . . $ Stone# *> *stonescxx . . $ Board#stones.;
86 QListcxx . . $ QList#<Markcxx . . $ Mark#*> *markscxx . . $ Board#marks.;
87 QListcxx . . $ QList#<Stonecxx . . $ Stone#*> *ghostscxx . . $ Board#ghosts.;
88 QListcxx . . $ QList#<QGraphicsSimpleTextItemcxx . . $ QGraphicsSimpleTextItem#*> *hCoords1cxx . . $ Board#hCoords1., *hCoords2cxx . . $ Board#hCoords2. , *vCoords1cxx . . $ Board#vCoords1.,*vCoords2cxx . . $ Board#vCoords2. ;
89 // Accessed by DisplayBoard:
90 bool isDisplayBoardcxx . . $ Board#isDisplayBoard.;
91 ImageHandlercxx . . $ ImageHandler# *imageHandlercxx . . $ Board#imageHandler.;
92 bool showCoordscxx . . $ Board#showCoords.;
93
94 private:
95
96 QGraphicsScenecxx . . $ QGraphicsScene# *canvascxx . . $ Board#canvas.;
97 QGraphicsRectItemcxx . . $ QGraphicsRectItem# *tablecxx . . $ Board#table.;
98 Gattercxx . . $ Gatter# *gattercxx . . $ Board#gatter.;
99 // GamePhase gamePhase;
100
101 int board_sizecxx . . $ Board#board_size., offsetcxx . . $ Board#offset., offsetXcxx . . $ Board#offsetX., offsetYcxx . . $ Board#offsetY., square_sizecxx . . $ Board#square_size., board_pixel_sizecxx . . $ Board#board_pixel_size.;
102 bool showSGFCoordscxx . . $ Board#showSGFCoords.;
103 bool showCursorcxx . . $ Board#showCursor.;
104 bool antiClickocxx . . $ Board#antiClicko.;
105 bool lockResizecxx . . $ Board#lockResize. ;
106 bool localSoundcxx . . $ Board#localSound.;
107 bool oneColorGocxx . . $ Board#oneColorGo.;
108
109 Markcxx . . $ Mark# *lastMoveMarkcxx . . $ Board#lastMoveMark.;
110 bool numberPoolcxx . . $ Board#numberPool.[400];
111 bool letterPoolcxx . . $ Board#letterPool.[52];
112 Stonecxx . . $ Stone# *curStonecxx . . $ Board#curStone.;
113 CursorTypecxx . . $ CursorType# cursorcxx . . $ Board#cursor.;
114 CoordTypecxx . . $ CoordType# coordTypecxx . . $ Board#coordType.;
115 short curXcxx . . $ Board#curX., curYcxx . . $ Board#curY.;
116 short downXcxx . . $ Board#downX., downYcxx . . $ Board#downY.; //FIXME can we combine safely somehow with curX, curY?
117
118 static long coordsToKeycxx . . $ Board#coordsToKey(c65f66d6a6d971ba).(int x, int y)
119 { return x * 100 + y; }
120 static void keyToCoordscxx . . $ Board#keyToCoords(33195cad217303ae).(long key, int &x, int &y)
121 { x = key / 100; y = key - x*100; }
122
123 int hasStonecxx . . $ Board#hasStone(9b79fb6aee4c0440).(int x, int y);
124 Stonecxx . . $ Stone#* getStoneAtcxx . . $ Board#getStoneAt(3c393f7b43a68738).(int x, int y) { return stonescxx . . $ Board#stones.->findcxx . . $ QHash#find(1cadc8f6e24105ba).(coordsToKeycxx . . $ Board#coordsToKey(c65f66d6a6d971ba).(x, y)).valuecxx . . $ QHash#iterator#value(51f62fb05f27f6a2).(); }
125
126 bool hasVarGhostcxx . . $ Board#hasVarGhost(d30022d4f7f7716f).(StoneColorcxx . . $ StoneColor# c, int x, int y);
127
128 void removeLastMoveMarkcxx . . $ Board#removeLastMoveMark(49f6e7a06ebc5aa8).();
129 void setMarkTextcxx . . $ Board#setMarkText(c89d651b24440698).(int x, int y, const QStringcxx . . $ QString# &txt);
130
131 void mousePressEventcxx . . $ Board#mousePressEvent(702858a82d06265c).(QMouseEventcxx . . $ QMouseEvent# *e);
132 void mouseReleaseEventcxx . . $ Board#mouseReleaseEvent(702858a82d06265c).(QMouseEventcxx . . $ QMouseEvent#*);
133 void mouseMoveEventcxx . . $ Board#mouseMoveEvent(702858a82d06265c). ( QMouseEventcxx . . $ QMouseEvent# * e ) ;
134 void wheelEventcxx . . $ Board#wheelEvent(92d40974398e4832).(QWheelEventcxx . . $ QWheelEvent# *e);
135 void leaveEventcxx . . $ Board#leaveEvent(c2473e2e70986fd7).(QEventcxx . . $ QEvent#*);
136
137 QTimecxx . . $ QTime# clickTimecxx . . $ Board#clickTime.;
138 Qtcxx . . $ Qt/::MouseButtoncxx . . $ Qt/MouseButton# mouseStatecxx . . $ Board#mouseState.;
139 };
140
141 #endif