| 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 | #ifndef FRIENDSLISTDIALOG_H |
| 24 | #define FRIENDSLISTDIALOG_H |
| 25 | |
| 26 | #include "ui_friendslistdialog.h" |
| 27 | #include <QtWidgets> |
| 28 | |
| 29 | class NetworkConnection; |
| 30 | class Room; |
| 31 | |
| 32 | class FriendsListDialog : public QDialog, Ui::FriendsListDialog |
| 33 | { |
| 34 | Q_OBJECT |
| 35 | public: |
| 36 | FriendsListDialog(NetworkConnection * c, Room * r); |
| 37 | ~FriendsListDialog(); |
| 38 | private: |
| 39 | void populateLists(void); |
| 40 | Ui::FriendsListDialog ui; |
| 41 | NetworkConnection * connection; |
| 42 | Room * room; |
| 43 | |
| 44 | QModelIndex popup_item; |
| 45 | class PlayerListing * popup_playerlisting; |
| 46 | class SimplePlayerListModel * friendsListModel; |
| 47 | class SimplePlayerListModel * watchesListModel; |
| 48 | class SimplePlayerListModel * blockedListModel; |
| 49 | |
| 50 | void slot_showPopupFriends(const QPoint & iPoint); |
| 51 | void slot_showPopupWatches(const QPoint & iPoint); |
| 52 | void slot_showPopupBlocked(const QPoint & iPoint); |
| 53 | void slot_addFriend(void); |
| 54 | void slot_removeFriend(void); |
| 55 | void slot_addWatch(void); |
| 56 | void slot_removeWatch(void); |
| 57 | void slot_addBlock(void); |
| 58 | void slot_removeBlock(void); |
| 59 | void slot_playersDoubleClickedFriends(const QModelIndex & index); |
| 60 | void slot_playersDoubleClickedWatches(const QModelIndex & index); |
| 61 | void slot_popupMatch(void); |
| 62 | void slot_popupTalk(void); |
| 63 | }; |
| 64 | #endif //FRIENDSLISTDIALOG_H |