Debian Codegraph @

src/network/createroomdialog.cpp

raw symbols SCIP
1 /***************************************************************************
2 * Copyright (C) 2009 by The qGo Project *
3 * *
4 * This file is part of qGo. *
5 * *
6 * qGo 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, see <http://www.gnu.org/licenses/> *
18 * or write to the Free Software Foundation, Inc., *
19 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
20 ***************************************************************************/
21
22
23 #include <QtWidgets>
24 #include "createroomdialog.h"cxx . . $ `<file>/src/network/createroomdialog.h`/
25 #include "networkconnection.h"cxx . . $ `<file>/src/network/networkconnection.h`/
26
27 CreateRoomDialogcxx . . $ CreateRoomDialog#::CreateRoomDialogcxx . . $ CreateRoomDialog#CreateRoomDialog(bdf7e61fb2b15626).(NetworkConnectioncxx . . $ NetworkConnection# * conn) : connectioncxx . . $ CreateRoomDialog#connection.(conn)
28 {
29 setupUicxx . . $ Ui_CreateRoomDialog#setupUi(d194de0c0f68c28b).(this);
30 roomTypeTabcxx . . $ Ui_CreateRoomDialog#roomTypeTab.->removeTabcxx . . $ QTabWidget#removeTab(d4f767463ce0a6b3).(5); //specialty versions
31 roomTypeTabcxx . . $ Ui_CreateRoomDialog#roomTypeTab.->setTabEnabledcxx . . $ QTabWidget#setTabEnabled(918ebd27a9ddbad3).(3, false); //review
32 roomTypeTabcxx . . $ Ui_CreateRoomDialog#roomTypeTab.->setTabEnabledcxx . . $ QTabWidget#setTabEnabled(918ebd27a9ddbad3).(4, false); //multi
33
34 /*namelabel = new QLabel(tr("%1 %2").arg(name).arg(rank));
35 dialoglabel = new QLabel(tr("wants to play a match..."));
36 timelabel = new QLabel(tr("%1 seconds").arg(seconds));
37
38 createButton = new QPushButton(tr("&Create"));
39 createButton->setDefault(true);
40
41 cancelButton = new QPushButton(tr("&Cancel"));
42
43 buttonBox = new QDialogButtonBox(Qt::Horizontal);
44 buttonBox->addButton(createButton, QDialogButtonBox::ActionRole);
45 buttonBox->addButton(cancelButton, QDialogButtonBox::ActionRole);
46
47 connect(createButton, clicked()), this, slot_create()));
48 connect(cancelButton, clicked()), this, slot_cancel()));
49
50 QGridLayout * mainLayout = new QGridLayout;
51 mainLayout->setSizeConstraint(QLayout::SetFixedSize);
52 mainLayout->addWidget(namelabel, 0, 0);
53 mainLayout->addWidget(dialoglabel, 1, 0);
54 mainLayout->addWidget(timelabel, 2, 0);
55 mainLayout->addWidget(buttonBox, 3, 0);
56 setLayout(mainLayout);
57
58 setWindowTitle(tr("Create Room"));*/
59
60 connectcxx . . $ QObject#connect(835f87066c895669).(createButtoncxx . . $ Ui_CreateRoomDialog#createButton., &QPushButtoncxx . . $ QPushButton#::clickedcxx . . $ QAbstractButton#clicked(b45ddcbc8423892c)., this, &CreateRoomDialogcxx . . $ CreateRoomDialog#::slot_createcxx . . $ CreateRoomDialog#slot_create(49f6e7a06ebc5aa8).);
61 connectcxx . . $ QObject#connect(835f87066c895669).(cancelButtoncxx . . $ Ui_CreateRoomDialog#cancelButton., &QPushButtoncxx . . $ QPushButton#::clickedcxx . . $ QAbstractButton#clicked(b45ddcbc8423892c)., this, &CreateRoomDialogcxx . . $ CreateRoomDialog#::slot_cancelcxx . . $ CreateRoomDialog#slot_cancel(49f6e7a06ebc5aa8).);
62
63 connectcxx . . $ QObject#connect(835f87066c895669).(privateCBcxx . . $ Ui_CreateRoomDialog#privateCB., &QCheckBoxcxx . . $ QCheckBox#::clickedcxx . . $ QAbstractButton#clicked(b45ddcbc8423892c)., this, &CreateRoomDialogcxx . . $ CreateRoomDialog#::slot_privateCBcxx . . $ CreateRoomDialog#slot_privateCB(b45ddcbc8423892c).);
64
65 connectcxx . . $ QObject#connect(835f87066c895669).(roomTypeTabcxx . . $ Ui_CreateRoomDialog#roomTypeTab., &QTabWidgetcxx . . $ QTabWidget#::currentChangedcxx . . $ QTabWidget#currentChanged(d4f767463ce0a6b3)., this, &CreateRoomDialogcxx . . $ CreateRoomDialog#::slot_roomTypeTabcxx . . $ CreateRoomDialog#slot_roomTypeTab(49f6e7a06ebc5aa8).);
66
67 connectcxx . . $ QObject#connect(835f87066c895669).(opponentStrongerRBcxx . . $ Ui_CreateRoomDialog#opponentStrongerRB., &QRadioButtoncxx . . $ QRadioButton#::clickedcxx . . $ QAbstractButton#clicked(b45ddcbc8423892c)., this, &CreateRoomDialogcxx . . $ CreateRoomDialog#::slot_opponentStrongerRBcxx . . $ CreateRoomDialog#slot_opponentStrongerRB(49f6e7a06ebc5aa8).);
68 connectcxx . . $ QObject#connect(835f87066c895669).(opponentEvenRBcxx . . $ Ui_CreateRoomDialog#opponentEvenRB., &QRadioButtoncxx . . $ QRadioButton#::clickedcxx . . $ QAbstractButton#clicked(b45ddcbc8423892c)., this, &CreateRoomDialogcxx . . $ CreateRoomDialog#::slot_opponentEvenRBcxx . . $ CreateRoomDialog#slot_opponentEvenRB(49f6e7a06ebc5aa8).);
69 connectcxx . . $ QObject#connect(835f87066c895669).(opponentWeakerRBcxx . . $ Ui_CreateRoomDialog#opponentWeakerRB., &QRadioButtoncxx . . $ QRadioButton#::clickedcxx . . $ QAbstractButton#clicked(b45ddcbc8423892c)., this, &CreateRoomDialogcxx . . $ CreateRoomDialog#::slot_opponentWeakerRBcxx . . $ CreateRoomDialog#slot_opponentWeakerRB(49f6e7a06ebc5aa8).);
70 connectcxx . . $ QObject#connect(835f87066c895669).(opponentAnyRBcxx . . $ Ui_CreateRoomDialog#opponentAnyRB., &QRadioButtoncxx . . $ QRadioButton#::clickedcxx . . $ QAbstractButton#clicked(b45ddcbc8423892c)., this, &CreateRoomDialogcxx . . $ CreateRoomDialog#::slot_opponentAnyRBcxx . . $ CreateRoomDialog#slot_opponentAnyRB(49f6e7a06ebc5aa8).);
71
72 connectcxx . . $ QObject#connect(835f87066c895669).(timeQuickRBcxx . . $ Ui_CreateRoomDialog#timeQuickRB., &QRadioButtoncxx . . $ QRadioButton#::clickedcxx . . $ QAbstractButton#clicked(b45ddcbc8423892c)., this, &CreateRoomDialogcxx . . $ CreateRoomDialog#::slot_timeQuickRBcxx . . $ CreateRoomDialog#slot_timeQuickRB(49f6e7a06ebc5aa8).);
73 connectcxx . . $ QObject#connect(835f87066c895669).(timeNormalRBcxx . . $ Ui_CreateRoomDialog#timeNormalRB., &QRadioButtoncxx . . $ QRadioButton#::clickedcxx . . $ QAbstractButton#clicked(b45ddcbc8423892c)., this, &CreateRoomDialogcxx . . $ CreateRoomDialog#::slot_timeNormalRBcxx . . $ CreateRoomDialog#slot_timeNormalRB(49f6e7a06ebc5aa8).);
74 connectcxx . . $ QObject#connect(835f87066c895669).(timePonderousRBcxx . . $ Ui_CreateRoomDialog#timePonderousRB., &QRadioButtoncxx . . $ QRadioButton#::clickedcxx . . $ QAbstractButton#clicked(b45ddcbc8423892c)., this, &CreateRoomDialogcxx . . $ CreateRoomDialog#::slot_timePonderousRBcxx . . $ CreateRoomDialog#slot_timePonderousRB(49f6e7a06ebc5aa8).);
75 connectcxx . . $ QObject#connect(835f87066c895669).(timeAnyRBcxx . . $ Ui_CreateRoomDialog#timeAnyRB., &QRadioButtoncxx . . $ QRadioButton#::clickedcxx . . $ QAbstractButton#clicked(b45ddcbc8423892c)., this, &CreateRoomDialogcxx . . $ CreateRoomDialog#::slot_timeAnyRBcxx . . $ CreateRoomDialog#slot_timeAnyRB(49f6e7a06ebc5aa8).);
76
77 connectcxx . . $ QObject#connect(835f87066c895669).(oneOnOneRBcxx . . $ Ui_CreateRoomDialog#oneOnOneRB., &QRadioButtoncxx . . $ QRadioButton#::clickedcxx . . $ QAbstractButton#clicked(b45ddcbc8423892c)., this, &CreateRoomDialogcxx . . $ CreateRoomDialog#::slot_oneOnOneRBcxx . . $ CreateRoomDialog#slot_oneOnOneRB(49f6e7a06ebc5aa8).);
78 connectcxx . . $ QObject#connect(835f87066c895669).(pairRBcxx . . $ Ui_CreateRoomDialog#pairRB., &QRadioButtoncxx . . $ QRadioButton#::clickedcxx . . $ QAbstractButton#clicked(b45ddcbc8423892c)., this, &CreateRoomDialogcxx . . $ CreateRoomDialog#::slot_pairRBcxx . . $ CreateRoomDialog#slot_pairRB(49f6e7a06ebc5aa8).);
79 pairRBcxx . . $ Ui_CreateRoomDialog#pairRB.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(false);
80
81 connectcxx . . $ QObject#connect(835f87066c895669).(teachingRBcxx . . $ Ui_CreateRoomDialog#teachingRB., &QRadioButtoncxx . . $ QRadioButton#::clickedcxx . . $ QAbstractButton#clicked(b45ddcbc8423892c)., this, &CreateRoomDialogcxx . . $ CreateRoomDialog#::slot_teachingRBcxx . . $ CreateRoomDialog#slot_teachingRB(49f6e7a06ebc5aa8).);
82 connectcxx . . $ QObject#connect(835f87066c895669).(liveRBcxx . . $ Ui_CreateRoomDialog#liveRB., &QRadioButtoncxx . . $ QRadioButton#::clickedcxx . . $ QAbstractButton#clicked(b45ddcbc8423892c)., this, &CreateRoomDialogcxx . . $ CreateRoomDialog#::slot_liveRBcxx . . $ CreateRoomDialog#slot_liveRB(49f6e7a06ebc5aa8).);
83 }
84
85 void CreateRoomDialogcxx . . $ CreateRoomDialog#::slot_privateCBcxx . . $ CreateRoomDialog#slot_privateCB(b45ddcbc8423892c).(bool checked)
86 {
87 checked = false; //for the warning
88 passwordLabelcxx . . $ Ui_CreateRoomDialog#passwordLabel.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(checked);
89 passwordEditcxx . . $ Ui_CreateRoomDialog#passwordEdit.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(checked);
90 if(!checked)
91 passwordEditcxx . . $ Ui_CreateRoomDialog#passwordEdit.->clearcxx . . $ QLineEdit#clear(49f6e7a06ebc5aa8).();
92 }
93
94 void CreateRoomDialogcxx . . $ CreateRoomDialog#::slot_roomTypeTabcxx . . $ CreateRoomDialog#slot_roomTypeTab(49f6e7a06ebc5aa8).(void)
95 {
96 }
97 void CreateRoomDialogcxx . . $ CreateRoomDialog#::slot_opponentStrongerRBcxx . . $ CreateRoomDialog#slot_opponentStrongerRB(49f6e7a06ebc5aa8).(void)
98 {
99 }
100 void CreateRoomDialogcxx . . $ CreateRoomDialog#::slot_opponentEvenRBcxx . . $ CreateRoomDialog#slot_opponentEvenRB(49f6e7a06ebc5aa8).(void)
101 {
102 }
103 void CreateRoomDialogcxx . . $ CreateRoomDialog#::slot_opponentWeakerRBcxx . . $ CreateRoomDialog#slot_opponentWeakerRB(49f6e7a06ebc5aa8).(void)
104 {
105 }
106 void CreateRoomDialogcxx . . $ CreateRoomDialog#::slot_opponentAnyRBcxx . . $ CreateRoomDialog#slot_opponentAnyRB(49f6e7a06ebc5aa8).(void)
107 {
108 }
109
110 void CreateRoomDialogcxx . . $ CreateRoomDialog#::slot_timeQuickRBcxx . . $ CreateRoomDialog#slot_timeQuickRB(49f6e7a06ebc5aa8).(void)
111 {
112 }
113 void CreateRoomDialogcxx . . $ CreateRoomDialog#::slot_timeNormalRBcxx . . $ CreateRoomDialog#slot_timeNormalRB(49f6e7a06ebc5aa8).(void)
114 {
115 }
116 void CreateRoomDialogcxx . . $ CreateRoomDialog#::slot_timePonderousRBcxx . . $ CreateRoomDialog#slot_timePonderousRB(49f6e7a06ebc5aa8).(void)
117 {
118 }
119 void CreateRoomDialogcxx . . $ CreateRoomDialog#::slot_timeAnyRBcxx . . $ CreateRoomDialog#slot_timeAnyRB(49f6e7a06ebc5aa8).(void)
120 {
121 }
122 void CreateRoomDialogcxx . . $ CreateRoomDialog#::slot_oneOnOneRBcxx . . $ CreateRoomDialog#slot_oneOnOneRB(49f6e7a06ebc5aa8).(void)
123 {
124 }
125 void CreateRoomDialogcxx . . $ CreateRoomDialog#::slot_pairRBcxx . . $ CreateRoomDialog#slot_pairRB(49f6e7a06ebc5aa8).(void)
126 {
127 }
128 void CreateRoomDialogcxx . . $ CreateRoomDialog#::slot_teachingRBcxx . . $ CreateRoomDialog#slot_teachingRB(49f6e7a06ebc5aa8).(void)
129 {
130 }
131 void CreateRoomDialogcxx . . $ CreateRoomDialog#::slot_liveRBcxx . . $ CreateRoomDialog#slot_liveRB(49f6e7a06ebc5aa8).(void)
132 {
133 }
134
135 CreateRoomDialogcxx . . $ CreateRoomDialog#::~cxx . . $ CreateRoomDialog#`~CreateRoomDialog`(ced63f7c635d850d).CreateRoomDialogcxx . . $ CreateRoomDialog#()
136 {
137
138 }
139
140 void CreateRoomDialogcxx . . $ CreateRoomDialog#::slot_createcxx . . $ CreateRoomDialog#slot_create(49f6e7a06ebc5aa8).(void)
141 {
142 RoomCreatecxx . . $ RoomCreate# * room = new RoomCreatecxx . . $ RoomCreate#();
143 /* FIXME This could be problematic if the index
144 * can change when we remove tabs, but that's
145 * a ways away right now.*/
146 room->typecxx . . $ RoomCreate#type. = (RoomCreatecxx . . $ RoomCreate#::roomTypecxx . . $ RoomCreate#roomType#)roomTypeTabcxx . . $ Ui_CreateRoomDialog#roomTypeTab.->currentIndexcxx . . $ QTabWidget#currentIndex(455f465bc33b4cdf).();
147 switch(roomTypeTabcxx . . $ Ui_CreateRoomDialog#roomTypeTab.->currentIndexcxx . . $ QTabWidget#currentIndex(455f465bc33b4cdf).())
148 {
149 case RoomCreatecxx . . $ RoomCreate#::GAMEcxx . . $ RoomCreate#GAME.:
150 break;
151 case RoomCreatecxx . . $ RoomCreate#::GOMOKUcxx . . $ RoomCreate#GOMOKU.:
152 break;
153 case RoomCreatecxx . . $ RoomCreate#::CHATcxx . . $ RoomCreate#CHAT.:
154 break;
155 case RoomCreatecxx . . $ RoomCreate#::REVIEWcxx . . $ RoomCreate#REVIEW.:
156 donecxx . . $ QDialog#done(d4f767463ce0a6b3).(0);
157 break;
158 case RoomCreatecxx . . $ RoomCreate#::MULTIcxx . . $ RoomCreate#MULTI.:
159 donecxx . . $ QDialog#done(d4f767463ce0a6b3).(0);
160 break;
161 case RoomCreatecxx . . $ RoomCreate#::VARIATIONcxx . . $ RoomCreate#VARIATION.:
162 donecxx . . $ QDialog#done(d4f767463ce0a6b3).(0);
163 break;
164 }
165 connectioncxx . . $ CreateRoomDialog#connection.->sendCreateRoomcxx . . $ NetworkConnection#sendCreateRoom(9db6e4897fed4acd).(room);
166 donecxx . . $ QDialog#done(d4f767463ce0a6b3).(1);
167 }
168
169 void CreateRoomDialogcxx . . $ CreateRoomDialog#::slot_cancelcxx . . $ CreateRoomDialog#slot_cancel(49f6e7a06ebc5aa8).(void)
170 {
171 donecxx . . $ QDialog#done(d4f767463ce0a6b3).(0);
172 }