2 Copyright 2004-2005 Andi Peredri <andi@ukr.net>
3 Copyright 2007 Simon Hürlimann <simon.huerlimann@huerlisi.ch>
4 Copyright 2007-2008 Fela Winkelmolen <fela.kde@gmail.com>
6 This program 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.
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.
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/>.
23 #include <KXmlGuiWindow>
24 #include <KSvgRenderer>
37 class MainWindow
: public KXmlGuiWindow
41 explicit MainWindow(QWidget
*parent
=0);
42 virtual ~MainWindow();
44 static int boardSize();
49 virtual void closeEvent(QCloseEvent
*);
50 virtual void paintEvent(QPaintEvent
*);
51 virtual void resizeEvent(QResizeEvent
*);
65 typedef QList
<Cell
*> CellList
;
70 void lClicked(int index
);
71 void rClicked(int index
);
72 void mClicked(int index
);
74 void showHighscores();
75 void configureNotifications();
76 void updateConnections();
79 Cell
* uCell(Cell
* cell
) const;
80 Cell
* dCell(Cell
* cell
) const;
81 Cell
* lCell(Cell
* cell
) const;
82 Cell
* rCell(Cell
* cell
) const;
83 void checkIfGameEnded();
84 bool startBrowser(const QString
& url
);
85 void blink(int index
);
86 void rotate(int index
, bool clockWise
);
87 void dialog(const QString
& caption
, const QString
& text
);
88 void setBoardSize(int size
);
94 Cell
* board
[MasterBoardSize
* MasterBoardSize
];
95 QGridLayout
* gridLayout
;
105 QAction
* soundaction
;
106 QStringList highscores
;
111 QPixmap
*pixmapCache
;
115 #endif // MAINWINDOW_H