1 /***********************************************************************
2  *
3  * Copyright (C) 2009 Graeme Gott <graeme@gottcode.org>
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
17  *
18  ***********************************************************************/
19 
20 #ifndef CELL_H
21 #define CELL_H
22 
23 #include <QPoint>
24 class Board;
25 class Letter;
26 class Word;
27 
28 class Cell {
29 	public:
30 		Cell(const QPoint& position, Letter* letter);
31 
position()32 		QPoint position() const{
33 			return m_position;
34 		}
35 
letter()36 		Letter* letter() const {
37 			return m_letter;
38 		}
39 
40 		void setLetter(Letter* letter);
41 
word()42 		Word* word() const {
43 			return m_word;
44 		}
45 
setWord(Word * word)46 		void setWord(Word* word) {
47 			m_word = word;
48 		}
49 
50 	private:
51 		QPoint m_position;
52 		Word* m_word;
53 		Letter* m_letter;
54 };
55 
56 #endif
57