Diffstat (limited to 'noncore/games/minesweep/minefield.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/games/minesweep/minefield.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/games/minesweep/minefield.h b/noncore/games/minesweep/minefield.h index e243d77..8d0f754 100644 --- a/noncore/games/minesweep/minefield.h +++ b/noncore/games/minesweep/minefield.h | |||
@@ -61,44 +61,44 @@ protected: | |||
61 | void contentsMouseReleaseEvent( QMouseEvent* ); | 61 | void contentsMouseReleaseEvent( QMouseEvent* ); |
62 | void keyPressEvent( QKeyEvent* ); | 62 | void keyPressEvent( QKeyEvent* ); |
63 | void keyReleaseEvent( QKeyEvent* ); | 63 | void keyReleaseEvent( QKeyEvent* ); |
64 | void drawContents( QPainter * p, int clipx, int clipy, int clipw, int cliph ); | 64 | void drawContents( QPainter * p, int clipx, int clipy, int clipw, int cliph ); |
65 | 65 | ||
66 | int getHint( int row, int col ); | 66 | int getHint( int row, int col ); |
67 | void setHint( int r, int c ); | 67 | void setHint( int r, int c ); |
68 | void updateMine( int row, int col ); | 68 | void updateMine( int row, int col ); |
69 | void paletteChange( const QPalette & ); | 69 | void paletteChange( const QPalette & ); |
70 | void updateCell( int r, int c ); | 70 | void updateCell( int r, int c ); |
71 | bool onBoard( int r, int c ) const { return r >= 0 && r < numRows && c >= 0 && c < numCols; } | 71 | bool onBoard( int r, int c ) const { return r >= 0 && r < numRows && c >= 0 && c < numCols; } |
72 | Mine *mine( int row, int col ) { return onBoard(row, col ) ? mines[row+numCols*col] : 0; } | 72 | Mine *mine( int row, int col ) { return onBoard(row, col ) ? mines[row+numCols*col] : 0; } |
73 | const Mine *mine( int row, int col ) const { return onBoard(row, col ) ? mines[row+numCols*col] : 0; } | 73 | const Mine *mine( int row, int col ) const { return onBoard(row, col ) ? mines[row+numCols*col] : 0; } |
74 | 74 | ||
75 | protected slots: | 75 | protected slots: |
76 | void cellPressed( int row, int col ); | 76 | void cellPressed( int row, int col ); |
77 | void cellClicked( int row, int col ); | 77 | void cellClicked( int row, int col ); |
78 | void held(); | 78 | void held(); |
79 | 79 | ||
80 | private: | 80 | private: |
81 | int findCellSize(); | 81 | int findCellSize(); |
82 | void setCellSize( int ); | 82 | void setCellSize( int ); |
83 | 83 | ||
84 | State stat; | 84 | State stat; |
85 | void MineField::setState( State st ); | 85 | void setState( State st ); |
86 | void MineField::placeMines(); | 86 | void placeMines(); |
87 | enum FlagAction { NoAction, FlagOn, FlagNext }; | 87 | enum FlagAction { NoAction, FlagOn, FlagNext }; |
88 | FlagAction flagAction; | 88 | FlagAction flagAction; |
89 | bool ignoreClick; | 89 | bool ignoreClick; |
90 | int currRow; | 90 | int currRow; |
91 | int currCol; | 91 | int currCol; |
92 | int numRows, numCols; | 92 | int numRows, numCols; |
93 | 93 | ||
94 | int minecount; | 94 | int minecount; |
95 | int mineguess; | 95 | int mineguess; |
96 | int nonminecount; | 96 | int nonminecount; |
97 | int lev; | 97 | int lev; |
98 | QRect availableRect; | 98 | QRect availableRect; |
99 | int cellSize; | 99 | int cellSize; |
100 | QTimer *holdTimer; | 100 | QTimer *holdTimer; |
101 | Mine **mines; | 101 | Mine **mines; |
102 | }; | 102 | }; |
103 | 103 | ||
104 | #endif // MINEFIELD_H | 104 | #endif // MINEFIELD_H |