| 1 | // Version: $Id $cxx . . $ `<file>/src/newgamedlg.cc`/ |
| 2 | /*************************************************************************** |
| 3 | * Copyright (C) 2004-2005 Artur Wiebe * |
| 4 | * [email protected] * |
| 5 | * * |
| 6 | * This program is free software; you can redistribute it and/or modify * |
| 7 | * it under the terms of the GNU General Public License as published by * |
| 8 | * the Free Software Foundation; either version 2 of the License, or * |
| 9 | * (at your option) any later version. * |
| 10 | * * |
| 11 | * This program 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 | * GNU General Public License for more details. * |
| 15 | * * |
| 16 | * You should have received a copy of the GNU General Public License * |
| 17 | * along with this program; if not, write to the * |
| 18 | * Free Software Foundation, Inc., * |
| 19 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
| 20 | ***************************************************************************/ |
| 21 | #include <stdlib.h> |
| 22 | |
| 23 | #include <QLayout> |
| 24 | #include <QDebug> |
| 25 | |
| 26 | #include "newgamedlg.h"cxx . . $ `<file>/src/newgamedlg.h`/ |
| 27 | #include "pdn.h"cxx . . $ `<file>/src/pdn.h`/ |
| 28 | #include "common.h"cxx . . $ `<file>/src/common.h`/ |
| 29 | #include "history.h"cxx . . $ `<file>/src/history.h`/ |
| 30 | |
| 31 | #include "player.h"cxx . . $ `<file>/src/player.h`/ |
| 32 | |
| 33 | |
| 34 | #define BEGINNERcxx . . $ `src/newgamedlg.cc:34:9`! 2 |
| 35 | #define NOVICEcxx . . $ `src/newgamedlg.cc:35:9`! 4 |
| 36 | #define AVERAGEcxx . . $ `src/newgamedlg.cc:36:9`! 6 |
| 37 | #define GOODcxx . . $ `src/newgamedlg.cc:37:9`! 7 |
| 38 | #define EXPERTcxx . . $ `src/newgamedlg.cc:38:9`! 8 |
| 39 | #define MASTERcxx . . $ `src/newgamedlg.cc:39:9`! 9 |
| 40 | |
| 41 | #define CFG_SKILLcxx . . $ `src/newgamedlg.cc:41:9`! CFG_KEYcxx . . $ `src/common.h:44:9`!"Skill" |
| 42 | #define CFG_RULEScxx . . $ `src/newgamedlg.cc:42:9`! CFG_KEYcxx . . $ `src/common.h:44:9`!"Rules" |
| 43 | #define CFG_WHITEcxx . . $ `src/newgamedlg.cc:43:9`! CFG_KEYcxx . . $ `src/common.h:44:9`!"White" |
| 44 | #define CFG_PLAYER1cxx . . $ `src/newgamedlg.cc:44:9`! CFG_KEYcxx . . $ `src/common.h:44:9`!"Player1" |
| 45 | #define CFG_PLAYER2cxx . . $ `src/newgamedlg.cc:45:9`! CFG_KEYcxx . . $ `src/common.h:44:9`!"Player2" |
| 46 | |
| 47 | |
| 48 | myNewGameDlgcxx . . $ myNewGameDlg#::myNewGameDlgcxx . . $ myNewGameDlg#myNewGameDlg(108f35f7aa7f3cf9).(QWidgetcxx . . $ QWidget#* parent) |
| 49 | : QDialogcxx . . $ QDialog#QDialog(872e7b0c281abd8d).(parent) |
| 50 | { |
| 51 | setModalcxx . . $ QDialog#setModal(b45ddcbc8423892c).(true); |
| 52 | setWindowTitlecxx . . $ QWidget#setWindowTitle(3520e46b33348bf6).(trcxx . . $ myNewGameDlg#tr(75d9f1c324b4579d).("New Game")+cxx . . $ operator+(fab9b4f80031f353).QStringcxx . . $ QString#QString(85c52e162fed56f9).(" - "APPNAMEcxx . . $ `src/common.h:25:9`!)); |
| 53 | |
| 54 | |
| 55 | /* |
| 56 | * buttons, options. |
| 57 | */ |
| 58 | start_buttoncxx . . $ myNewGameDlg#start_button. = new QPushButtoncxx . . $ QPushButton#QPushButton(90d5708627041e22).(trcxx . . $ myNewGameDlg#tr(75d9f1c324b4579d).("&Start"), this); |
| 59 | start_buttoncxx . . $ myNewGameDlg#start_button.->setDefaultcxx . . $ QPushButton#setDefault(b45ddcbc8423892c).(true); |
| 60 | connectcxx . . $ QObject#connect(158df1d9a01a3410).(start_buttoncxx . . $ myNewGameDlg#start_button., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:265:10`!(clicked()), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:264:10`!(slot_start())); |
| 61 | |
| 62 | QPushButtoncxx . . $ QPushButton#* cn = new QPushButtoncxx . . $ QPushButton#QPushButton(90d5708627041e22).(trcxx . . $ myNewGameDlg#tr(75d9f1c324b4579d).("&Cancel"), this); |
| 63 | connectcxx . . $ QObject#connect(158df1d9a01a3410).(cn, SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:265:10`!(clicked()), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:264:10`!(slot_reject())); |
| 64 | |
| 65 | // TODO - better text |
| 66 | m_freeplacecxx . . $ myNewGameDlg#m_freeplace. = new QCheckBoxcxx . . $ QCheckBox#(trcxx . . $ myNewGameDlg#tr(75d9f1c324b4579d).("Free Men Placement"), this); |
| 67 | |
| 68 | QHBoxLayoutcxx . . $ QHBoxLayout#* buttons_layout = new QHBoxLayoutcxx . . $ QHBoxLayout#(); |
| 69 | buttons_layout->addWidgetcxx . . $ QBoxLayout#addWidget(d39963fa34d6acb).(m_freeplacecxx . . $ myNewGameDlg#m_freeplace.); |
| 70 | buttons_layout->addStretchcxx . . $ QBoxLayout#addStretch(d4f767463ce0a6b3).(); |
| 71 | buttons_layout->addWidgetcxx . . $ QBoxLayout#addWidget(d39963fa34d6acb).(start_buttoncxx . . $ myNewGameDlg#start_button.); |
| 72 | buttons_layout->addWidgetcxx . . $ QBoxLayout#addWidget(d39963fa34d6acb).(cn); |
| 73 | |
| 74 | |
| 75 | /* |
| 76 | * global layout. |
| 77 | */ |
| 78 | QHBoxLayoutcxx . . $ QHBoxLayout#* players_layout = new QHBoxLayoutcxx . . $ QHBoxLayout#(); |
| 79 | players_layout->addWidgetcxx . . $ QBoxLayout#addWidget(d39963fa34d6acb).(create_player_onecxx . . $ myNewGameDlg#create_player_one(9b769eeb00a33a04).()); |
| 80 | players_layout->addWidgetcxx . . $ QBoxLayout#addWidget(d39963fa34d6acb).(create_player_twocxx . . $ myNewGameDlg#create_player_two(9b769eeb00a33a04).()); |
| 81 | |
| 82 | QVBoxLayoutcxx . . $ QVBoxLayout#* global_layout = new QVBoxLayoutcxx . . $ QVBoxLayout#(this); |
| 83 | global_layout->addLayoutcxx . . $ QBoxLayout#addLayout(ecefce2409e37794).(players_layout); |
| 84 | global_layout->addLayoutcxx . . $ QBoxLayout#addLayout(ecefce2409e37794).(buttons_layout); |
| 85 | } |
| 86 | |
| 87 | |
| 88 | myNewGameDlgcxx . . $ myNewGameDlg#::~cxx . . $ myNewGameDlg#`~myNewGameDlg`(ced63f7c635d850d).myNewGameDlgcxx . . $ myNewGameDlg#() |
| 89 | { |
| 90 | } |
| 91 | |
| 92 | |
| 93 | QWidgetcxx . . $ QWidget#* myNewGameDlgcxx . . $ myNewGameDlg#::create_human_optionscxx . . $ myNewGameDlg#create_human_options(9b769eeb00a33a04).() |
| 94 | { |
| 95 | QFramecxx . . $ QFrame#* frm = new QFramecxx . . $ QFrame#(); |
| 96 | QVBoxLayoutcxx . . $ QVBoxLayout#* frm_layout = new QVBoxLayoutcxx . . $ QVBoxLayout#(frm); |
| 97 | frm_layout->addWidgetcxx . . $ QBoxLayout#addWidget(d39963fa34d6acb).(new QLabelcxx . . $ QLabel#("No options available."cxx . . $ QString#QString(85c52e162fed56f9).)); |
| 98 | frm_layout->addStretchcxx . . $ QBoxLayout#addStretch(d4f767463ce0a6b3).(); |
| 99 | |
| 100 | return frm; |
| 101 | } |
| 102 | |
| 103 | |
| 104 | QWidgetcxx . . $ QWidget#* myNewGameDlgcxx . . $ myNewGameDlg#::create_player_onecxx . . $ myNewGameDlg#create_player_one(9b769eeb00a33a04).() |
| 105 | { |
| 106 | m_player_onecxx . . $ myNewGameDlg#m_player_one..boxcxx . . $ myNewGameDlg#player_one_struct#box. = new QGroupBoxcxx . . $ QGroupBox#(trcxx . . $ myNewGameDlg#tr(75d9f1c324b4579d).("Player One"), this); |
| 107 | |
| 108 | // name |
| 109 | m_player_onecxx . . $ myNewGameDlg#m_player_one..namecxx . . $ myNewGameDlg#player_one_struct#name. = new QLineEditcxx . . $ QLineEdit#(m_player_onecxx . . $ myNewGameDlg#m_player_one..boxcxx . . $ myNewGameDlg#player_one_struct#box.); |
| 110 | |
| 111 | // rules group box |
| 112 | m_player_onecxx . . $ myNewGameDlg#m_player_one..rulescxx . . $ myNewGameDlg#player_one_struct#rules. = new QGroupBoxcxx . . $ QGroupBox#(trcxx . . $ myNewGameDlg#tr(75d9f1c324b4579d).("Rules"), m_player_onecxx . . $ myNewGameDlg#m_player_one..boxcxx . . $ myNewGameDlg#player_one_struct#box.); |
| 113 | m_player_onecxx . . $ myNewGameDlg#m_player_one..rule_englishcxx . . $ myNewGameDlg#player_one_struct#rule_english. = new QRadioButtoncxx . . $ QRadioButton#( |
| 114 | myHistorycxx . . $ myHistory#::typeToStringcxx . . $ myHistory#typeToString(ce915ed341d4a7f0).(ENGLISHcxx . . $ `src/pdn.h:34:9`!), m_player_onecxx . . $ myNewGameDlg#m_player_one..rulescxx . . $ myNewGameDlg#player_one_struct#rules.); |
| 115 | m_player_onecxx . . $ myNewGameDlg#m_player_one..rule_russiancxx . . $ myNewGameDlg#player_one_struct#rule_russian. = new QRadioButtoncxx . . $ QRadioButton#( |
| 116 | myHistorycxx . . $ myHistory#::typeToStringcxx . . $ myHistory#typeToString(ce915ed341d4a7f0).(RUSSIANcxx . . $ `src/pdn.h:35:9`!), m_player_onecxx . . $ myNewGameDlg#m_player_one..rulescxx . . $ myNewGameDlg#player_one_struct#rules.); |
| 117 | |
| 118 | QVBoxLayoutcxx . . $ QVBoxLayout#* rules_layout = new QVBoxLayoutcxx . . $ QVBoxLayout#(m_player_onecxx . . $ myNewGameDlg#m_player_one..rulescxx . . $ myNewGameDlg#player_one_struct#rules.); |
| 119 | rules_layout->addWidgetcxx . . $ QBoxLayout#addWidget(d39963fa34d6acb).(m_player_onecxx . . $ myNewGameDlg#m_player_one..rule_englishcxx . . $ myNewGameDlg#player_one_struct#rule_english.); |
| 120 | rules_layout->addWidgetcxx . . $ QBoxLayout#addWidget(d39963fa34d6acb).(m_player_onecxx . . $ myNewGameDlg#m_player_one..rule_russiancxx . . $ myNewGameDlg#player_one_struct#rule_russian.); |
| 121 | |
| 122 | // play white men? |
| 123 | m_player_onecxx . . $ myNewGameDlg#m_player_one..whitecxx . . $ myNewGameDlg#player_one_struct#white. = new QCheckBoxcxx . . $ QCheckBox#(trcxx . . $ myNewGameDlg#tr(75d9f1c324b4579d).("White"), m_player_onecxx . . $ myNewGameDlg#m_player_one..boxcxx . . $ myNewGameDlg#player_one_struct#box.); |
| 124 | |
| 125 | // layout |
| 126 | QVBoxLayoutcxx . . $ QVBoxLayout#* vb1_layout = new QVBoxLayoutcxx . . $ QVBoxLayout#(m_player_onecxx . . $ myNewGameDlg#m_player_one..boxcxx . . $ myNewGameDlg#player_one_struct#box.); |
| 127 | vb1_layout->addWidgetcxx . . $ QBoxLayout#addWidget(d39963fa34d6acb).(m_player_onecxx . . $ myNewGameDlg#m_player_one..namecxx . . $ myNewGameDlg#player_one_struct#name.); |
| 128 | vb1_layout->addWidgetcxx . . $ QBoxLayout#addWidget(d39963fa34d6acb).(m_player_onecxx . . $ myNewGameDlg#m_player_one..rulescxx . . $ myNewGameDlg#player_one_struct#rules.); |
| 129 | vb1_layout->addWidgetcxx . . $ QBoxLayout#addWidget(d39963fa34d6acb).(m_player_onecxx . . $ myNewGameDlg#m_player_one..whitecxx . . $ myNewGameDlg#player_one_struct#white.); |
| 130 | |
| 131 | return m_player_onecxx . . $ myNewGameDlg#m_player_one..boxcxx . . $ myNewGameDlg#player_one_struct#box.; |
| 132 | } |
| 133 | |
| 134 | |
| 135 | QWidgetcxx . . $ QWidget#* myNewGameDlgcxx . . $ myNewGameDlg#::create_player_twocxx . . $ myNewGameDlg#create_player_two(9b769eeb00a33a04).() |
| 136 | { |
| 137 | m_player_twocxx . . $ myNewGameDlg#m_player_two..boxcxx . . $ myNewGameDlg#player_two_struct#box. = new QGroupBoxcxx . . $ QGroupBox#(trcxx . . $ myNewGameDlg#tr(75d9f1c324b4579d).("Player Two"), this); |
| 138 | |
| 139 | // name |
| 140 | m_player_twocxx . . $ myNewGameDlg#m_player_two..namecxx . . $ myNewGameDlg#player_two_struct#name. = new QLineEditcxx . . $ QLineEdit#(m_player_twocxx . . $ myNewGameDlg#m_player_two..boxcxx . . $ myNewGameDlg#player_two_struct#box.); |
| 141 | |
| 142 | // options |
| 143 | m_player_twocxx . . $ myNewGameDlg#m_player_two..optionscxx . . $ myNewGameDlg#player_two_struct#options. = new QTabWidgetcxx . . $ QTabWidget#(m_player_twocxx . . $ myNewGameDlg#m_player_two..boxcxx . . $ myNewGameDlg#player_two_struct#box.); |
| 144 | m_player_twocxx . . $ myNewGameDlg#m_player_two..optionscxx . . $ myNewGameDlg#player_two_struct#options.->insertTabcxx . . $ QTabWidget#insertTab(5b8f137b431b3538).(COMPUTERcxx . . $ `src/newgamedlg.h:36:9`!, create_computer_optionscxx . . $ myNewGameDlg#create_computer_options(9b769eeb00a33a04).(), trcxx . . $ myNewGameDlg#tr(75d9f1c324b4579d).("Computer")); |
| 145 | m_player_twocxx . . $ myNewGameDlg#m_player_two..optionscxx . . $ myNewGameDlg#player_two_struct#options.->insertTabcxx . . $ QTabWidget#insertTab(5b8f137b431b3538).(HUMANcxx . . $ `src/newgamedlg.h:37:9`!, create_human_optionscxx . . $ myNewGameDlg#create_human_options(9b769eeb00a33a04).(), trcxx . . $ myNewGameDlg#tr(75d9f1c324b4579d).("Human")); |
| 146 | connectcxx . . $ QObject#connect(158df1d9a01a3410).(m_player_twocxx . . $ myNewGameDlg#m_player_two..optionscxx . . $ myNewGameDlg#player_two_struct#options., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:265:10`!(currentChanged(int)), |
| 147 | this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:264:10`!(slot_game(int))); |
| 148 | |
| 149 | /* |
| 150 | * frame layout |
| 151 | */ |
| 152 | QVBoxLayoutcxx . . $ QVBoxLayout#* frm_layout = new QVBoxLayoutcxx . . $ QVBoxLayout#(m_player_twocxx . . $ myNewGameDlg#m_player_two..boxcxx . . $ myNewGameDlg#player_two_struct#box.); |
| 153 | frm_layout->addWidgetcxx . . $ QBoxLayout#addWidget(d39963fa34d6acb).(m_player_twocxx . . $ myNewGameDlg#m_player_two..namecxx . . $ myNewGameDlg#player_two_struct#name.); |
| 154 | frm_layout->addWidgetcxx . . $ QBoxLayout#addWidget(d39963fa34d6acb).(m_player_twocxx . . $ myNewGameDlg#m_player_two..optionscxx . . $ myNewGameDlg#player_two_struct#options.); |
| 155 | |
| 156 | return m_player_twocxx . . $ myNewGameDlg#m_player_two..boxcxx . . $ myNewGameDlg#player_two_struct#box.; |
| 157 | } |
| 158 | |
| 159 | |
| 160 | QWidgetcxx . . $ QWidget#* myNewGameDlgcxx . . $ myNewGameDlg#::create_computer_optionscxx . . $ myNewGameDlg#create_computer_options(9b769eeb00a33a04).() |
| 161 | { |
| 162 | QFramecxx . . $ QFrame#* frm = new QFramecxx . . $ QFrame#(); |
| 163 | |
| 164 | // skills |
| 165 | QGroupBoxcxx . . $ QGroupBox#* skills = new QGroupBoxcxx . . $ QGroupBox#(trcxx . . $ myNewGameDlg#tr(75d9f1c324b4579d).("Skill"), frm); |
| 166 | m_player_twocxx . . $ myNewGameDlg#m_player_two..computercxx . . $ myNewGameDlg#player_two_struct#computer..skillscxx . . $ myNewGameDlg#player_two_struct#computer_stuct#skills.[cxx . . $ QMap#`operator[]`(bbd415b616967878).BEGINNERcxx . . $ `src/newgamedlg.cc:34:9`!] = new QRadioButtoncxx . . $ QRadioButton#(trcxx . . $ myNewGameDlg#tr(75d9f1c324b4579d).("Beginner"), |
| 167 | skills); |
| 168 | m_player_twocxx . . $ myNewGameDlg#m_player_two..computercxx . . $ myNewGameDlg#player_two_struct#computer..skillscxx . . $ myNewGameDlg#player_two_struct#computer_stuct#skills.[cxx . . $ QMap#`operator[]`(bbd415b616967878).NOVICEcxx . . $ `src/newgamedlg.cc:35:9`!] = new QRadioButtoncxx . . $ QRadioButton#(trcxx . . $ myNewGameDlg#tr(75d9f1c324b4579d).("Novice"), |
| 169 | skills); |
| 170 | m_player_twocxx . . $ myNewGameDlg#m_player_two..computercxx . . $ myNewGameDlg#player_two_struct#computer..skillscxx . . $ myNewGameDlg#player_two_struct#computer_stuct#skills.[cxx . . $ QMap#`operator[]`(bbd415b616967878).AVERAGEcxx . . $ `src/newgamedlg.cc:36:9`!] = new QRadioButtoncxx . . $ QRadioButton#(trcxx . . $ myNewGameDlg#tr(75d9f1c324b4579d).("Average"), |
| 171 | skills); |
| 172 | m_player_twocxx . . $ myNewGameDlg#m_player_two..computercxx . . $ myNewGameDlg#player_two_struct#computer..skillscxx . . $ myNewGameDlg#player_two_struct#computer_stuct#skills.[cxx . . $ QMap#`operator[]`(bbd415b616967878).GOODcxx . . $ `src/newgamedlg.cc:37:9`!] = new QRadioButtoncxx . . $ QRadioButton#(trcxx . . $ myNewGameDlg#tr(75d9f1c324b4579d).("Good"), |
| 173 | skills); |
| 174 | m_player_twocxx . . $ myNewGameDlg#m_player_two..computercxx . . $ myNewGameDlg#player_two_struct#computer..skillscxx . . $ myNewGameDlg#player_two_struct#computer_stuct#skills.[cxx . . $ QMap#`operator[]`(bbd415b616967878).EXPERTcxx . . $ `src/newgamedlg.cc:38:9`!] = new QRadioButtoncxx . . $ QRadioButton#(trcxx . . $ myNewGameDlg#tr(75d9f1c324b4579d).("Expert"), |
| 175 | skills); |
| 176 | m_player_twocxx . . $ myNewGameDlg#m_player_two..computercxx . . $ myNewGameDlg#player_two_struct#computer..skillscxx . . $ myNewGameDlg#player_two_struct#computer_stuct#skills.[cxx . . $ QMap#`operator[]`(bbd415b616967878).MASTERcxx . . $ `src/newgamedlg.cc:39:9`!] = new QRadioButtoncxx . . $ QRadioButton#(trcxx . . $ myNewGameDlg#tr(75d9f1c324b4579d).("Master"), |
| 177 | skills); |
| 178 | |
| 179 | QGridLayoutcxx . . $ QGridLayout#* skills_layout = new QGridLayoutcxx . . $ QGridLayout#(skills); |
| 180 | int row = 0; |
| 181 | int col = 0; |
| 182 | foreachcxx . . $ `<external>/15045578679651060896/qglobal.h:1145:13`!(QRadioButton* rb, m_player_two.computer.skills) { |
| 183 | skills_layout->addWidgetcxx . . $ QGridLayout#addWidget(17d1465fab362e2d).(rb, row++, col); |
| 184 | connectcxx . . $ QObject#connect(158df1d9a01a3410).(rb, SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:265:10`!(clicked()), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:264:10`!(slot_skills())); |
| 185 | if(row > 2) { |
| 186 | row = 0; |
| 187 | col = 1; |
| 188 | } |
| 189 | } |
| 190 | |
| 191 | // layout |
| 192 | QHBoxLayoutcxx . . $ QHBoxLayout#* frm_layout = new QHBoxLayoutcxx . . $ QHBoxLayout#(frm); |
| 193 | frm_layout->addWidgetcxx . . $ QBoxLayout#addWidget(d39963fa34d6acb).(skills); |
| 194 | |
| 195 | return frm; |
| 196 | } |
| 197 | |
| 198 | |
| 199 | void myNewGameDlgcxx . . $ myNewGameDlg#::slot_rejectcxx . . $ myNewGameDlg#slot_reject(49f6e7a06ebc5aa8).() |
| 200 | { |
| 201 | rejectcxx . . $ QDialog#reject(49f6e7a06ebc5aa8).(); |
| 202 | } |
| 203 | |
| 204 | |
| 205 | void myNewGameDlgcxx . . $ myNewGameDlg#::slot_startcxx . . $ myNewGameDlg#slot_start(49f6e7a06ebc5aa8).() |
| 206 | { |
| 207 | acceptcxx . . $ QDialog#accept(49f6e7a06ebc5aa8).(); |
| 208 | } |
| 209 | |
| 210 | |
| 211 | void myNewGameDlgcxx . . $ myNewGameDlg#::slot_skillscxx . . $ myNewGameDlg#slot_skills(49f6e7a06ebc5aa8).() |
| 212 | { |
| 213 | QRadioButtoncxx . . $ QRadioButton#* skill = 0; |
| 214 | foreachcxx . . $ `<external>/15045578679651060896/qglobal.h:1145:13`!(QRadioButton* rb, m_player_two.computer.skills) { |
| 215 | if(rb->isCheckedcxx . . $ QAbstractButton#isChecked(50ce9a9e25b4a850).()) { |
| 216 | skill = rb; |
| 217 | break; |
| 218 | } |
| 219 | } |
| 220 | |
| 221 | if(skill) |
| 222 | m_player_twocxx . . $ myNewGameDlg#m_player_two..namecxx . . $ myNewGameDlg#player_two_struct#name.->setTextcxx . . $ QLineEdit#setText(3520e46b33348bf6).("*"+cxx . . $ operator+(c75c3ae4eb9af1a8).skill->textcxx . . $ QAbstractButton#text(6ef7b6c27b00b43d).()+cxx . . $ operator+(3d22f08efddf8107)."*"); |
| 223 | } |
| 224 | |
| 225 | |
| 226 | void myNewGameDlgcxx . . $ myNewGameDlg#::slot_game_startcxx . . $ myNewGameDlg#slot_game_start(d4f767463ce0a6b3).(int id) |
| 227 | { |
| 228 | slot_gamecxx . . $ myNewGameDlg#slot_game(d4f767463ce0a6b3).(id); |
| 229 | slot_startcxx . . $ myNewGameDlg#slot_start(49f6e7a06ebc5aa8).(); |
| 230 | } |
| 231 | |
| 232 | |
| 233 | void myNewGameDlgcxx . . $ myNewGameDlg#::slot_gamecxx . . $ myNewGameDlg#slot_game(d4f767463ce0a6b3).(int id) |
| 234 | { |
| 235 | start_buttoncxx . . $ myNewGameDlg#start_button.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 236 | m_player_onecxx . . $ myNewGameDlg#m_player_one..boxcxx . . $ myNewGameDlg#player_one_struct#box.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 237 | m_player_twocxx . . $ myNewGameDlg#m_player_two..optionscxx . . $ myNewGameDlg#player_two_struct#options.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 238 | |
| 239 | if(m_player_twocxx . . $ myNewGameDlg#m_player_two..last_game_indexcxx . . $ myNewGameDlg#player_two_struct#last_game_index.==HUMANcxx . . $ `src/newgamedlg.h:37:9`!) { |
| 240 | m_cfg_player2cxx . . $ myNewGameDlg#m_cfg_player2. =cxx . . $ QString#`operator=`(4f35bf974e7f8568). m_player_twocxx . . $ myNewGameDlg#m_player_two..namecxx . . $ myNewGameDlg#player_two_struct#name.->textcxx . . $ QLineEdit#text(6ef7b6c27b00b43d).(); |
| 241 | } |
| 242 | |
| 243 | m_player_twocxx . . $ myNewGameDlg#m_player_two..last_game_indexcxx . . $ myNewGameDlg#player_two_struct#last_game_index. = id; |
| 244 | |
| 245 | switch(id) { |
| 246 | case COMPUTERcxx . . $ `src/newgamedlg.h:36:9`!: |
| 247 | m_player_twocxx . . $ myNewGameDlg#m_player_two..namecxx . . $ myNewGameDlg#player_two_struct#name.->setReadOnlycxx . . $ QLineEdit#setReadOnly(b45ddcbc8423892c).(true); |
| 248 | slot_skillscxx . . $ myNewGameDlg#slot_skills(49f6e7a06ebc5aa8).(); |
| 249 | |
| 250 | m_player_onecxx . . $ myNewGameDlg#m_player_one..rulescxx . . $ myNewGameDlg#player_one_struct#rules.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 251 | m_player_onecxx . . $ myNewGameDlg#m_player_one..whitecxx . . $ myNewGameDlg#player_one_struct#white.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 252 | break; |
| 253 | |
| 254 | case HUMANcxx . . $ `src/newgamedlg.h:37:9`!: |
| 255 | m_player_twocxx . . $ myNewGameDlg#m_player_two..namecxx . . $ myNewGameDlg#player_two_struct#name.->setReadOnlycxx . . $ QLineEdit#setReadOnly(b45ddcbc8423892c).(false); |
| 256 | m_player_twocxx . . $ myNewGameDlg#m_player_two..namecxx . . $ myNewGameDlg#player_two_struct#name.->setTextcxx . . $ QLineEdit#setText(3520e46b33348bf6).(m_cfg_player2cxx . . $ myNewGameDlg#m_cfg_player2.); |
| 257 | |
| 258 | m_player_onecxx . . $ myNewGameDlg#m_player_one..rulescxx . . $ myNewGameDlg#player_one_struct#rules.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 259 | m_player_onecxx . . $ myNewGameDlg#m_player_one..whitecxx . . $ myNewGameDlg#player_one_struct#white.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 260 | break; |
| 261 | |
| 262 | default: |
| 263 | qDebugcxx . . $ `<external>/10450329605257866924/qlogging.h:164:9`!() <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). __PRETTY_FUNCTION__ <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "ERR"; |
| 264 | break; |
| 265 | } |
| 266 | } |
| 267 | |
| 268 | |
| 269 | void myNewGameDlgcxx . . $ myNewGameDlg#::writeSettingscxx . . $ myNewGameDlg#writeSettings(a6b0dd7eca790fad).(QSettingscxx . . $ QSettings#* cfg) |
| 270 | { |
| 271 | cfg->setValuecxx . . $ QSettings#setValue(1c60a90c724e6bfb).(CFG_SKILLcxx . . $ `src/newgamedlg.cc:41:9`!, skillcxx . . $ QVariant#QVariant(d4f767463ce0a6b3).()); |
| 272 | cfg->setValuecxx . . $ QSettings#setValue(1c60a90c724e6bfb).(CFG_RULEScxx . . $ `src/newgamedlg.cc:42:9`!, rulescxx . . $ QVariant#QVariant(d4f767463ce0a6b3).()); |
| 273 | cfg->setValuecxx . . $ QSettings#setValue(1c60a90c724e6bfb).(CFG_WHITEcxx . . $ `src/newgamedlg.cc:43:9`!, m_player_onecxx . . $ QVariant#QVariant(b45ddcbc8423892c)..whitecxx . . $ myNewGameDlg#player_one_struct#white.->isCheckedcxx . . $ QAbstractButton#isChecked(50ce9a9e25b4a850).()); |
| 274 | |
| 275 | cfg->setValuecxx . . $ QSettings#setValue(1c60a90c724e6bfb).(CFG_PLAYER1cxx . . $ `src/newgamedlg.cc:44:9`!, m_player_onecxx . . $ QVariant#QVariant(3520e46b33348bf6)..namecxx . . $ myNewGameDlg#player_one_struct#name.->textcxx . . $ QLineEdit#text(6ef7b6c27b00b43d).()); |
| 276 | cfg->setValuecxx . . $ QSettings#setValue(1c60a90c724e6bfb).(CFG_PLAYER2cxx . . $ `src/newgamedlg.cc:45:9`!, m_cfg_player2cxx . . $ QVariant#QVariant(3520e46b33348bf6).); |
| 277 | } |
| 278 | |
| 279 | |
| 280 | void myNewGameDlgcxx . . $ myNewGameDlg#::readSettingscxx . . $ myNewGameDlg#readSettings(a6b0dd7eca790fad).(QSettingscxx . . $ QSettings#* cfg) |
| 281 | { |
| 282 | int skills = cfg->valuecxx . . $ QSettings#value(12a1b1749da49362).(CFG_SKILLcxx . . $ `src/newgamedlg.cc:41:9`!, BEGINNERcxx . . $ `src/newgamedlg.cc:34:9`!).toIntcxx . . $ QVariant#toInt(5bd9a3493f6a7a21).(); |
| 283 | QMapcxx . . $ QMap#<int, QRadioButton*>::iteratorcxx . . $ QMap#iterator# itcxx . . $ QMap#iterator#iterator(49f6e7a06ebc5aa8).; |
| 284 | it =cxx . . $ QMap#iterator#`operator=`(8194098c1182d571). m_player_twocxx . . $ myNewGameDlg#m_player_two..computercxx . . $ myNewGameDlg#player_two_struct#computer..skillscxx . . $ myNewGameDlg#player_two_struct#computer_stuct#skills..findcxx . . $ QMap#find(9e2276816f28e801).(skills); |
| 285 | if(it !=cxx . . $ QMap#iterator#`operator!=`(8a5a4c9a0d42c534). m_player_twocxx . . $ myNewGameDlg#m_player_two..computercxx . . $ myNewGameDlg#player_two_struct#computer..skillscxx . . $ myNewGameDlg#player_two_struct#computer_stuct#skills..endcxx . . $ QMap#end(2d49d7eeb2586d1c).()) { |
| 286 | it.valuecxx . . $ QMap#iterator#value(51f62fb05f27f6a2).()->setCheckedcxx . . $ QAbstractButton#setChecked(b45ddcbc8423892c).(true); |
| 287 | } else { |
| 288 | m_player_twocxx . . $ myNewGameDlg#m_player_two..computercxx . . $ myNewGameDlg#player_two_struct#computer..skillscxx . . $ myNewGameDlg#player_two_struct#computer_stuct#skills.[cxx . . $ QMap#`operator[]`(bbd415b616967878).BEGINNERcxx . . $ `src/newgamedlg.cc:34:9`!]->setCheckedcxx . . $ QAbstractButton#setChecked(b45ddcbc8423892c).(true); |
| 289 | } |
| 290 | slot_skillscxx . . $ myNewGameDlg#slot_skills(49f6e7a06ebc5aa8).(); |
| 291 | |
| 292 | int rules = cfg->valuecxx . . $ QSettings#value(12a1b1749da49362).(CFG_RULEScxx . . $ `src/newgamedlg.cc:42:9`!, ENGLISHcxx . . $ `src/pdn.h:34:9`!).toIntcxx . . $ QVariant#toInt(5bd9a3493f6a7a21).(); |
| 293 | if(rules == ENGLISHcxx . . $ `src/pdn.h:34:9`!) { |
| 294 | m_player_onecxx . . $ myNewGameDlg#m_player_one..rule_englishcxx . . $ myNewGameDlg#player_one_struct#rule_english.->setCheckedcxx . . $ QAbstractButton#setChecked(b45ddcbc8423892c).(true); |
| 295 | } else { |
| 296 | m_player_onecxx . . $ myNewGameDlg#m_player_one..rule_russiancxx . . $ myNewGameDlg#player_one_struct#rule_russian.->setCheckedcxx . . $ QAbstractButton#setChecked(b45ddcbc8423892c).(true); |
| 297 | } |
| 298 | |
| 299 | m_player_onecxx . . $ myNewGameDlg#m_player_one..whitecxx . . $ myNewGameDlg#player_one_struct#white.->setCheckedcxx . . $ QAbstractButton#setChecked(b45ddcbc8423892c).(cfg->valuecxx . . $ QSettings#value(12a1b1749da49362).(CFG_WHITEcxx . . $ `src/newgamedlg.cc:43:9`!, falsecxx . . $ QVariant#QVariant(b45ddcbc8423892c).).toBoolcxx . . $ QVariant#toBool(50ce9a9e25b4a850).()); |
| 300 | |
| 301 | m_player_onecxx . . $ myNewGameDlg#m_player_one..namecxx . . $ myNewGameDlg#player_one_struct#name.->setTextcxx . . $ QLineEdit#setText(3520e46b33348bf6).(cfg->valuecxx . . $ QSettings#value(12a1b1749da49362).(CFG_PLAYER1cxx . . $ `src/newgamedlg.cc:44:9`!, |
| 302 | getenvcxx . . $ QVariant#QVariant(85c52e162fed56f9).("USER")).toStringcxx . . $ QVariant#toString(6ef7b6c27b00b43d).()); |
| 303 | m_cfg_player2cxx . . $ myNewGameDlg#m_cfg_player2. =cxx . . $ QString#`operator=`(4f35bf974e7f8568). cfg->valuecxx . . $ QSettings#value(12a1b1749da49362).(CFG_PLAYER2cxx . . $ `src/newgamedlg.cc:45:9`!, "Player2"cxx . . $ QVariant#QVariant(85c52e162fed56f9).).toStringcxx . . $ QVariant#toString(6ef7b6c27b00b43d).(); |
| 304 | } |
| 305 | |
| 306 | |
| 307 | int myNewGameDlgcxx . . $ myNewGameDlg#::skillcxx . . $ myNewGameDlg#skill(455f465bc33b4cdf).() const |
| 308 | { |
| 309 | QMapcxx . . $ QMap#<int, QRadioButton*>::const_iteratorcxx . . $ QMap#const_iterator# itcxx . . $ QMap#const_iterator#const_iterator(49f6e7a06ebc5aa8).; |
| 310 | it =cxx . . $ QMap#const_iterator#`operator=`(57643f82b159929e). m_player_twocxx . . $ myNewGameDlg#m_player_two..computercxx . . $ myNewGameDlg#player_two_struct#computer..skillscxx . . $ myNewGameDlg#player_two_struct#computer_stuct#skills..begincxx . . $ QMap#begin(81a977e5fd18ea74).(); |
| 311 | for(; it!=cxx . . $ QMap#const_iterator#`operator!=`(afb29c289d8ce2db).m_player_twocxx . . $ myNewGameDlg#m_player_two..computercxx . . $ myNewGameDlg#player_two_struct#computer..skillscxx . . $ myNewGameDlg#player_two_struct#computer_stuct#skills..endcxx . . $ QMap#end(81a977e5fd18ea74).(); ++cxx . . $ QMap#const_iterator#operator++(535153adf4c12c2).it) { |
| 312 | if(it.valuecxx . . $ QMap#const_iterator#value(bdbd05d619d62250).()->isCheckedcxx . . $ QAbstractButton#isChecked(50ce9a9e25b4a850).()) { |
| 313 | return it.keycxx . . $ QMap#const_iterator#key(ea465e50d690edfe).(); |
| 314 | } |
| 315 | } |
| 316 | |
| 317 | qDebugcxx . . $ `<external>/10450329605257866924/qlogging.h:164:9`!() <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). __PRETTY_FUNCTION__ <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "No skill selected."; |
| 318 | return BEGINNERcxx . . $ `src/newgamedlg.cc:34:9`!; |
| 319 | } |
| 320 | |
| 321 | |
| 322 | int myNewGameDlgcxx . . $ myNewGameDlg#::rulescxx . . $ myNewGameDlg#rules(455f465bc33b4cdf).() const |
| 323 | { |
| 324 | if(m_player_onecxx . . $ myNewGameDlg#m_player_one..rule_englishcxx . . $ myNewGameDlg#player_one_struct#rule_english.->isCheckedcxx . . $ QAbstractButton#isChecked(50ce9a9e25b4a850).()) { |
| 325 | return ENGLISHcxx . . $ `src/pdn.h:34:9`!; |
| 326 | } |
| 327 | return RUSSIANcxx . . $ `src/pdn.h:35:9`!; |
| 328 | } |
| 329 |