PageRenderTime 24ms CodeModel.GetById 15ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/aboutFrame.cpp

http://cutefootball.googlecode.com/
C++ | 49 lines | 26 code | 4 blank | 19 comment | 2 complexity | c65784ae8bb995016d1ae2099ba851f5 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#include "aboutFrame.h"
21#include "ui_aboutFrame.h"
22#include "version.h"
23
24aboutFrame::aboutFrame(MWindow *parent) :
25    QFrame(parent),
26    uiAbout(new Ui::aboutFrame)
27{
28    uiAbout->setupUi(this);
29    uiAbout->versionLabel->setText(KVersionNumber);
30
31    connect(parent, SIGNAL(setFrame(MWindow::Frame)),
32            this, SLOT(showFrame(MWindow::Frame)));
33    connect(uiAbout->mainMenuBtn, SIGNAL(clicked()),
34            parent, SLOT(hideAboutFrame()));
35}
36
37aboutFrame::~aboutFrame()
38{
39    delete uiAbout;
40}
41
42void aboutFrame::showFrame(MWindow::Frame f)
43{
44    qDebug() << "aboutFrame::showFrame" << f;
45    if ( f == MWindow::About )
46        showMaximized();
47    else
48        setVisible(false);
49}