PageRenderTime 21ms CodeModel.GetById 12ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/inputsettingsframe.cpp

http://cutefootball.googlecode.com/
C++ | 49 lines | 26 code | 4 blank | 19 comment | 2 complexity | 5c7f73e84b75bca43ce08a3347bd9d96 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 "inputsettingsframe.h"
21#include "ui_inputSettingsFrame.h"
22
23inputSettingsFrame::inputSettingsFrame(MWindow *parent) :
24    QFrame(parent),
25    ui(new Ui::inputSettingsFrame)
26{
27    ui->setupUi(this);
28    ui->buttonBox->button(QDialogButtonBox::Ok)
29            ->setText(tr("Main Menu"));
30    connect(parent, SIGNAL(setFrame(MWindow::Frame)),
31            this, SLOT(showFrame(MWindow::Frame)));
32
33    connect(ui->buttonBox, SIGNAL(accepted()), parent, SLOT(hideHelpFrame()));
34    connect(ui->buttonBox, SIGNAL(rejected()), parent, SLOT(hideHelpFrame()));
35}
36
37inputSettingsFrame::~inputSettingsFrame()
38{
39    delete ui;
40}
41
42void inputSettingsFrame::showFrame(MWindow::Frame f)
43{
44    qDebug() << "inputSettingsFrame::showFrame " << f;
45    if ( f == MWindow::InputSettings )
46        showMaximized();
47    else
48        setVisible(false);
49}