Warning, file /games/ksirk/ksirk/mainMenu.cpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* This file is part of KsirK. 0002 Copyright (C) 2008 Guillaume Pelouas <pelouas@hotmail.fr> 0003 0004 KsirK is free software; you can redistribute it and/or 0005 modify it under the terms of the GNU General Public 0006 License as published by the Free Software Foundation, either version 2 0007 of the License, or (at your option) any later version. 0008 0009 This program is distributed in the hope that it will be useful, 0010 but WITHOUT ANY WARRANTY; without even the implied warranty of 0011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0012 General Public License for more details. 0013 0014 You should have received a copy of the GNU General Public License 0015 along with this program; if not, write to the Free Software 0016 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 0017 02110-1301, USA 0018 */ 0019 0020 /* begin : Fri 21 2007 */ 0021 0022 #include "mainMenu.h" 0023 #include "GameLogic/gameautomaton.h" 0024 #include "GameLogic/onu.h" 0025 #include "kgamewin.h" 0026 0027 0028 #include <KLocalizedString> 0029 0030 mainMenu::mainMenu(Ksirk::KGameWindow* game, QWidget* parent) : QWidget(parent) 0031 { 0032 qCDebug(KSIRK_LOG); 0033 setupUi(this); 0034 0035 // Load image 0036 QString imageFileName; 0037 QPixmap imag1, imag2; 0038 0039 imageFileName = QStandardPaths::locate(QStandardPaths::AppDataLocation, "skins/default/Images/logoRight.png"); 0040 imag1.load(imageFileName); 0041 imageFileName = QStandardPaths::locate(QStandardPaths::AppDataLocation, "skins/default/Images/logoLeft.png"); 0042 imag2.load(imageFileName); 0043 0044 lImage1->setPixmap(imag1.scaled(100,100,Qt::KeepAspectRatioByExpanding)); 0045 lImage2->setPixmap(imag2.scaled(100,100,Qt::KeepAspectRatioByExpanding)); 0046 0047 connect(pbNewGame, &QAbstractButton::clicked, game, &Ksirk::KGameWindow::slotNewGame); 0048 connect(pbJabberGame, &QAbstractButton::clicked, game, &Ksirk::KGameWindow::slotJabberGame); 0049 connect(pbNewSocketGame, &QAbstractButton::clicked, game, &Ksirk::KGameWindow::slotNewSocketGame); 0050 connect(pbJoin, &QAbstractButton::clicked, game, &Ksirk::KGameWindow::slotJoinNetworkGame); 0051 connect(pbLoad, &QAbstractButton::clicked, game, &Ksirk::KGameWindow::slotOpenGame); 0052 connect(pbQuit, &QAbstractButton::clicked, game, &QWidget::close); 0053 } 0054 0055 void mainMenu::init(Ksirk::GameLogic::ONU* /*theWorld*/) 0056 { 0057 } 0058 0059