Debian Codegraph @

src/listviews.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 "listviews.h"cxx . . $ `<file>/src/listviews.h`/
24 #include "network/messages.h"cxx . . $ `<file>/src/network/messages.h`/
25 #include "playergamelistings.h"cxx . . $ `<file>/src/network/playergamelistings.h`/
26 #include "gamedata.h"cxx . . $ `<file>/src/gamedata.h`/
27 #include <QColor>
28
29 PlayerListModelcxx . . $ PlayerListModel#::PlayerListModelcxx . . $ PlayerListModel#PlayerListModel(49f6e7a06ebc5aa8).()
30 {
31 }
32
33 PlayerListModelcxx . . $ PlayerListModel#::~cxx . . $ PlayerListModel#`~PlayerListModel`(ced63f7c635d850d).PlayerListModelcxx . . $ PlayerListModel#()
34 {
35 }
36
37 int PlayerListModelcxx . . $ PlayerListModel#::columnCountcxx . . $ PlayerListModel#columnCount(e3878d4d6cd9529c).(const QModelIndexcxx . . $ QModelIndex# &) const
38 {
39 return P_TOTALCOLUMNScxx . . $ P_TOTALCOLUMNS.;
40 }
41
42 QVariantcxx . . $ QVariant# PlayerListModelcxx . . $ PlayerListModel#::headerDatacxx . . $ PlayerListModel#headerData(b8cfec0985494997).(int section, Qtcxx . . $ Qt/::Orientationcxx . . $ Qt/Orientation# orientation, int role) const
43 {
44 if(orientation == Qtcxx . . $ Qt/::Horizontalcxx . . $ Qt/Horizontal. && role == Qtcxx . . $ Qt/::DisplayRolecxx . . $ Qt/DisplayRole.)
45 switch(section)
46 {
47 case PC_STATUScxx . . $ PC_STATUS.:
48 return QVariantcxx . . $ QVariant#QVariant(85c52e162fed56f9).("Stat");
49 case PC_NAMEcxx . . $ PC_NAME.:
50 return QVariantcxx . . $ QVariant#QVariant(85c52e162fed56f9).("Name");
51 case PC_RANKcxx . . $ PC_RANK.:
52 return QVariantcxx . . $ QVariant#QVariant(85c52e162fed56f9).("Rank");
53 case PC_PLAYINGcxx . . $ PC_PLAYING.:
54 return QVariantcxx . . $ QVariant#QVariant(85c52e162fed56f9).("Play");
55 case PC_OBSERVINGcxx . . $ PC_OBSERVING.:
56 return QVariantcxx . . $ QVariant#QVariant(85c52e162fed56f9).("Obs");
57 case PC_WINScxx . . $ PC_WINS.:
58 return QVariantcxx . . $ QVariant#QVariant(85c52e162fed56f9).("Won");
59 case PC_LOSSEScxx . . $ PC_LOSSES.:
60 return QVariantcxx . . $ QVariant#QVariant(85c52e162fed56f9).("Lost");
61 case PC_IDLEcxx . . $ PC_IDLE.:
62 return QVariantcxx . . $ QVariant#QVariant(85c52e162fed56f9).("Idle");
63 case PC_COUNTRYcxx . . $ PC_COUNTRY.:
64 return QVariantcxx . . $ QVariant#QVariant(85c52e162fed56f9).("Country");
65 case PC_MATCHPREFScxx . . $ PC_MATCHPREFS.:
66 return QVariantcxx . . $ QVariant#QVariant(85c52e162fed56f9).("Match prefs");
67 }
68 return QVariantcxx . . $ QVariant#QVariant(ced63f7c635d850d).();
69 }
70
71 void PlayerListModelcxx . . $ PlayerListModel#::removeListingcxx . . $ PlayerListModel#removeListing(122195e397f39e1b).(PlayerListingcxx . . $ PlayerListing# * const l)
72 {
73 int i = itemscxx . . $ PlayerListModel#items..indexOfcxx . . $ QList#indexOf(fc79640c865a6596).(l);
74 if (i != -1)
75 {
76 beginRemoveRowscxx . . $ QAbstractItemModel#beginRemoveRows(d1f44b3c3a3f9fa).(QModelIndexcxx . . $ QModelIndex#QModelIndex(ced63f7c635d850d).(), i, i);
77 itemscxx . . $ PlayerListModel#items..removeAtcxx . . $ QList#removeAt(d4f767463ce0a6b3).(i);
78 endRemoveRowscxx . . $ QAbstractItemModel#endRemoveRows(49f6e7a06ebc5aa8).();
79 }
80 }
81
82 void PlayerListModelcxx . . $ PlayerListModel#::clearListcxx . . $ PlayerListModel#clearList(49f6e7a06ebc5aa8).(void)
83 {
84 if(itemscxx . . $ PlayerListModel#items..countcxx . . $ QList#count(455f465bc33b4cdf).() == 0)
85 return;
86 beginResetModelcxx . . $ QAbstractItemModel#beginResetModel(49f6e7a06ebc5aa8).();
87 itemscxx . . $ PlayerListModel#items..clearcxx . . $ QList#clear(49f6e7a06ebc5aa8).();
88 endResetModelcxx . . $ QAbstractItemModel#endResetModel(49f6e7a06ebc5aa8).();
89 }
90
91 QVariantcxx . . $ QVariant# PlayerListModelcxx . . $ PlayerListModel#::datacxx . . $ PlayerListModel#data(69b5b18a001c0029).(const QModelIndexcxx . . $ QModelIndex# & index, int role) const
92 {
93 if(!index.isValidcxx . . $ QModelIndex#isValid(3482b152b9333168).())
94 return QVariantcxx . . $ QVariant#QVariant(ced63f7c635d850d).();
95
96 PlayerListingcxx . . $ PlayerListing# * item = static_cast<PlayerListingcxx . . $ PlayerListing#*>(index.internalPointercxx . . $ QModelIndex#internalPointer(9c85a4740a0511c5).());
97
98 if (role == Qtcxx . . $ Qt/::ForegroundRolecxx . . $ Qt/ForegroundRole.)
99 {
100 if(item->namecxx . . $ PlayerListing#name. ==cxx . . $ `operator==`(5bc2975d2d751687). account_namecxx . . $ PlayerListModel#account_name.)
101 return QColorcxx . . $ QColor#QColor(408ec4d5924bfb00).(Qtcxx . . $ Qt/::bluecxx . . $ Qt/blue.);
102 else
103 return QVariantcxx . . $ QVariant#QVariant(ced63f7c635d850d).();
104 }
105 else if ((role == Qtcxx . . $ Qt/::DisplayRolecxx . . $ Qt/DisplayRole.) || (role == LIST_SORT_ROLEcxx . . $ `src/listviews.h:43:9`!))
106 {
107 switch(index.columncxx . . $ QModelIndex#column(ea6fe5115c70a13f).())
108 {
109 case PC_STATUScxx . . $ PC_STATUS.:
110 return QVariantcxx . . $ QVariant#QVariant(3520e46b33348bf6).(item->infocxx . . $ PlayerListing#info.);
111 break;
112 case PC_NAMEcxx . . $ PC_NAME.:
113 return QVariantcxx . . $ QVariant#QVariant(3520e46b33348bf6).(item->namecxx . . $ PlayerListing#name.);
114 break;
115 case PC_RANKcxx . . $ PC_RANK.:
116 if (role == LIST_SORT_ROLEcxx . . $ `src/listviews.h:43:9`!)
117 return QVariantcxx . . $ QVariant#QVariant(cb2f890c2fdad230).(item->rank_scorecxx . . $ PlayerListing#rank_score.);
118 else
119 return QVariantcxx . . $ QVariant#QVariant(3520e46b33348bf6).(item->rankcxx . . $ PlayerListing#rank.);
120 case PC_PLAYINGcxx . . $ PC_PLAYING.:
121 if(item->playingcxx . . $ PlayerListing#playing. == 0)
122 return QVariantcxx . . $ QVariant#QVariant(85c52e162fed56f9).("-");
123 else
124 return QVariantcxx . . $ QVariant#QVariant(cb2f890c2fdad230).(item->playingcxx . . $ PlayerListing#playing.);
125 case PC_OBSERVINGcxx . . $ PC_OBSERVING.:
126 if(item->observingcxx . . $ PlayerListing#observing. == 0 ||
127 item->observingcxx . . $ PlayerListing#observing. == item->playingcxx . . $ PlayerListing#playing.)
128 return QVariantcxx . . $ QVariant#QVariant(85c52e162fed56f9).("-");
129 else
130 return QVariantcxx . . $ QVariant#QVariant(cb2f890c2fdad230).(item->observingcxx . . $ PlayerListing#observing.);
131 case PC_WINScxx . . $ PC_WINS.:
132 return QVariantcxx . . $ QVariant#QVariant(cb2f890c2fdad230).(item->winscxx . . $ PlayerListing#wins.);
133 case PC_LOSSEScxx . . $ PC_LOSSES.:
134 return QVariantcxx . . $ QVariant#QVariant(cb2f890c2fdad230).(item->lossescxx . . $ PlayerListing#losses.);
135 case PC_IDLEcxx . . $ PC_IDLE.:
136 if (role == LIST_SORT_ROLEcxx . . $ `src/listviews.h:43:9`!)
137 return QVariantcxx . . $ QVariant#QVariant(cb2f890c2fdad230).(item->seconds_idlecxx . . $ PlayerListing#seconds_idle.);
138 else
139 return QVariantcxx . . $ QVariant#QVariant(3520e46b33348bf6).(item->idletimecxx . . $ PlayerListing#idletime.);
140 case PC_COUNTRYcxx . . $ PC_COUNTRY.:
141 return QVariantcxx . . $ QVariant#QVariant(3520e46b33348bf6).(item->countrycxx . . $ PlayerListing#country.);
142 case PC_MATCHPREFScxx . . $ PC_MATCHPREFS.:
143 //is this right? FIXME takes up too much space, should go with simple numbers, abbrev.
144 return QVariantcxx . . $ QVariant#QVariant(3520e46b33348bf6).(item->nmatch_settingscxx . . $ PlayerListing#nmatch_settings.);
145 case PC_NOTIFYcxx . . $ PC_NOTIFY.: //was used for SimplePlayerListModel
146 return QVariantcxx . . $ QVariant#QVariant(b45ddcbc8423892c).(item->notifycxx . . $ PlayerListing#notify.);
147 case PC_ONLINEcxx . . $ PC_ONLINE.:
148 return QVariantcxx . . $ QVariant#QVariant(b45ddcbc8423892c).(item->onlinecxx . . $ PlayerListing#online.);
149 default:
150 return QVariantcxx . . $ QVariant#QVariant(ced63f7c635d850d).();
151 }
152 }
153 return QVariantcxx . . $ QVariant#QVariant(ced63f7c635d850d).();
154 }
155
156 PlayerListingcxx . . $ PlayerListing# * PlayerListModelcxx . . $ PlayerListModel#::playerListingFromIndexcxx . . $ PlayerListModel#playerListingFromIndex(b5acbb67a572cd68).(const QModelIndexcxx . . $ QModelIndex# & index)
157 {
158 return static_cast<PlayerListingcxx . . $ PlayerListing#*>(index.internalPointercxx . . $ QModelIndex#internalPointer(9c85a4740a0511c5).());
159 }
160
161
162 PlayerListingcxx . . $ PlayerListing# * PlayerListModelcxx . . $ PlayerListModel#::getEntrycxx . . $ PlayerListModel#getEntry(ad2afa9294843726).(unsigned int id)
163 {
164 PlayerListingcxx . . $ PlayerListing# * result;
165 for (int i=0; i < itemscxx . . $ PlayerListModel#items..countcxx . . $ QList#count(455f465bc33b4cdf).(); i++)
166 {
167 result = static_cast<PlayerListingcxx . . $ PlayerListing#*>(itemscxx . . $ PlayerListModel#items.[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).i]);
168 if (result->idcxx . . $ PlayerListing#id. == id)
169 {
170 return result;
171 }
172 }
173 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
174 }
175
176 PlayerListingcxx . . $ PlayerListing# * PlayerListModelcxx . . $ PlayerListModel#::getEntrycxx . . $ PlayerListModel#getEntry(d3f53ac2de9f0b45).(const QStringcxx . . $ QString# &name)
177 {
178 PlayerListingcxx . . $ PlayerListing# * result;
179 for (int i=0; i < itemscxx . . $ PlayerListModel#items..countcxx . . $ QList#count(455f465bc33b4cdf).(); i++)
180 {
181 result = static_cast<PlayerListingcxx . . $ PlayerListing#*>(itemscxx . . $ PlayerListModel#items.[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).i]);
182 if (result->namecxx . . $ PlayerListing#name. ==cxx . . $ `operator==`(5bc2975d2d751687). name)
183 {
184 return result;
185 }
186 }
187 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
188 }
189
190 PlayerListingcxx . . $ PlayerListing# * PlayerListModelcxx . . $ PlayerListModel#::getPlayerFromNotNickNamecxx . . $ PlayerListModel#getPlayerFromNotNickName(d3f53ac2de9f0b45).(const QStringcxx . . $ QString# & notnickname)
191 {
192 PlayerListingcxx . . $ PlayerListing# * result;
193 for (int i=0; i < itemscxx . . $ PlayerListModel#items..countcxx . . $ QList#count(455f465bc33b4cdf).(); i++)
194 {
195 result = static_cast<PlayerListingcxx . . $ PlayerListing#*>(itemscxx . . $ PlayerListModel#items.[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).i]);
196 if (result->notnicknamecxx . . $ PlayerListing#notnickname. ==cxx . . $ `operator==`(5bc2975d2d751687). notnickname)
197 return result;
198 }
199 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
200 }
201
202 PlayerListingcxx . . $ PlayerListing# * PlayerListModelcxx . . $ PlayerListModel#::updateEntrycxx . . $ PlayerListModel#updateEntry(e0d5f17158edcac4).(PlayerListingcxx . . $ PlayerListing# * listing)
203 {
204 PlayerListingcxx . . $ PlayerListing# * result;
205 for (int i=0; i < itemscxx . . $ PlayerListModel#items..countcxx . . $ QList#count(455f465bc33b4cdf).(); i++)
206 {
207 result = static_cast<PlayerListingcxx . . $ PlayerListing#*>(itemscxx . . $ PlayerListModel#items.[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).i]);
208 if (result == listing)
209 {
210 emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! dataChangedcxx . . $ QAbstractItemModel#dataChanged(ae8a85c811f0c28a).(createIndexcxx . . $ QAbstractItemModel#createIndex(ec74543ca13990c5).(i, 0), createIndexcxx . . $ QAbstractItemModel#createIndex(ec74543ca13990c5).(i, columnCountcxx . . $ PlayerListModel#columnCount(e3878d4d6cd9529c).() - 1));
211 return result;
212 }
213 }
214 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
215 }
216
217 void PlayerListModelcxx . . $ PlayerListModel#::insertListingcxx . . $ PlayerListModel#insertListing(122195e397f39e1b).(PlayerListingcxx . . $ PlayerListing# *item)
218 {
219 beginInsertRowscxx . . $ QAbstractItemModel#beginInsertRows(d1f44b3c3a3f9fa).(QModelIndexcxx . . $ QModelIndex#QModelIndex(ced63f7c635d850d).(), itemscxx . . $ PlayerListModel#items..countcxx . . $ QList#count(455f465bc33b4cdf).(), itemscxx . . $ PlayerListModel#items..countcxx . . $ QList#count(455f465bc33b4cdf).());
220 itemscxx . . $ PlayerListModel#items..appendcxx . . $ QList#append(77d9f17553126ecb).(item);
221 endInsertRowscxx . . $ QAbstractItemModel#endInsertRows(49f6e7a06ebc5aa8).();
222 }
223
224 int PlayerListModelcxx . . $ PlayerListModel#::rowCountcxx . . $ PlayerListModel#rowCount(e3878d4d6cd9529c).(const QModelIndexcxx . . $ QModelIndex# &) const
225 {
226 return itemscxx . . $ PlayerListModel#items..countcxx . . $ QList#count(455f465bc33b4cdf).();
227 }
228
229 QModelIndexcxx . . $ QModelIndex# PlayerListModelcxx . . $ PlayerListModel#::indexcxx . . $ PlayerListModel#index(37dbccf64c4e392). ( int row, int column, const QModelIndexcxx . . $ QModelIndex# & ) const
230 {
231 return createIndexcxx . . $ QAbstractItemModel#createIndex(ec74543ca13990c5).(row,column,(void*)itemscxx . . $ PlayerListModel#items.[cxx . . $ QList#`operator[]`(e2681f9bb6b2f357).row]);
232 }
233
234 Qtcxx . . $ Qt/::ItemFlagscxx . . $ Qt/ItemFlags# PlayerListModelcxx . . $ PlayerListModel#::flagscxx . . $ PlayerListModel#flags(36b38c1b3d3f7b45).(const QModelIndexcxx . . $ QModelIndex# & index) const
235 {
236 if(!index.isValidcxx . . $ QModelIndex#isValid(3482b152b9333168).())
237 return Qtcxx . . $ QFlags#QFlags(93d577a3e9528307).::ItemIsEnabledcxx . . $ Qt/ItemIsEnabled.;
238 return Qtcxx . . $ Qt/::ItemIsEnabledcxx . . $ Qt/ItemIsEnabled. |cxx . . $ Qt/`operator|`(bcda3d535fff4cd0). Qtcxx . . $ Qt/::ItemIsSelectablecxx . . $ Qt/ItemIsSelectable.;
239 }
240
241 int ObserverListModelcxx . . $ ObserverListModel#::columnCountcxx . . $ ObserverListModel#columnCount(e3878d4d6cd9529c).(const QModelIndexcxx . . $ QModelIndex# &) const
242 {
243 return O_TOTALCOLUMNScxx . . $ O_TOTALCOLUMNS.;
244 }
245
246 QVariantcxx . . $ QVariant# ObserverListModelcxx . . $ ObserverListModel#::headerDatacxx . . $ ObserverListModel#headerData(b8cfec0985494997).(int section, Qtcxx . . $ Qt/::Orientationcxx . . $ Qt/Orientation# orientation, int role) const
247 {
248 if(orientation == Qtcxx . . $ Qt/::Horizontalcxx . . $ Qt/Horizontal. && role == Qtcxx . . $ Qt/::DisplayRolecxx . . $ Qt/DisplayRole.)
249 switch(section)
250 {
251 case OC_NAMEcxx . . $ OC_NAME.:
252 return QVariantcxx . . $ QVariant#QVariant(85c52e162fed56f9).("Name");
253 case OC_RANKcxx . . $ OC_RANK.:
254 return QVariantcxx . . $ QVariant#QVariant(85c52e162fed56f9).("Rank");
255 }
256 return QVariantcxx . . $ QVariant#QVariant(ced63f7c635d850d).();
257 }
258
259 QVariantcxx . . $ QVariant# ObserverListModelcxx . . $ ObserverListModel#::datacxx . . $ ObserverListModel#data(69b5b18a001c0029).(const QModelIndexcxx . . $ QModelIndex# & index, int role) const
260 {
261 if(!index.isValidcxx . . $ QModelIndex#isValid(3482b152b9333168).())
262 return QVariantcxx . . $ QVariant#QVariant(ced63f7c635d850d).();
263
264 PlayerListingcxx . . $ PlayerListing# * item = static_cast<PlayerListingcxx . . $ PlayerListing#*>(index.internalPointercxx . . $ QModelIndex#internalPointer(9c85a4740a0511c5).());
265 if(role == Qtcxx . . $ Qt/::DisplayRolecxx . . $ Qt/DisplayRole.)
266 {
267 switch(index.columncxx . . $ QModelIndex#column(ea6fe5115c70a13f).())
268 {
269 case OC_NAMEcxx . . $ OC_NAME.:
270 return itemcxx . . $ QVariant#QVariant(3520e46b33348bf6).->namecxx . . $ PlayerListing#name.;
271 case OC_RANKcxx . . $ OC_RANK.:
272 return itemcxx . . $ QVariant#QVariant(3520e46b33348bf6).->rankcxx . . $ PlayerListing#rank.;
273 default:
274 return QVariantcxx . . $ QVariant#QVariant(ced63f7c635d850d).();
275 break;
276 }
277 }
278 else if(role == Qtcxx . . $ Qt/::ForegroundRolecxx . . $ Qt/ForegroundRole.)
279 {
280 if(item->namecxx . . $ PlayerListing#name. ==cxx . . $ `operator==`(5bc2975d2d751687). account_namecxx . . $ PlayerListModel#account_name.)
281 return QColorcxx . . $ QColor#QColor(408ec4d5924bfb00).(Qtcxx . . $ Qt/::bluecxx . . $ Qt/blue.);
282 else
283 return QVariantcxx . . $ QVariant#QVariant(ced63f7c635d850d).();
284 }
285 else
286 return QVariantcxx . . $ QVariant#QVariant(ced63f7c635d850d).();
287 }
288
289 SimplePlayerListModelcxx . . $ SimplePlayerListModel#::SimplePlayerListModelcxx . . $ SimplePlayerListModel#SimplePlayerListModel(b45ddcbc8423892c).(bool _notify_column)
290 {
291 notify_columncxx . . $ SimplePlayerListModel#notify_column. = _notify_column;
292 }
293
294 int SimplePlayerListModelcxx . . $ SimplePlayerListModel#::columnCountcxx . . $ SimplePlayerListModel#columnCount(e3878d4d6cd9529c).(const QModelIndexcxx . . $ QModelIndex# &) const
295 {
296 if (notify_columncxx . . $ SimplePlayerListModel#notify_column.)
297 return 2;
298 else
299 return 1;
300 }
301
302 QVariantcxx . . $ QVariant# SimplePlayerListModelcxx . . $ SimplePlayerListModel#::headerDatacxx . . $ SimplePlayerListModel#headerData(b8cfec0985494997).(int section, Qtcxx . . $ Qt/::Orientationcxx . . $ Qt/Orientation# orientation, int role) const
303 {
304 if(orientation == Qtcxx . . $ Qt/::Horizontalcxx . . $ Qt/Horizontal. && role == Qtcxx . . $ Qt/::DisplayRolecxx . . $ Qt/DisplayRole.)
305 switch(section)
306 {
307 case 0:
308 return QVariantcxx . . $ QVariant#QVariant(85c52e162fed56f9).("Name");
309 case 1:
310 return QVariantcxx . . $ QVariant#QVariant(85c52e162fed56f9).("Notify");
311 }
312 return QVariantcxx . . $ QVariant#QVariant(ced63f7c635d850d).();
313 }
314
315 QVariantcxx . . $ QVariant# SimplePlayerListModelcxx . . $ SimplePlayerListModel#::datacxx . . $ SimplePlayerListModel#data(69b5b18a001c0029).(const QModelIndexcxx . . $ QModelIndex# & index, int role) const
316 {
317 if(!index.isValidcxx . . $ QModelIndex#isValid(3482b152b9333168).())
318 return QVariantcxx . . $ QVariant#QVariant(ced63f7c635d850d).();
319
320 PlayerListingcxx . . $ PlayerListing# * item = static_cast<PlayerListingcxx . . $ PlayerListing#*>(index.internalPointercxx . . $ QModelIndex#internalPointer(9c85a4740a0511c5).());
321 if(role == Qtcxx . . $ Qt/::DisplayRolecxx . . $ Qt/DisplayRole.)
322 {
323 switch(index.columncxx . . $ QModelIndex#column(ea6fe5115c70a13f).())
324 {
325 case SPC_NAMEcxx . . $ SPC_NAME.:
326 return itemcxx . . $ QVariant#QVariant(3520e46b33348bf6).->namecxx . . $ PlayerListing#name.;
327 case SPC_NOTIFYcxx . . $ SPC_NOTIFY.:
328 return itemcxx . . $ QVariant#QVariant(b45ddcbc8423892c).->notifycxx . . $ PlayerListing#notify.;
329 default:
330 return QVariantcxx . . $ QVariant#QVariant(ced63f7c635d850d).();
331 }
332 }
333 else
334 return QVariantcxx . . $ QVariant#QVariant(ced63f7c635d850d).();
335 }
336
337 GamesListModelcxx . . $ GamesListModel#::GamesListModelcxx . . $ GamesListModel#GamesListModel(49f6e7a06ebc5aa8).()
338 {
339 }
340
341 GamesListModelcxx . . $ GamesListModel#::~cxx . . $ GamesListModel#`~GamesListModel`(ced63f7c635d850d).GamesListModelcxx . . $ GamesListModel#()
342 {
343 clearListcxx . . $ GamesListModel#clearList(49f6e7a06ebc5aa8).();
344 }
345
346 int GamesListModelcxx . . $ GamesListModel#::columnCountcxx . . $ GamesListModel#columnCount(e3878d4d6cd9529c).(const QModelIndexcxx . . $ QModelIndex# &) const
347 {
348 return G_TOTALCOLUMNScxx . . $ G_TOTALCOLUMNS.;
349 }
350
351 QVariantcxx . . $ QVariant# GamesListModelcxx . . $ GamesListModel#::headerDatacxx . . $ GamesListModel#headerData(b8cfec0985494997).(int section, Qtcxx . . $ Qt/::Orientationcxx . . $ Qt/Orientation# orientation, int role) const
352 {
353 if(orientation == Qtcxx . . $ Qt/::Horizontalcxx . . $ Qt/Horizontal. && role == Qtcxx . . $ Qt/::DisplayRolecxx . . $ Qt/DisplayRole.)
354 switch(section)
355 {
356 case GC_IDcxx . . $ GC_ID.:
357 return QVariantcxx . . $ QVariant#QVariant(85c52e162fed56f9).("Id");
358 case GC_WHITENAMEcxx . . $ GC_WHITENAME.:
359 return QVariantcxx . . $ QVariant#QVariant(85c52e162fed56f9).("White");
360 case GC_WHITERANKcxx . . $ GC_WHITERANK.:
361 return QVariantcxx . . $ QVariant#QVariant(85c52e162fed56f9).("WR");
362 case GC_BLACKNAMEcxx . . $ GC_BLACKNAME.:
363 return QVariantcxx . . $ QVariant#QVariant(85c52e162fed56f9).("Black");
364 case GC_BLACKRANKcxx . . $ GC_BLACKRANK.:
365 return QVariantcxx . . $ QVariant#QVariant(85c52e162fed56f9).("BR");
366 case GC_MOVEScxx . . $ GC_MOVES.:
367 return QVariantcxx . . $ QVariant#QVariant(85c52e162fed56f9).("Mv");
368 case GC_SIZEcxx . . $ GC_SIZE.:
369 return QVariantcxx . . $ QVariant#QVariant(85c52e162fed56f9).("Sz");
370 case GC_HANDICAPcxx . . $ GC_HANDICAP.:
371 return QVariantcxx . . $ QVariant#QVariant(85c52e162fed56f9).("H");
372 case GC_KOMIcxx . . $ GC_KOMI.:
373 return QVariantcxx . . $ QVariant#QVariant(85c52e162fed56f9).("K");
374 case GC_BYOMIcxx . . $ GC_BYOMI.:
375 return QVariantcxx . . $ QVariant#QVariant(85c52e162fed56f9).("B");
376 case GC_FLAGScxx . . $ GC_FLAGS.:
377 return QVariantcxx . . $ QVariant#QVariant(85c52e162fed56f9).("Flags");
378 case GC_OBSERVERScxx . . $ GC_OBSERVERS.:
379 return QVariantcxx . . $ QVariant#QVariant(85c52e162fed56f9).("Obs");
380 }
381 return QVariantcxx . . $ QVariant#QVariant(ced63f7c635d850d).();
382 }
383
384 GameListingcxx . . $ GameListing# * GamesListModelcxx . . $ GamesListModel#::getEntrycxx . . $ GamesListModel#getEntry(d402167d8f57cf00).(unsigned int id)
385 {
386 for (int i=0; i < itemscxx . . $ GamesListModel#items..countcxx . . $ QList#count(455f465bc33b4cdf).(); i++)
387 {
388 if (itemscxx . . $ GamesListModel#items.[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).i]->numbercxx . . $ GameListing#number. == id)
389 return itemscxx . . $ GamesListModel#items.[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).i];
390 }
391 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
392 }
393
394 void GamesListModelcxx . . $ GamesListModel#::updateListingcxx . . $ GamesListModel#updateListing(9a447f3b9a8a5041).(GameListingcxx . . $ GameListing# * listing)
395 {
396 int i = itemscxx . . $ GamesListModel#items..indexOfcxx . . $ QList#indexOf(fc79640c865a6596).(listing); // Returns index if found or -1 if not found
397 if (i != -1)
398 emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! dataChangedcxx . . $ QAbstractItemModel#dataChanged(ae8a85c811f0c28a).(createIndexcxx . . $ QAbstractItemModel#createIndex(ec74543ca13990c5).(i, 0), createIndexcxx . . $ QAbstractItemModel#createIndex(ec74543ca13990c5).(i, columnCountcxx . . $ GamesListModel#columnCount(e3878d4d6cd9529c).() - 1));
399 }
400
401 void GamesListModelcxx . . $ GamesListModel#::clearListcxx . . $ GamesListModel#clearList(49f6e7a06ebc5aa8).(void)
402 {
403 beginRemoveRowscxx . . $ QAbstractItemModel#beginRemoveRows(d1f44b3c3a3f9fa).(QModelIndexcxx . . $ QModelIndex#QModelIndex(ced63f7c635d850d).(), 0, itemscxx . . $ GamesListModel#items..countcxx . . $ QList#count(455f465bc33b4cdf).() - 1);
404 itemscxx . . $ GamesListModel#items..clearcxx . . $ QList#clear(49f6e7a06ebc5aa8).();
405 endRemoveRowscxx . . $ QAbstractItemModel#endRemoveRows(49f6e7a06ebc5aa8).();
406 }
407
408 QVariantcxx . . $ QVariant# GamesListModelcxx . . $ GamesListModel#::datacxx . . $ GamesListModel#data(69b5b18a001c0029).(const QModelIndexcxx . . $ QModelIndex# & index, int role) const
409 {
410 if(!index.isValidcxx . . $ QModelIndex#isValid(3482b152b9333168).())
411 return QVariantcxx . . $ QVariant#QVariant(ced63f7c635d850d).();
412
413 GameListingcxx . . $ GameListing# * item = static_cast<GameListingcxx . . $ GameListing#*>(index.internalPointercxx . . $ QModelIndex#internalPointer(9c85a4740a0511c5).());
414 if ((role == Qtcxx . . $ Qt/::DisplayRolecxx . . $ Qt/DisplayRole.) || (role == LIST_SORT_ROLEcxx . . $ `src/listviews.h:43:9`!))
415 {
416 switch(index.columncxx . . $ QModelIndex#column(ea6fe5115c70a13f).())
417 {
418 case GC_IDcxx . . $ GC_ID.:
419 return QVariantcxx . . $ QVariant#QVariant(cb2f890c2fdad230).(item->numbercxx . . $ GameListing#number.);
420 case GC_WHITENAMEcxx . . $ GC_WHITENAME.:
421 return QVariantcxx . . $ QVariant#QVariant(3520e46b33348bf6).(item->white_namecxx . . $ GameListing#white_name(a2fb7a6ce195d51).());
422 case GC_WHITERANKcxx . . $ GC_WHITERANK.:
423 if (role == LIST_SORT_ROLEcxx . . $ `src/listviews.h:43:9`!)
424 return QVariantcxx . . $ QVariant#QVariant(cb2f890c2fdad230).(item->white_rank_scorecxx . . $ GameListing#white_rank_score(ddd8539a2fcdd4ce).());
425 else
426 return QVariantcxx . . $ QVariant#QVariant(3520e46b33348bf6).(item->white_rankcxx . . $ GameListing#white_rank(a2fb7a6ce195d51).());
427 case GC_BLACKNAMEcxx . . $ GC_BLACKNAME.:
428 return QVariantcxx . . $ QVariant#QVariant(3520e46b33348bf6).(item->black_namecxx . . $ GameListing#black_name(a2fb7a6ce195d51).());
429 case GC_BLACKRANKcxx . . $ GC_BLACKRANK.:
430 if (role == LIST_SORT_ROLEcxx . . $ `src/listviews.h:43:9`!)
431 return QVariantcxx . . $ QVariant#QVariant(cb2f890c2fdad230).(item->black_rank_scorecxx . . $ GameListing#black_rank_score(ddd8539a2fcdd4ce).());
432 else
433 return QVariantcxx . . $ QVariant#QVariant(3520e46b33348bf6).(item->black_rankcxx . . $ GameListing#black_rank(a2fb7a6ce195d51).());
434 case GC_MOVEScxx . . $ GC_MOVES.:
435 if(item->movescxx . . $ GameListing#moves. == (unsigned)-1)
436 return QVariantcxx . . $ QVariant#QVariant(85c52e162fed56f9).("-");
437 return QVariantcxx . . $ QVariant#QVariant(cb2f890c2fdad230).(item->movescxx . . $ GameListing#moves.);
438 case GC_SIZEcxx . . $ GC_SIZE.:
439 return QVariantcxx . . $ QVariant#QVariant(cb2f890c2fdad230).(item->board_sizecxx . . $ GameListing#board_size.);
440 case GC_HANDICAPcxx . . $ GC_HANDICAP.:
441 return QVariantcxx . . $ QVariant#QVariant(cb2f890c2fdad230).(item->handicapcxx . . $ GameListing#handicap.);
442 case GC_KOMIcxx . . $ GC_KOMI.:
443 return QVariantcxx . . $ QVariant#QVariant(9364e6e7bff7660).(item->komicxx . . $ GameListing#komi.);
444 case GC_BYOMIcxx . . $ GC_BYOMI.:
445 return QVariantcxx . . $ QVariant#QVariant(3520e46b33348bf6).(item->Bycxx . . $ GameListing#By.);
446 case GC_FLAGScxx . . $ GC_FLAGS.:
447 return QVariantcxx . . $ QVariant#QVariant(3520e46b33348bf6).(item->FRcxx . . $ GameListing#FR.);
448 case GC_OBSERVERScxx . . $ GC_OBSERVERS.:
449 return QVariantcxx . . $ QVariant#QVariant(cb2f890c2fdad230).(item->observerscxx . . $ GameListing#observers.);
450 case GC_RUNNINGcxx . . $ GC_RUNNING.:
451 return QVariantcxx . . $ QVariant#QVariant(b45ddcbc8423892c).(item->runningcxx . . $ GameListing#running.);
452 default:
453 return QVariantcxx . . $ QVariant#QVariant(ced63f7c635d850d).();
454 }
455 }
456 return QVariantcxx . . $ QVariant#QVariant(ced63f7c635d850d).();
457 }
458
459 GameListingcxx . . $ GameListing# * GamesListModelcxx . . $ GamesListModel#::gameListingFromIndexcxx . . $ GamesListModel#gameListingFromIndex(bc3c1a338b377edc).(const QModelIndexcxx . . $ QModelIndex# & index)
460 {
461 return static_cast<GameListingcxx . . $ GameListing#*>(index.internalPointercxx . . $ QModelIndex#internalPointer(9c85a4740a0511c5).());
462 }
463
464 void GamesListModelcxx . . $ GamesListModel#::insertListingcxx . . $ GamesListModel#insertListing(9a447f3b9a8a5041).(GameListingcxx . . $ GameListing# *item)
465 {
466 beginInsertRowscxx . . $ QAbstractItemModel#beginInsertRows(d1f44b3c3a3f9fa).(QModelIndexcxx . . $ QModelIndex#QModelIndex(ced63f7c635d850d).(), itemscxx . . $ GamesListModel#items..countcxx . . $ QList#count(455f465bc33b4cdf).(), itemscxx . . $ GamesListModel#items..countcxx . . $ QList#count(455f465bc33b4cdf).());
467 itemscxx . . $ GamesListModel#items..appendcxx . . $ QList#append(77d9f17553126ecb).(item);
468 endInsertRowscxx . . $ QAbstractItemModel#endInsertRows(49f6e7a06ebc5aa8).();
469 emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! countChangedcxx . . $ GamesListModel#countChanged(d4f767463ce0a6b3).(itemscxx . . $ GamesListModel#items..countcxx . . $ QList#count(455f465bc33b4cdf).());
470 }
471
472 int GamesListModelcxx . . $ GamesListModel#::rowCountcxx . . $ GamesListModel#rowCount(e3878d4d6cd9529c).(const QModelIndexcxx . . $ QModelIndex# &) const
473 {
474 return itemscxx . . $ GamesListModel#items..countcxx . . $ QList#count(455f465bc33b4cdf).();
475 }
476
477 QModelIndexcxx . . $ QModelIndex# GamesListModelcxx . . $ GamesListModel#::indexcxx . . $ GamesListModel#index(37dbccf64c4e392).(int row, int column, const QModelIndexcxx . . $ QModelIndex# &) const
478 {
479 return createIndexcxx . . $ QAbstractItemModel#createIndex(ec74543ca13990c5).(row,column,(void*)itemscxx . . $ GamesListModel#items.[cxx . . $ QList#`operator[]`(e2681f9bb6b2f357).row]);
480 }
481
482 PlayerListSortFilterProxyModelcxx . . $ PlayerListSortFilterProxyModel#::PlayerListSortFilterProxyModelcxx . . $ PlayerListSortFilterProxyModel#PlayerListSortFilterProxyModel(749de1b6ae65bddd).(QObjectcxx . . $ QObject# * parent) :
483 QSortFilterProxyModelcxx . . $ QSortFilterProxyModel#(parent), rankMincxx . . $ PlayerListSortFilterProxyModel#rankMin.(0), rankMaxcxx . . $ PlayerListSortFilterProxyModel#rankMax.(100000), opencxx . . $ PlayerListSortFilterProxyModel#open.(false), friendscxx . . $ PlayerListSortFilterProxyModel#friends.(false), fanscxx . . $ PlayerListSortFilterProxyModel#fans.(false), noblockcxx . . $ PlayerListSortFilterProxyModel#noblock.(false)
484 {
485 setSortCaseSensitivitycxx . . $ QSortFilterProxyModel#setSortCaseSensitivity(dbd87adfa24451df).(Qtcxx . . $ Qt/::CaseInsensitivecxx . . $ Qt/CaseInsensitive.);
486 setFilterCaseSensitivitycxx . . $ QSortFilterProxyModel#setFilterCaseSensitivity(dbd87adfa24451df).(Qtcxx . . $ Qt/::CaseInsensitivecxx . . $ Qt/CaseInsensitive.);
487 setFilterKeyColumncxx . . $ QSortFilterProxyModel#setFilterKeyColumn(d4f767463ce0a6b3).(PC_NAMEcxx . . $ PC_NAME.);
488 this->setSortRolecxx . . $ QSortFilterProxyModel#setSortRole(d4f767463ce0a6b3).(LIST_SORT_ROLEcxx . . $ `src/listviews.h:43:9`!);
489 }
490
491 bool PlayerListSortFilterProxyModelcxx . . $ PlayerListSortFilterProxyModel#::filterAcceptsRowcxx . . $ PlayerListSortFilterProxyModel#filterAcceptsRow(5556b7879475181c).(int sourceRow, const QModelIndexcxx . . $ QModelIndex# &sourceParent) const
492 {
493 if (! QSortFilterProxyModelcxx . . $ QSortFilterProxyModel#::filterAcceptsRowcxx . . $ QSortFilterProxyModel#filterAcceptsRow(5556b7879475181c).(sourceRow,sourceParent))
494 return false;
495
496 const PlayerListingcxx . . $ PlayerListing# * p;
497 p = static_cast<PlayerListingcxx . . $ PlayerListing#*>(static_cast<PlayerListModelcxx . . $ PlayerListModel#*>(sourceModelcxx . . $ QAbstractProxyModel#sourceModel(c9c1e11e7bd96493).())->itemscxx . . $ PlayerListModel#items.[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).sourceRow]);
498
499 if(!(p->onlinecxx . . $ PlayerListing#online.) || p->hiddencxx . . $ PlayerListing#hidden.)
500 return false;
501 if(!(noblockcxx . . $ PlayerListSortFilterProxyModel#noblock.))
502 {
503 if(p->friendWatchTypecxx . . $ PlayerListing#friendWatchType. == PlayerListingcxx . . $ PlayerListing#::blockedcxx . . $ PlayerListing#blocked.)
504 return false;
505 }
506 if(opencxx . . $ PlayerListSortFilterProxyModel#open.)
507 {
508 if(p->infocxx . . $ PlayerListing#info..containscxx . . $ QString#contains(8cce4688c16f48f3).("X"cxx . . $ QString#QString(85c52e162fed56f9).) || p->playingcxx . . $ PlayerListing#playing. != 0)
509 return false;
510 }
511 if(p->rank_scorecxx . . $ PlayerListing#rank_score. > (unsigned int)rankMaxcxx . . $ PlayerListSortFilterProxyModel#rankMax. || p->rank_scorecxx . . $ PlayerListing#rank_score. + 1 < (unsigned int)rankMincxx . . $ PlayerListSortFilterProxyModel#rankMin.)
512 return false;
513 if(friendscxx . . $ PlayerListSortFilterProxyModel#friends. || fanscxx . . $ PlayerListSortFilterProxyModel#fans.)
514 {
515 if(friendscxx . . $ PlayerListSortFilterProxyModel#friends. && p->friendWatchTypecxx . . $ PlayerListing#friendWatchType. == PlayerListingcxx . . $ PlayerListing#::friendedcxx . . $ PlayerListing#friended.)
516 return true;
517 if(fanscxx . . $ PlayerListSortFilterProxyModel#fans. && p->friendWatchTypecxx . . $ PlayerListing#friendWatchType. == PlayerListingcxx . . $ PlayerListing#::watchedcxx . . $ PlayerListing#watched.)
518 return true;
519 return false;
520 }
521
522 return true;
523 }
524
525 void PlayerListSortFilterProxyModelcxx . . $ PlayerListSortFilterProxyModel#::setFilterOpencxx . . $ PlayerListSortFilterProxyModel#setFilterOpen(b45ddcbc8423892c).(bool state)
526 {
527 if (opencxx . . $ PlayerListSortFilterProxyModel#open. != state)
528 {
529 opencxx . . $ PlayerListSortFilterProxyModel#open. = state;
530 invalidateFiltercxx . . $ QSortFilterProxyModel#invalidateFilter(49f6e7a06ebc5aa8).();
531 }
532 }
533
534 void PlayerListSortFilterProxyModelcxx . . $ PlayerListSortFilterProxyModel#::setFilterFriendscxx . . $ PlayerListSortFilterProxyModel#setFilterFriends(b45ddcbc8423892c).(bool state)
535 {
536 if (friendscxx . . $ PlayerListSortFilterProxyModel#friends. != state)
537 {
538 friendscxx . . $ PlayerListSortFilterProxyModel#friends. = state;
539 invalidateFiltercxx . . $ QSortFilterProxyModel#invalidateFilter(49f6e7a06ebc5aa8).();
540 }
541 }
542
543 void PlayerListSortFilterProxyModelcxx . . $ PlayerListSortFilterProxyModel#::setFilterFanscxx . . $ PlayerListSortFilterProxyModel#setFilterFans(b45ddcbc8423892c).(bool state)
544 {
545 if (fanscxx . . $ PlayerListSortFilterProxyModel#fans. != state)
546 {
547 fanscxx . . $ PlayerListSortFilterProxyModel#fans. = state;
548 invalidateFiltercxx . . $ QSortFilterProxyModel#invalidateFilter(49f6e7a06ebc5aa8).();
549 }
550 }
551
552 void PlayerListSortFilterProxyModelcxx . . $ PlayerListSortFilterProxyModel#::setFilterMinRankcxx . . $ PlayerListSortFilterProxyModel#setFilterMinRank(d4f767463ce0a6b3).(int rank)
553 {
554 rankMincxx . . $ PlayerListSortFilterProxyModel#rankMin. = rank;
555 invalidateFiltercxx . . $ QSortFilterProxyModel#invalidateFilter(49f6e7a06ebc5aa8).();
556 }
557
558 void PlayerListSortFilterProxyModelcxx . . $ PlayerListSortFilterProxyModel#::setFilterMaxRankcxx . . $ PlayerListSortFilterProxyModel#setFilterMaxRank(d4f767463ce0a6b3).(int rank)
559 {
560 rankMaxcxx . . $ PlayerListSortFilterProxyModel#rankMax. = rank;
561 invalidateFiltercxx . . $ QSortFilterProxyModel#invalidateFilter(49f6e7a06ebc5aa8).();
562 }
563
564 GamesListSortFilterProxyModelcxx . . $ GamesListSortFilterProxyModel#::GamesListSortFilterProxyModelcxx . . $ GamesListSortFilterProxyModel#GamesListSortFilterProxyModel(749de1b6ae65bddd).(QObjectcxx . . $ QObject# * parent) :
565 QSortFilterProxyModelcxx . . $ QSortFilterProxyModel#(parent), watchescxx . . $ GamesListSortFilterProxyModel#watches.(false)
566 {
567 setSortCaseSensitivitycxx . . $ QSortFilterProxyModel#setSortCaseSensitivity(dbd87adfa24451df).(Qtcxx . . $ Qt/::CaseInsensitivecxx . . $ Qt/CaseInsensitive.);
568 setSortRolecxx . . $ QSortFilterProxyModel#setSortRole(d4f767463ce0a6b3).(LIST_SORT_ROLEcxx . . $ `src/listviews.h:43:9`!);
569 }
570
571 void GamesListSortFilterProxyModelcxx . . $ GamesListSortFilterProxyModel#::setFilterWatchcxx . . $ GamesListSortFilterProxyModel#setFilterWatch(b45ddcbc8423892c).(bool state)
572 {
573 if (watchescxx . . $ GamesListSortFilterProxyModel#watches. != state)
574 {
575 watchescxx . . $ GamesListSortFilterProxyModel#watches. = state;
576 invalidateFiltercxx . . $ QSortFilterProxyModel#invalidateFilter(49f6e7a06ebc5aa8).();
577 }
578 }
579
580 bool GamesListSortFilterProxyModelcxx . . $ GamesListSortFilterProxyModel#::filterAcceptsRowcxx . . $ GamesListSortFilterProxyModel#filterAcceptsRow(5556b7879475181c).(int sourceRow, const QModelIndexcxx . . $ QModelIndex# &) const
581 {
582 const GameListingcxx . . $ GameListing# * g = static_cast<GamesListModelcxx . . $ GamesListModel#*>(sourceModelcxx . . $ QAbstractProxyModel#sourceModel(c9c1e11e7bd96493).())->itemscxx . . $ GamesListModel#items.[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).sourceRow];
583 if(!(g->runningcxx . . $ GameListing#running.) || (g->isRoomOnlycxx . . $ GameListing#isRoomOnly.)) // It is very weird that rooms are saved as games, FIXME
584 return false;
585 if(watchescxx . . $ GamesListSortFilterProxyModel#watches.)
586 {
587 return ((g->blackcxx . . $ GameListing#black. && g->blackcxx . . $ GameListing#black.->friendWatchTypecxx . . $ PlayerListing#friendWatchType. == PlayerListingcxx . . $ PlayerListing#::watchedcxx . . $ PlayerListing#watched.) ||
588 (g->whitecxx . . $ GameListing#white. && g->whitecxx . . $ GameListing#white.->friendWatchTypecxx . . $ PlayerListing#friendWatchType. == PlayerListingcxx . . $ PlayerListing#::watchedcxx . . $ PlayerListing#watched.));
589 }
590 return true;
591 }