| 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 "friendslistdialog.h"cxx . . $ `<file>/src/network/friendslistdialog.h`/ |
| 24 | #include "network/networkconnection.h"cxx . . $ `<file>/src/network/networkconnection.h`/ |
| 25 | #include "network/playergamelistings.h"cxx . . $ `<file>/src/network/playergamelistings.h`/ |
| 26 | #include "listviews.h"cxx . . $ `<file>/src/listviews.h`/ |
| 27 | #include "talk.h"cxx . . $ `<file>/src/network/talk.h`/ |
| 28 | #include "room.h"cxx . . $ `<file>/src/network/room.h`/ |
| 29 | |
| 30 | FriendsListDialogcxx . . $ FriendsListDialog#::FriendsListDialogcxx . . $ FriendsListDialog#FriendsListDialog(36f380a077ff58cb).(NetworkConnectioncxx . . $ NetworkConnection# * c, Roomcxx . . $ Room# * r) : QDialogcxx . . $ QDialog#QDialog(872e7b0c281abd8d).(), Uicxx . . $ Ui/::FriendsListDialogcxx . . $ Ui/FriendsListDialog#() |
| 31 | { |
| 32 | connectioncxx . . $ FriendsListDialog#connection. = c; |
| 33 | roomcxx . . $ FriendsListDialog#room. = r; |
| 34 | uicxx . . $ FriendsListDialog#ui..setupUicxx . . $ Ui_FriendsListDialog#setupUi(d194de0c0f68c28b).(this); |
| 35 | |
| 36 | friendsViewcxx . . $ Ui_FriendsListDialog#friendsView. = uicxx . . $ FriendsListDialog#ui..friendsViewcxx . . $ Ui_FriendsListDialog#friendsView.; |
| 37 | watchesViewcxx . . $ Ui_FriendsListDialog#watchesView. = uicxx . . $ FriendsListDialog#ui..watchesViewcxx . . $ Ui_FriendsListDialog#watchesView.; |
| 38 | blockedViewcxx . . $ Ui_FriendsListDialog#blockedView. = uicxx . . $ FriendsListDialog#ui..blockedViewcxx . . $ Ui_FriendsListDialog#blockedView.; |
| 39 | |
| 40 | //friendsSortProxy = new PlayerSortProxy(); |
| 41 | friendsListModelcxx . . $ FriendsListDialog#friendsListModel. = new SimplePlayerListModelcxx . . $ SimplePlayerListModel#SimplePlayerListModel(b45ddcbc8423892c).(true); |
| 42 | //friendsSortProxy->setSourceModel(friendsListModel); |
| 43 | //friendsView->setModel(friendsSortProxy); |
| 44 | friendsViewcxx . . $ Ui_FriendsListDialog#friendsView.->setModelcxx . . $ QTableView#setModel(c6e1f1e42522b780).(friendsListModelcxx . . $ FriendsListDialog#friendsListModel.); |
| 45 | //friendsSortProxy->setDynamicSortFilter(true); |
| 46 | //probably don't need to be able to change sort order or sort on notify FIXME |
| 47 | watchesListModelcxx . . $ FriendsListDialog#watchesListModel. = new SimplePlayerListModelcxx . . $ SimplePlayerListModel#SimplePlayerListModel(b45ddcbc8423892c).(true); |
| 48 | watchesViewcxx . . $ Ui_FriendsListDialog#watchesView.->setModelcxx . . $ QTableView#setModel(c6e1f1e42522b780).(watchesListModelcxx . . $ FriendsListDialog#watchesListModel.); |
| 49 | blockedListModelcxx . . $ FriendsListDialog#blockedListModel. = new SimplePlayerListModelcxx . . $ SimplePlayerListModel#SimplePlayerListModel(b45ddcbc8423892c).(true); |
| 50 | blockedViewcxx . . $ Ui_FriendsListDialog#blockedView.->setModelcxx . . $ QTableView#setModel(c6e1f1e42522b780).(blockedListModelcxx . . $ FriendsListDialog#blockedListModel.); |
| 51 | |
| 52 | connectcxx . . $ QObject#connect(835f87066c895669).(friendsViewcxx . . $ Ui_FriendsListDialog#friendsView., &QTableViewcxx . . $ QTableView#::customContextMenuRequestedcxx . . $ QWidget#customContextMenuRequested(4f9e9534be445c03)., this, &FriendsListDialogcxx . . $ FriendsListDialog#::slot_showPopupFriendscxx . . $ FriendsListDialog#slot_showPopupFriends(4f9e9534be445c03).); |
| 53 | connectcxx . . $ QObject#connect(835f87066c895669).(watchesViewcxx . . $ Ui_FriendsListDialog#watchesView., &QTableViewcxx . . $ QTableView#::customContextMenuRequestedcxx . . $ QWidget#customContextMenuRequested(4f9e9534be445c03)., this, &FriendsListDialogcxx . . $ FriendsListDialog#::slot_showPopupWatchescxx . . $ FriendsListDialog#slot_showPopupWatches(4f9e9534be445c03).); |
| 54 | connectcxx . . $ QObject#connect(835f87066c895669).(blockedViewcxx . . $ Ui_FriendsListDialog#blockedView., &QTableViewcxx . . $ QTableView#::customContextMenuRequestedcxx . . $ QWidget#customContextMenuRequested(4f9e9534be445c03)., this, &FriendsListDialogcxx . . $ FriendsListDialog#::slot_showPopupBlockedcxx . . $ FriendsListDialog#slot_showPopupBlocked(4f9e9534be445c03).); |
| 55 | |
| 56 | connectcxx . . $ QObject#connect(835f87066c895669).(friendsViewcxx . . $ Ui_FriendsListDialog#friendsView., &QTableViewcxx . . $ QTableView#::doubleClickedcxx . . $ QAbstractItemView#doubleClicked(87a6de385263c395)., this, &FriendsListDialogcxx . . $ FriendsListDialog#::slot_playersDoubleClickedFriendscxx . . $ FriendsListDialog#slot_playersDoubleClickedFriends(87a6de385263c395).); |
| 57 | connectcxx . . $ QObject#connect(835f87066c895669).(watchesViewcxx . . $ Ui_FriendsListDialog#watchesView., &QTableViewcxx . . $ QTableView#::doubleClickedcxx . . $ QAbstractItemView#doubleClicked(87a6de385263c395)., this, &FriendsListDialogcxx . . $ FriendsListDialog#::slot_playersDoubleClickedWatchescxx . . $ FriendsListDialog#slot_playersDoubleClickedWatches(87a6de385263c395).); |
| 58 | |
| 59 | |
| 60 | /* We need basically the same popup options as from room.cpp */ |
| 61 | populateListscxx . . $ FriendsListDialog#populateLists(49f6e7a06ebc5aa8).(); |
| 62 | |
| 63 | } |
| 64 | |
| 65 | FriendsListDialogcxx . . $ FriendsListDialog#::~cxx . . $ FriendsListDialog#`~FriendsListDialog`(ced63f7c635d850d).FriendsListDialogcxx . . $ FriendsListDialog#() |
| 66 | { |
| 67 | delete friendsListModelcxx . . $ FriendsListDialog#friendsListModel.; |
| 68 | delete watchesListModelcxx . . $ FriendsListDialog#watchesListModel.; |
| 69 | delete blockedListModelcxx . . $ FriendsListDialog#blockedListModel.; |
| 70 | } |
| 71 | |
| 72 | void FriendsListDialogcxx . . $ FriendsListDialog#::populateListscxx . . $ FriendsListDialog#populateLists(49f6e7a06ebc5aa8).(void) |
| 73 | { |
| 74 | /* Either we get the local lists from the network connection |
| 75 | * or we get server side lists... the issue is that |
| 76 | * different servers may have different stored info on |
| 77 | * the listings, which means we can't necessarily assume |
| 78 | * they come in the same form as the local lists or are |
| 79 | * loaded as such. We might need to override that or have |
| 80 | * some kind of special list iterator or maybe have the |
| 81 | * other protocols subclass the FriendWatchListing and do |
| 82 | * some dynamic_cast ing here. |
| 83 | * In any event, I think we need to checkup on ORO and tygem |
| 84 | * friend lists before we go any further here */ |
| 85 | /* So far it looks like if there's a notification option, |
| 86 | * its global, which means ours would either be stuck on |
| 87 | * or we'd have to store them privately. |
| 88 | * Tygem doesn't seem to have watches, but it does have |
| 89 | * friends and blocks, IGS nothing. |
| 90 | * |
| 91 | * I think though I've decided that the time checks and |
| 92 | * the friends lists are a lower priority than getting |
| 93 | * games playing on all three services */ |
| 94 | |
| 95 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<FriendWatchListingcxx . . $ FriendWatchListing# *> & friends = connectioncxx . . $ FriendsListDialog#connection.->getFriendsListcxx . . $ NetworkConnection#getFriendsList(53e89e0c516ea0b4).(); |
| 96 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<FriendWatchListingcxx . . $ FriendWatchListing# *> & watches = connectioncxx . . $ FriendsListDialog#connection.->getWatchesListcxx . . $ NetworkConnection#getWatchesList(53e89e0c516ea0b4).(); |
| 97 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<FriendWatchListingcxx . . $ FriendWatchListing# *> & blocked = connectioncxx . . $ FriendsListDialog#connection.->getBlockedListcxx . . $ NetworkConnection#getBlockedList(53e89e0c516ea0b4).(); |
| 98 | |
| 99 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<FriendWatchListing *>::iteratorcxx . . $ std/vector#iterator# icxx . . $ __gnu_cxx/__normal_iterator#__normal_iterator(ced63f7c635d850d).; |
| 100 | PlayerListingcxx . . $ PlayerListing# * p; |
| 101 | for(i =cxx . . $ __gnu_cxx/__normal_iterator#`operator=`(23bb58531c03b779). friends.begincxx . . $ std/vector#begin(55a6de06420d4903).(); i !=cxx . . $ __gnu_cxx/`operator!=`(30ee64f2df4eef8b). friends.endcxx . . $ std/vector#end(55a6de06420d4903).(); i++cxx . . $ __gnu_cxx/__normal_iterator#operator++(6cefca3db4774be2).) |
| 102 | { |
| 103 | p = connectioncxx . . $ FriendsListDialog#connection.->getPlayerListingFromFriendWatchListingcxx . . $ NetworkConnection#getPlayerListingFromFriendWatchListing(6605e28ac02b1c72).(**cxx . . $ __gnu_cxx/__normal_iterator#`operator*`(f9c37c6e427d43d6).i); |
| 104 | if(p) |
| 105 | friendsListModelcxx . . $ FriendsListDialog#friendsListModel.->insertListingcxx . . $ PlayerListModel#insertListing(122195e397f39e1b).(p); |
| 106 | } |
| 107 | for(i =cxx . . $ __gnu_cxx/__normal_iterator#`operator=`(23bb58531c03b779). watches.begincxx . . $ std/vector#begin(55a6de06420d4903).(); i !=cxx . . $ __gnu_cxx/`operator!=`(30ee64f2df4eef8b). watches.endcxx . . $ std/vector#end(55a6de06420d4903).(); i++cxx . . $ __gnu_cxx/__normal_iterator#operator++(6cefca3db4774be2).) |
| 108 | { |
| 109 | p = connectioncxx . . $ FriendsListDialog#connection.->getPlayerListingFromFriendWatchListingcxx . . $ NetworkConnection#getPlayerListingFromFriendWatchListing(6605e28ac02b1c72).(**cxx . . $ __gnu_cxx/__normal_iterator#`operator*`(f9c37c6e427d43d6).i); |
| 110 | if(p) |
| 111 | watchesListModelcxx . . $ FriendsListDialog#watchesListModel.->insertListingcxx . . $ PlayerListModel#insertListing(122195e397f39e1b).(p); |
| 112 | } |
| 113 | for(i =cxx . . $ __gnu_cxx/__normal_iterator#`operator=`(23bb58531c03b779). blocked.begincxx . . $ std/vector#begin(55a6de06420d4903).(); i !=cxx . . $ __gnu_cxx/`operator!=`(30ee64f2df4eef8b). blocked.endcxx . . $ std/vector#end(55a6de06420d4903).(); i++cxx . . $ __gnu_cxx/__normal_iterator#operator++(6cefca3db4774be2).) |
| 114 | { |
| 115 | p = connectioncxx . . $ FriendsListDialog#connection.->getPlayerListingFromFriendWatchListingcxx . . $ NetworkConnection#getPlayerListingFromFriendWatchListing(6605e28ac02b1c72).(**cxx . . $ __gnu_cxx/__normal_iterator#`operator*`(f9c37c6e427d43d6).i); |
| 116 | if(p) |
| 117 | blockedListModelcxx . . $ FriendsListDialog#blockedListModel.->insertListingcxx . . $ PlayerListModel#insertListing(122195e397f39e1b).(p); |
| 118 | } |
| 119 | } |
| 120 | |
| 121 | /* FIXME this is getting the wrong entry, like if I click on 0th, it takes |
| 122 | * the 1st off */ |
| 123 | void FriendsListDialogcxx . . $ FriendsListDialog#::slot_showPopupFriendscxx . . $ FriendsListDialog#slot_showPopupFriends(4f9e9534be445c03).(const QPointcxx . . $ QPoint# & iPoint) |
| 124 | { |
| 125 | popup_itemcxx . . $ FriendsListDialog#popup_item. =cxx . . $ QModelIndex#`operator=`(4665afb3441ab1ca). friendsViewcxx . . $ Ui_FriendsListDialog#friendsView.->indexAtcxx . . $ QTableView#indexAt(90c2c28d33eadf46).(iPoint); |
| 126 | if (popup_itemcxx . . $ FriendsListDialog#popup_item. !=cxx . . $ QModelIndex#`operator!=`(c401e435e302c57b). QModelIndexcxx . . $ QModelIndex#QModelIndex(ced63f7c635d850d).()) |
| 127 | { |
| 128 | popup_playerlistingcxx . . $ FriendsListDialog#popup_playerlisting. = friendsListModelcxx . . $ FriendsListDialog#friendsListModel.->playerListingFromIndexcxx . . $ PlayerListModel#playerListingFromIndex(b5acbb67a572cd68).(popup_itemcxx . . $ FriendsListDialog#popup_item.); |
| 129 | if(popup_playerlistingcxx . . $ FriendsListDialog#popup_playerlisting.->namecxx . . $ PlayerListing#name. ==cxx . . $ `operator==`(5bc2975d2d751687). connectioncxx . . $ FriendsListDialog#connection.->getUsernamecxx . . $ NetworkConnection#getUsername(a2fb7a6ce195d51).()) |
| 130 | return; |
| 131 | |
| 132 | QMenucxx . . $ QMenu# menucxx . . $ QMenu#QMenu(108f35f7aa7f3cf9).(friendsViewcxx . . $ Ui_FriendsListDialog#friendsView.); |
| 133 | menu.addActioncxx . . $ QMenu#addAction(dd5bc9e0e93f95e5).(trcxx . . $ FriendsListDialog#tr(75d9f1c324b4579d).("Match"), this, &FriendsListDialogcxx . . $ FriendsListDialog#::slot_popupMatchcxx . . $ FriendsListDialog#slot_popupMatch(49f6e7a06ebc5aa8).); |
| 134 | menu.addActioncxx . . $ QMenu#addAction(dd5bc9e0e93f95e5).(trcxx . . $ FriendsListDialog#tr(75d9f1c324b4579d).("Talk"), this, &FriendsListDialogcxx . . $ FriendsListDialog#::slot_popupTalkcxx . . $ FriendsListDialog#slot_popupTalk(49f6e7a06ebc5aa8).); |
| 135 | menu.addSeparatorcxx . . $ QMenu#addSeparator(a590eff9f1ec9a95).(); |
| 136 | menu.addActioncxx . . $ QMenu#addAction(dd5bc9e0e93f95e5).(trcxx . . $ FriendsListDialog#tr(75d9f1c324b4579d).("Remove from Friends"), this, &FriendsListDialogcxx . . $ FriendsListDialog#::slot_removeFriendcxx . . $ FriendsListDialog#slot_removeFriend(49f6e7a06ebc5aa8).); |
| 137 | menu.addActioncxx . . $ QMenu#addAction(dd5bc9e0e93f95e5).(trcxx . . $ FriendsListDialog#tr(75d9f1c324b4579d).("Add to Watches"), this, &FriendsListDialogcxx . . $ FriendsListDialog#::slot_addWatchcxx . . $ FriendsListDialog#slot_addWatch(49f6e7a06ebc5aa8).); |
| 138 | menu.addActioncxx . . $ QMenu#addAction(dd5bc9e0e93f95e5).(trcxx . . $ FriendsListDialog#tr(75d9f1c324b4579d).("Block"), this, &FriendsListDialogcxx . . $ FriendsListDialog#::slot_addBlockcxx . . $ FriendsListDialog#slot_addBlock(49f6e7a06ebc5aa8).); |
| 139 | menu.execcxx . . $ QMenu#exec(2535b15b88c544d4).(friendsViewcxx . . $ Ui_FriendsListDialog#friendsView.->mapToGlobalcxx . . $ QWidget#mapToGlobal(1aa4d425351b0c99).(iPoint)); |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | void FriendsListDialogcxx . . $ FriendsListDialog#::slot_showPopupWatchescxx . . $ FriendsListDialog#slot_showPopupWatches(4f9e9534be445c03).(const QPointcxx . . $ QPoint# & iPoint) |
| 144 | { |
| 145 | popup_itemcxx . . $ FriendsListDialog#popup_item. =cxx . . $ QModelIndex#`operator=`(4665afb3441ab1ca). watchesViewcxx . . $ Ui_FriendsListDialog#watchesView.->indexAtcxx . . $ QTableView#indexAt(90c2c28d33eadf46).(iPoint); |
| 146 | if (popup_itemcxx . . $ FriendsListDialog#popup_item. !=cxx . . $ QModelIndex#`operator!=`(c401e435e302c57b). QModelIndexcxx . . $ QModelIndex#QModelIndex(ced63f7c635d850d).()) |
| 147 | { |
| 148 | popup_playerlistingcxx . . $ FriendsListDialog#popup_playerlisting. = watchesListModelcxx . . $ FriendsListDialog#watchesListModel.->playerListingFromIndexcxx . . $ PlayerListModel#playerListingFromIndex(b5acbb67a572cd68).(popup_itemcxx . . $ FriendsListDialog#popup_item.); |
| 149 | if(popup_playerlistingcxx . . $ FriendsListDialog#popup_playerlisting.->namecxx . . $ PlayerListing#name. ==cxx . . $ `operator==`(5bc2975d2d751687). connectioncxx . . $ FriendsListDialog#connection.->getUsernamecxx . . $ NetworkConnection#getUsername(a2fb7a6ce195d51).()) |
| 150 | return; |
| 151 | |
| 152 | QMenucxx . . $ QMenu# menucxx . . $ QMenu#QMenu(108f35f7aa7f3cf9).(watchesViewcxx . . $ Ui_FriendsListDialog#watchesView.); |
| 153 | menu.addActioncxx . . $ QMenu#addAction(dd5bc9e0e93f95e5).(trcxx . . $ FriendsListDialog#tr(75d9f1c324b4579d).("Match"), this, &FriendsListDialogcxx . . $ FriendsListDialog#::slot_popupMatchcxx . . $ FriendsListDialog#slot_popupMatch(49f6e7a06ebc5aa8).); |
| 154 | menu.addActioncxx . . $ QMenu#addAction(dd5bc9e0e93f95e5).(trcxx . . $ FriendsListDialog#tr(75d9f1c324b4579d).("Talk"), this, &FriendsListDialogcxx . . $ FriendsListDialog#::slot_popupTalkcxx . . $ FriendsListDialog#slot_popupTalk(49f6e7a06ebc5aa8).); |
| 155 | menu.addSeparatorcxx . . $ QMenu#addSeparator(a590eff9f1ec9a95).(); |
| 156 | menu.addActioncxx . . $ QMenu#addAction(dd5bc9e0e93f95e5).(trcxx . . $ FriendsListDialog#tr(75d9f1c324b4579d).("Add to Friends"), this, &FriendsListDialogcxx . . $ FriendsListDialog#::slot_addFriendcxx . . $ FriendsListDialog#slot_addFriend(49f6e7a06ebc5aa8).); |
| 157 | //Maybe we don't want to have match and talk as fan options? |
| 158 | menu.addActioncxx . . $ QMenu#addAction(dd5bc9e0e93f95e5).(trcxx . . $ FriendsListDialog#tr(75d9f1c324b4579d).("Remove from Watches"), this, &FriendsListDialogcxx . . $ FriendsListDialog#::slot_removeWatchcxx . . $ FriendsListDialog#slot_removeWatch(49f6e7a06ebc5aa8).); |
| 159 | menu.addActioncxx . . $ QMenu#addAction(dd5bc9e0e93f95e5).(trcxx . . $ FriendsListDialog#tr(75d9f1c324b4579d).("Block"), this, &FriendsListDialogcxx . . $ FriendsListDialog#::slot_addBlockcxx . . $ FriendsListDialog#slot_addBlock(49f6e7a06ebc5aa8).); |
| 160 | menu.execcxx . . $ QMenu#exec(2535b15b88c544d4).(watchesViewcxx . . $ Ui_FriendsListDialog#watchesView.->mapToGlobalcxx . . $ QWidget#mapToGlobal(1aa4d425351b0c99).(iPoint)); |
| 161 | } |
| 162 | } |
| 163 | |
| 164 | void FriendsListDialogcxx . . $ FriendsListDialog#::slot_showPopupBlockedcxx . . $ FriendsListDialog#slot_showPopupBlocked(4f9e9534be445c03).(const QPointcxx . . $ QPoint# & iPoint) |
| 165 | { |
| 166 | popup_itemcxx . . $ FriendsListDialog#popup_item. =cxx . . $ QModelIndex#`operator=`(4665afb3441ab1ca). blockedViewcxx . . $ Ui_FriendsListDialog#blockedView.->indexAtcxx . . $ QTableView#indexAt(90c2c28d33eadf46).(iPoint); |
| 167 | if (popup_itemcxx . . $ FriendsListDialog#popup_item. !=cxx . . $ QModelIndex#`operator!=`(c401e435e302c57b). QModelIndexcxx . . $ QModelIndex#QModelIndex(ced63f7c635d850d).()) |
| 168 | { |
| 169 | popup_playerlistingcxx . . $ FriendsListDialog#popup_playerlisting. = blockedListModelcxx . . $ FriendsListDialog#blockedListModel.->playerListingFromIndexcxx . . $ PlayerListModel#playerListingFromIndex(b5acbb67a572cd68).(popup_itemcxx . . $ FriendsListDialog#popup_item.); |
| 170 | if(popup_playerlistingcxx . . $ FriendsListDialog#popup_playerlisting.->namecxx . . $ PlayerListing#name. ==cxx . . $ `operator==`(5bc2975d2d751687). connectioncxx . . $ FriendsListDialog#connection.->getUsernamecxx . . $ NetworkConnection#getUsername(a2fb7a6ce195d51).()) |
| 171 | return; |
| 172 | |
| 173 | QMenucxx . . $ QMenu# menucxx . . $ QMenu#QMenu(108f35f7aa7f3cf9).(blockedViewcxx . . $ Ui_FriendsListDialog#blockedView.); |
| 174 | menu.addActioncxx . . $ QMenu#addAction(dd5bc9e0e93f95e5).(trcxx . . $ FriendsListDialog#tr(75d9f1c324b4579d).("Remove from Blocked"), this, &FriendsListDialogcxx . . $ FriendsListDialog#::slot_removeBlockcxx . . $ FriendsListDialog#slot_removeBlock(49f6e7a06ebc5aa8).); |
| 175 | menu.execcxx . . $ QMenu#exec(2535b15b88c544d4).(blockedViewcxx . . $ Ui_FriendsListDialog#blockedView.->mapToGlobalcxx . . $ QWidget#mapToGlobal(1aa4d425351b0c99).(iPoint)); |
| 176 | } |
| 177 | } |
| 178 | |
| 179 | void FriendsListDialogcxx . . $ FriendsListDialog#::slot_addFriendcxx . . $ FriendsListDialog#slot_addFriend(49f6e7a06ebc5aa8).(void) |
| 180 | { |
| 181 | if(popup_playerlistingcxx . . $ FriendsListDialog#popup_playerlisting.->friendWatchTypecxx . . $ PlayerListing#friendWatchType. == PlayerListingcxx . . $ PlayerListing#::watchedcxx . . $ PlayerListing#watched.) |
| 182 | watchesListModelcxx . . $ FriendsListDialog#watchesListModel.->removeListingcxx . . $ PlayerListModel#removeListing(122195e397f39e1b).(popup_playerlistingcxx . . $ FriendsListDialog#popup_playerlisting.); |
| 183 | else if(popup_playerlistingcxx . . $ FriendsListDialog#popup_playerlisting.->friendWatchTypecxx . . $ PlayerListing#friendWatchType. == PlayerListingcxx . . $ PlayerListing#::blockedcxx . . $ PlayerListing#blocked.) |
| 184 | blockedListModelcxx . . $ FriendsListDialog#blockedListModel.->removeListingcxx . . $ PlayerListModel#removeListing(122195e397f39e1b).(popup_playerlistingcxx . . $ FriendsListDialog#popup_playerlisting.); |
| 185 | friendsListModelcxx . . $ FriendsListDialog#friendsListModel.->insertListingcxx . . $ PlayerListModel#insertListing(122195e397f39e1b).(popup_playerlistingcxx . . $ FriendsListDialog#popup_playerlisting.); |
| 186 | connectioncxx . . $ FriendsListDialog#connection.->addFriendcxx . . $ NetworkConnection#addFriend(122195e397f39e1b).(popup_playerlistingcxx . . $ FriendsListDialog#popup_playerlisting.); |
| 187 | } |
| 188 | |
| 189 | /* This needs to call a resort or something on the list |
| 190 | * if we have "friends" checked, same thing with blocked |
| 191 | * if we don't, just to update that one entry FIXME */ |
| 192 | void FriendsListDialogcxx . . $ FriendsListDialog#::slot_removeFriendcxx . . $ FriendsListDialog#slot_removeFriend(49f6e7a06ebc5aa8).(void) |
| 193 | { |
| 194 | friendsListModelcxx . . $ FriendsListDialog#friendsListModel.->removeListingcxx . . $ PlayerListModel#removeListing(122195e397f39e1b).(popup_playerlistingcxx . . $ FriendsListDialog#popup_playerlisting.); |
| 195 | connectioncxx . . $ FriendsListDialog#connection.->removeFriendcxx . . $ NetworkConnection#removeFriend(122195e397f39e1b).(popup_playerlistingcxx . . $ FriendsListDialog#popup_playerlisting.); |
| 196 | } |
| 197 | |
| 198 | void FriendsListDialogcxx . . $ FriendsListDialog#::slot_addWatchcxx . . $ FriendsListDialog#slot_addWatch(49f6e7a06ebc5aa8).(void) |
| 199 | { |
| 200 | if(popup_playerlistingcxx . . $ FriendsListDialog#popup_playerlisting.->friendWatchTypecxx . . $ PlayerListing#friendWatchType. == PlayerListingcxx . . $ PlayerListing#::friendedcxx . . $ PlayerListing#friended.) |
| 201 | friendsListModelcxx . . $ FriendsListDialog#friendsListModel.->removeListingcxx . . $ PlayerListModel#removeListing(122195e397f39e1b).(popup_playerlistingcxx . . $ FriendsListDialog#popup_playerlisting.); |
| 202 | else if(popup_playerlistingcxx . . $ FriendsListDialog#popup_playerlisting.->friendWatchTypecxx . . $ PlayerListing#friendWatchType. == PlayerListingcxx . . $ PlayerListing#::blockedcxx . . $ PlayerListing#blocked.) |
| 203 | blockedListModelcxx . . $ FriendsListDialog#blockedListModel.->removeListingcxx . . $ PlayerListModel#removeListing(122195e397f39e1b).(popup_playerlistingcxx . . $ FriendsListDialog#popup_playerlisting.); |
| 204 | watchesListModelcxx . . $ FriendsListDialog#watchesListModel.->insertListingcxx . . $ PlayerListModel#insertListing(122195e397f39e1b).(popup_playerlistingcxx . . $ FriendsListDialog#popup_playerlisting.); |
| 205 | connectioncxx . . $ FriendsListDialog#connection.->addWatchcxx . . $ NetworkConnection#addWatch(122195e397f39e1b).(popup_playerlistingcxx . . $ FriendsListDialog#popup_playerlisting.); |
| 206 | } |
| 207 | |
| 208 | void FriendsListDialogcxx . . $ FriendsListDialog#::slot_removeWatchcxx . . $ FriendsListDialog#slot_removeWatch(49f6e7a06ebc5aa8).(void) |
| 209 | { |
| 210 | watchesListModelcxx . . $ FriendsListDialog#watchesListModel.->removeListingcxx . . $ PlayerListModel#removeListing(122195e397f39e1b).(popup_playerlistingcxx . . $ FriendsListDialog#popup_playerlisting.); |
| 211 | connectioncxx . . $ FriendsListDialog#connection.->removeWatchcxx . . $ NetworkConnection#removeWatch(122195e397f39e1b).(popup_playerlistingcxx . . $ FriendsListDialog#popup_playerlisting.); |
| 212 | } |
| 213 | |
| 214 | void FriendsListDialogcxx . . $ FriendsListDialog#::slot_addBlockcxx . . $ FriendsListDialog#slot_addBlock(49f6e7a06ebc5aa8).(void) |
| 215 | { |
| 216 | if(popup_playerlistingcxx . . $ FriendsListDialog#popup_playerlisting.->friendWatchTypecxx . . $ PlayerListing#friendWatchType. == PlayerListingcxx . . $ PlayerListing#::friendedcxx . . $ PlayerListing#friended.) |
| 217 | friendsListModelcxx . . $ FriendsListDialog#friendsListModel.->removeListingcxx . . $ PlayerListModel#removeListing(122195e397f39e1b).(popup_playerlistingcxx . . $ FriendsListDialog#popup_playerlisting.); |
| 218 | else if(popup_playerlistingcxx . . $ FriendsListDialog#popup_playerlisting.->friendWatchTypecxx . . $ PlayerListing#friendWatchType. == PlayerListingcxx . . $ PlayerListing#::watchedcxx . . $ PlayerListing#watched.) |
| 219 | watchesListModelcxx . . $ FriendsListDialog#watchesListModel.->removeListingcxx . . $ PlayerListModel#removeListing(122195e397f39e1b).(popup_playerlistingcxx . . $ FriendsListDialog#popup_playerlisting.); |
| 220 | blockedListModelcxx . . $ FriendsListDialog#blockedListModel.->insertListingcxx . . $ PlayerListModel#insertListing(122195e397f39e1b).(popup_playerlistingcxx . . $ FriendsListDialog#popup_playerlisting.); |
| 221 | connectioncxx . . $ FriendsListDialog#connection.->addBlockcxx . . $ NetworkConnection#addBlock(122195e397f39e1b).(popup_playerlistingcxx . . $ FriendsListDialog#popup_playerlisting.); |
| 222 | } |
| 223 | |
| 224 | void FriendsListDialogcxx . . $ FriendsListDialog#::slot_removeBlockcxx . . $ FriendsListDialog#slot_removeBlock(49f6e7a06ebc5aa8).(void) |
| 225 | { |
| 226 | blockedListModelcxx . . $ FriendsListDialog#blockedListModel.->removeListingcxx . . $ PlayerListModel#removeListing(122195e397f39e1b).(popup_playerlistingcxx . . $ FriendsListDialog#popup_playerlisting.); |
| 227 | connectioncxx . . $ FriendsListDialog#connection.->removeBlockcxx . . $ NetworkConnection#removeBlock(122195e397f39e1b).(popup_playerlistingcxx . . $ FriendsListDialog#popup_playerlisting.); |
| 228 | } |
| 229 | |
| 230 | void FriendsListDialogcxx . . $ FriendsListDialog#::slot_popupMatchcxx . . $ FriendsListDialog#slot_popupMatch(49f6e7a06ebc5aa8).(void) |
| 231 | { |
| 232 | connectioncxx . . $ FriendsListDialog#connection.->sendMatchInvitecxx . . $ NetworkConnection#sendMatchInvite(cac334474c82cf3a).(popup_playerlistingcxx . . $ FriendsListDialog#popup_playerlisting.); |
| 233 | } |
| 234 | |
| 235 | void FriendsListDialogcxx . . $ FriendsListDialog#::slot_popupTalkcxx . . $ FriendsListDialog#slot_popupTalk(49f6e7a06ebc5aa8).(void) |
| 236 | { |
| 237 | Talkcxx . . $ Talk# * talk = roomcxx . . $ FriendsListDialog#room.->getTalkcxx . . $ Room#getTalk(e709c6e389e35213).(popup_playerlistingcxx . . $ FriendsListDialog#popup_playerlisting.); |
| 238 | if(talk) |
| 239 | talk->updatePlayerListingcxx . . $ Talk#updatePlayerListing(49f6e7a06ebc5aa8).(); |
| 240 | } |
| 241 | |
| 242 | /* See the room code this was copied from. Its weird how we do all this... */ |
| 243 | void FriendsListDialogcxx . . $ FriendsListDialog#::slot_playersDoubleClickedFriendscxx . . $ FriendsListDialog#slot_playersDoubleClickedFriends(87a6de385263c395).(const QModelIndexcxx . . $ QModelIndex# & index) |
| 244 | { |
| 245 | PlayerListingcxx . . $ PlayerListing# * opponent = friendsListModelcxx . . $ FriendsListDialog#friendsListModel.->playerListingFromIndexcxx . . $ PlayerListModel#playerListingFromIndex(b5acbb67a572cd68).(index); |
| 246 | Talkcxx . . $ Talk# * talk = roomcxx . . $ FriendsListDialog#room.->getTalkcxx . . $ Room#getTalk(e709c6e389e35213).(opponent); |
| 247 | if(talk) |
| 248 | talk->updatePlayerListingcxx . . $ Talk#updatePlayerListing(49f6e7a06ebc5aa8).(); |
| 249 | } |
| 250 | |
| 251 | void FriendsListDialogcxx . . $ FriendsListDialog#::slot_playersDoubleClickedWatchescxx . . $ FriendsListDialog#slot_playersDoubleClickedWatches(87a6de385263c395).(const QModelIndexcxx . . $ QModelIndex# & index) |
| 252 | { |
| 253 | PlayerListingcxx . . $ PlayerListing# * opponent = watchesListModelcxx . . $ FriendsListDialog#watchesListModel.->playerListingFromIndexcxx . . $ PlayerListModel#playerListingFromIndex(b5acbb67a572cd68).(index); |
| 254 | Talkcxx . . $ Talk# * talk = roomcxx . . $ FriendsListDialog#room.->getTalkcxx . . $ Room#getTalk(e709c6e389e35213).(opponent); |
| 255 | if(talk) |
| 256 | talk->updatePlayerListingcxx . . $ Talk#updatePlayerListing(49f6e7a06ebc5aa8).(); |
| 257 | } |