File indexing completed on 2024-03-24 04:06:42
0001 /*************************************************************************** 0002 newGameDialogImpl.h - description 0003 ------------------- 0004 begin : Wed Feb 23 2005 0005 copyright : (C) 2005 by Gael de Chalendar 0006 email : kleag@free.fr 0007 ***************************************************************************/ 0008 0009 /*************************************************************************** 0010 * * 0011 * This program is free software; you can redistribute it and/or modify * 0012 * it under the terms of the GNU General Public License as published by * 0013 * the Free Software Foundation; either either version 2 0014 of the License, or (at your option) any later version.of the License, or * 0015 * (at your option) any later version. * 0016 * * 0017 * You should have received a copy of the GNU General Public License 0018 * along with this program; if not, write to the Free Software 0019 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 0020 * 02110-1301, USA 0021 ***************************************************************************/ 0022 0023 #include "ui_newGameDialog.h" 0024 #include "newgamesetup.h" 0025 0026 #include <QMap> 0027 0028 #ifndef KSIRK_NEWGAMEDIALOGIMPL_H 0029 #define KSIRK_NEWGAMEDIALOGIMPL_H 0030 0031 namespace Ksirk 0032 { 0033 namespace GameLogic 0034 { 0035 class GameAutomaton; 0036 } 0037 0038 /** 0039 * This is the implementation of the new game configuration dialog made with 0040 * QT Designer 0041 * @author Gaƫl de Chalendar 0042 */ 0043 class NewGameWidget : public QWidget, public Ui::NewGameDialog 0044 { 0045 Q_OBJECT 0046 public: 0047 explicit NewGameWidget(NewGameSetup* newGameSetup, QWidget *parent=nullptr); 0048 0049 ~NewGameWidget() override; 0050 0051 void init(const QString& skin, GameLogic::GameAutomaton::NetworkGameType netGameType); 0052 0053 public Q_SLOTS: 0054 virtual void slotOK(); 0055 virtual void slotCancel(); 0056 void slotSkinChanged(int skinNum); 0057 void slotGHNS(); 0058 void slotTcpPortEdited(int); 0059 void slotNbNetworkPlayersEdited(int); 0060 0061 Q_SIGNALS: 0062 void newGameOK(); 0063 void newGameKO(); 0064 0065 private: 0066 /** 0067 * Fills the skins combo with skins dir names found in the Ksirk app data dir 0068 * @todo Use skins names instead of dir names 0069 */ 0070 void fillSkinsCombo(); 0071 0072 NewGameSetup* m_newGameSetup; 0073 }; 0074 0075 } // closing namespace Ksirk 0076 0077 #endif // KSIRK_NEWGAMEDIALOGIMPL_H 0078