mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-06 21:28:11 -05:00
061a8113bb
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6160 b45a01b8-16f6-495d-af2f-9b41ad6348cc
69 lines
1.8 KiB
C++
69 lines
1.8 KiB
C++
#pragma once
|
|
|
|
#include <QTreeWidget>
|
|
#include <retroshare/rsmsgs.h>
|
|
#include "ui_ChatLobbyWidget.h"
|
|
#include "RsAutoUpdatePage.h"
|
|
|
|
class RSTreeWidgetItemCompareRole;
|
|
class ChatTabWidget ;
|
|
class ChatLobbyDialog ;
|
|
class QTextBrowser ;
|
|
|
|
struct ChatLobbyInfoStruct
|
|
{
|
|
QIcon default_icon ;
|
|
ChatLobbyDialog *dialog ;
|
|
time_t last_typing_event ;
|
|
};
|
|
|
|
class ChatLobbyWidget : public RsAutoUpdatePage, Ui::ChatLobbyWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
/** Default constructor */
|
|
ChatLobbyWidget(QWidget *parent = 0, Qt::WFlags flags = 0);
|
|
|
|
/** Default destructor */
|
|
~ChatLobbyWidget();
|
|
|
|
virtual void updateDisplay();
|
|
|
|
void setCurrentChatPage(ChatLobbyDialog *) ; // used by ChatLobbyDialog to raise.
|
|
void addChatPage(ChatLobbyDialog *) ;
|
|
|
|
protected slots:
|
|
void lobbyChanged();
|
|
void lobbyTreeWidgetCustomPopupMenu(QPoint);
|
|
void createChatLobby();
|
|
void subscribeItem();
|
|
void unsubscribeItem();
|
|
void itemDoubleClicked(QTreeWidgetItem *item, int column);
|
|
void updateCurrentLobby() ;
|
|
void displayChatLobbyEvent(qulonglong lobby_id, int event_type, const QString& nickname, const QString& str);
|
|
void readChatLobbyInvites();
|
|
void showLobby(QTreeWidgetItem *lobby_item) ;
|
|
void showBlankPage(ChatLobbyId id) ;
|
|
void unsubscribeChatLobby(ChatLobbyId id) ;
|
|
void updateTypingStatus(ChatLobbyId id) ;
|
|
void resetLobbyTreeIcons() ;
|
|
void updateMessageChanged(ChatLobbyId);
|
|
void updatePeerEntering(ChatLobbyId);
|
|
void updatePeerLeaving(ChatLobbyId);
|
|
|
|
private:
|
|
RSTreeWidgetItemCompareRole *compareRole;
|
|
QTreeWidgetItem *privateLobbyItem;
|
|
QTreeWidgetItem *publicLobbyItem;
|
|
QTreeWidgetItem *getTreeWidgetItem(ChatLobbyId);
|
|
|
|
ChatTabWidget *tabWidget ;
|
|
|
|
std::map<ChatLobbyId,ChatLobbyInfoStruct> _lobby_infos ;
|
|
QTextBrowser *_lobby_blank_page ;
|
|
|
|
std::map<QTreeWidgetItem*,time_t> _icon_changed_map ;
|
|
};
|
|
|