代码拉取完成,页面将自动刷新
同步操作将从 wufangzhao/startalk_pc_v2 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#if _MSC_VER >= 1600
#pragma execution_character_set("utf-8")
#endif
#ifndef _UIGROUPMANAGER_H_
#define _UIGROUPMANAGER_H_
#include "../CustomUi/UShadowWnd.h"
#include <QMap>
#include "../include/Spinlock.h"
#include <QtWidgets/QListWidgetItem>
#include "../include/ThreadPool.h"
#include "MessageManager.h"
#include "SearchView.h"
#include <set>
#include <QMutexLocker>
#include <QTreeView>
class SearchWgt;
class QLabel;
class QListWidget;
class QStandardItemModel;
class QStandardItem;
class TreeItemSortModel;
class NavigationItem;
class BatchAddMemberWnd;
class TreeItemDelegate;
class UIGroupManager : public UShadowDialog {
Q_OBJECT
public:
UIGroupManager();
~UIGroupManager() override;
private:
enum {
EM_TYPE_INVALID, EM_TYPE_CREATGROUP, EM_TYPE_ADDGROUPMEMBER
};
Q_SIGNALS:
void setTreeDataFinish();
void initDataFinish();
void sgUpdateSession(const std::vector<QTalk::StShareSession>&);
public slots:
// 建群
void onCreatGroup(const QString &memberId);
// 拉群成员
void onAddGroupMember(const QString &groupId);
public:
void onCreatGroupRet(bool ret, const std::string &groupId);
void addGroupMember(const QString &memberId, const QString &headSrc);
void onRecvFriends(const std::vector<QTalk::Entity::IMFriendList>& friends);
void onRecvGroupList(const std::vector<QTalk::Entity::ImGroupInfo>& groupInfos);
void updateUserConfig(const std::vector<QTalk::Entity::ImConfig> &arConfigs);
void updateUserConfig(const std::map<std::string, std::string> &deleteData,
const std::vector<QTalk::Entity::ImConfig>& arImConfig);
//
void gotIncrementUser(const std::vector<QTalk::Entity::ImUserInfo> &arUserInfo,
const std::vector<std::string> &arDeletes);
protected:
void initUi();
void removeGroupMeber(const QString &memberId);
void resetUi(const QString &memberId = "");
void onBatchAddMember(const QString& ids);
//
void initGroupMembers();
void initFriends();
void initStarUser();
void initRecentSession();
void initRecentSessionData();
void initStructure();
void initData();
void updateUi();
void onUpdateSession(const std::vector<QTalk::StShareSession>&);
protected:
void sendAddGroupMemberMessage(const QString &groupId, const QList<QString> &members, bool = true);
void creatGroup();
QStandardItem* creatGroupItem(QStandardItem *item, const std::string &groupId);
QStandardItem* creatItem(QStandardItem *item, const std::string &xmppId);
void onItemDoubleClick(const QString& memberId, const QString& name);
private:
SearchWgt *_pSearchWgt;
QListView *_pLstWgt;
QStandardItemModel* _plstModel;
QLabel *_pTipLabel;
QLabel *_pTitleLabel;
QFrame *_pGroupNaemFrm;
QLineEdit *_pGroupNameEdit;
QStandardItemModel *_pTreeModel;
QTreeView *_pTreeWgt;
TreeItemDelegate* _pItemDelegate;
QPushButton *_batchAddMemberBtn;
BatchAddMemberWnd* _batchAddMemberWnd;
private:
GroupManagerMsgManager *_pMsgManager;
GroupMsgListener *_pMsgListener;
private:
QString _strGroupId;
QUInt8 _type;
QMap<QString, QString> _mapUserName;
QMap<QString, QStandardItem *> _mapLstWgtItem;
QMap<QString, QList<QString>> _mapGroupMembers;
QTalk::util::spin_mutex sm;
std::map<std::string, std::shared_ptr<QTalk::Entity::ImUserInfo>> _structure;
std::map<std::string, std::set<std::string>> _groupmemebers;
std::vector<QTalk::Entity::IMFriendList> _friends;
std::map<std::string, QTalk::Entity::ImGroupInfo> _groupInfos;
std::set<std::string> _arStarContact; // 星标联系人
std::set<std::string> _arTopUsers; // 置顶
std::map<std::string, std::map<int, QStandardItem*>> _mapItems;
QStandardItem* _pRecentItem;
QStandardItem* _pFriendItem;
QStandardItem* _pStarItem;
int flags = 1;
enum data_flag{
EM_ALL = 32
};
enum {
EM_STRUCTURE = 1,
EM_GROUPMEMEBER = 2,
EM_FRIEND = 4,
EM_STAR = 8,
EM_RECENT = 16,
};
private:
QListView *_pSearchView;
QStandardItemModel* _pSearchSrcModel;
SearchItemSortModel* _pSearchModel;
SearchItemDelegate* _pSearchItemDelegate;
std::vector<QStandardItem*> recentItems;
};
#endif//_UIGROUPMANAGER_H_
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。