1/*
2 * Copyright (C) 2008-2009 Stephan Kulow <coolo@kde.org>
3 * Copyright (C) 2008-2009 Parker Coates <coates@kde.org>
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of
8 * the License, or (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#ifndef GAMESELECTIONSCENE_H
20#define GAMESELECTIONSCENE_H
21
22#include <QtCore/QSignalMapper>
23#include <QtGui/QGraphicsScene>
24
25
26class GameSelectionScene : public QGraphicsScene
27{
28 Q_OBJECT
29
30 class GameSelectionBox;
31
32public:
33 GameSelectionScene( QObject * parent );
34 ~GameSelectionScene();
35
36 void resizeScene( const QSize & size );
37
38signals:
39 void gameSelected( int i );
40
41protected:
42 virtual void keyReleaseEvent( QKeyEvent * event );
43
44private slots:
45 void boxHoverChanged( GameSelectionBox * box, bool hovered );
46
47private:
48 int m_columns;
49 int m_selectionIndex;
50 QList<GameSelectionBox*> m_boxes;
51};
52
53#endif
54