PageRenderTime 8ms CodeModel.GetById 4ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/ingamemenuframe.h

http://cutefootball.googlecode.com/
C++ Header | 49 lines | 23 code | 7 blank | 19 comment | 0 complexity | 9bcb746ed8ac7f3802c130aec1a8cbdd MD5 | raw file
 1/*
 2 * Copyright 2010,2011 Timothy Rochford
 3 *
 4 *    This file is part of CuteFootball.
 5 *
 6 *    CuteFootball is free software: you can redistribute it and/or modify
 7 *    it under the terms of the Lesser GNU General Public License as published by
 8 *    the Free Software Foundation, either version 3 of the License, or
 9 *    (at your option) any later version.
10 *
11 *    CuteFootball 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 *    Lesser GNU General Public License for more details.
15 *
16 *    You should have received a copy of the Lesser GNU General Public License
17 *    along with CuteFootball.  If not, see <http://www.gnu.org/licenses/>.
18 *
19 */
20#ifndef INGAMEMENUFRAME_H
21#define INGAMEMENUFRAME_H
22
23#include <QFrame>
24
25#include "ui_ingamemenuframe.h"
26#include "mainwindow.h"
27#include "pitch.h"
28
29class InGameMenuFrame : public QFrame
30{
31    Q_OBJECT
32
33public:
34    explicit InGameMenuFrame(MWindow *parent = 0);
35    ~InGameMenuFrame();
36    void setHomeTeamGoals(int n) { ui->homeGoals->setText(QString::number(n)); }
37    void setAwayTeamGoals(int n) { ui->awayGoals->setText(QString::number(n)); }
38    void setHomeTeamFlag(QString flag) { ui->homeFlag->setPixmap(QPixmap(flag).scaled(40,30));}
39    void setAwayTeamFlag(QString flag) { ui->awayFlag->setPixmap(QPixmap(flag).scaled(40,30));}
40
41public slots:
42    void showFrame(MWindow::Frame f);
43
44private:
45    Ui::InGameMenuFrame *ui;
46    Pitch& m_pitch;
47};
48
49#endif // INGAMEMENUFRAME_H