File indexing completed on 2024-05-12 05:40:38
0001 /* 0002 Cahoots is a crossplatform real-time collaborative text editor. 0003 0004 Copyright (C) 2010 Chris Dimpfl, Anandi Hira, David Vega 0005 0006 This program is free software: you can redistribute it and/or modify 0007 it under the terms of the GNU General Public License as published by 0008 the Free Software Foundation, either version 3 of the License, or 0009 (at your option) any later version. 0010 0011 This program is distributed in the hope that it will be useful, 0012 but WITHOUT ANY WARRANTY; without even the implied warranty of 0013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0014 GNU General Public License for more details. 0015 0016 You should have received a copy of the GNU General Public License 0017 along with this program. If not, see <http://www.gnu.org/licenses/>. 0018 */ 0019 #ifndef PARTICIPANTSPANE_H 0020 #define PARTICIPANTSPANE_H 0021 0022 #include "rwidgets_global.h" 0023 #include <QAbstractProxyModel> 0024 #include <QHostAddress> 0025 #include <QPointer> 0026 #include <QTreeWidgetItem> 0027 #include <QWidget> 0028 0029 //#include "network/networkmessagereader.h" 0030 //#include "network/networkmessagewriter.h" 0031 #include "model/participantmodel.h" 0032 0033 namespace Ui 0034 { 0035 class ParticipantsPane; 0036 } 0037 0038 class SharedNoteController; 0039 class RWIDGET_EXPORT ParticipantsPane : public QWidget 0040 { 0041 Q_OBJECT 0042 public: 0043 ParticipantsPane(SharedNoteController* ctrl, QWidget* parent= nullptr); 0044 virtual ~ParticipantsPane(); 0045 0046 bool canWrite(Player* idPlayer); 0047 bool canRead(Player* idPlayer); 0048 0049 // void fill(NetworkMessageWriter* msg); 0050 // void readFromMsg(NetworkMessageReader* msg); 0051 // void readPermissionChanged(NetworkMessageReader* msg); 0052 0053 signals: 0054 void memberCanNowRead(QString name); 0055 void memberPermissionsChanged(QString id, int i); 0056 void closeMediaToPlayer(QString id); 0057 void localPlayerPermissionChanged(ParticipantModel::Permission); 0058 void localPlayerIsOwner(bool); 0059 0060 private slots: 0061 void promoteCurrentItem(); 0062 void demoteCurrentItem(); 0063 0064 private: 0065 Ui::ParticipantsPane* ui; 0066 QPointer<SharedNoteController> m_sharedCtrl; 0067 }; 0068 0069 #endif // PARTICIPANTSPANE_H