qTox
Version: nightly | Commit: bc751c8e1cac455f9690654fcfe0f560d2d7dfdd
|
Go to the documentation of this file.
31 static const int MAX_GROUP_TITLE_LENGTH = 128;
35 : groupQuery(groupQuery)
36 , idHandler(idHandler)
39 , toxGroupNum(groupId)
40 , groupId{persistentGroupId}
41 , avGroupchat{isAvGroupchat}
53 const QString shortTitle = newTitle.left(MAX_GROUP_TITLE_LENGTH);
54 if (!shortTitle.isEmpty() &&
title != shortTitle) {
64 const QString shortTitle = newTitle.left(MAX_GROUP_TITLE_LENGTH);
65 if (!shortTitle.isEmpty() &&
title != shortTitle) {
94 const int nPeers = peers.size();
95 for (
int i = 0; i < nPeers; ++i) {
103 for (
const auto& pk : oldPeerNames.keys()) {
105 emit
userLeft(pk, oldPeerNames.value(pk));
109 if (!oldPeerNames.contains(pk)) {
114 if (oldPeerNames.contains(pk) && oldPeerNames.value(pk) !=
peerDisplayNames.value(pk)) {
118 if (oldPeerNames.size() != nPeers) {
QString resolveToxPk(const ToxPk &id) const
static QString decideNickname(const ToxPk &friendPk, const QString &origName)
virtual ToxPk getGroupPeerPk(int groupId, int peerId) const =0
const QMap< ToxPk, QString > & getPeerList() const
Gets the PKs and names of all peers.
bool isAvGroupchat() const
virtual QString getUsername() const =0
Group(int groupId, const GroupId persistentGroupId, const QString &name, bool isAvGroupchat, const QString &selfName, ICoreGroupQuery &groupQuery, ICoreIdHandler &idHandler)
void titleChanged(const QString &author, const QString &title)
int getPeersCount() const
void regeneratePeerList()
void numPeersChanged(int numPeers)
void setEventFlag(bool f) override
uint32_t getId() const override
void userJoined(const ToxPk &user, const QString &name)
ICoreIdHandler & idHandler
void setSelfName(const QString &name)
This class represents a Tox Public Key, which is a part of Tox ID.
QMap< ToxPk, QString > peerDisplayNames
void peerNameChanged(const ToxPk &peer, const QString &oldName, const QString &newName)
virtual ToxPk getSelfPublicKey() const =0
bool getMentionedFlag() const
bool getEventFlag() const override
void setTitle(const QString &author, const QString &newTitle)
QString getDisplayedName() const override
const GroupId & getPersistentId() const override
This class represents a long term persistent group identifier.
void setName(const QString &newTitle) override
void setMentionedFlag(bool f)
void updateUsername(ToxPk pk, const QString newName)
void titleChangedByUser(const QString &title)
QString getSelfName() const
ICoreGroupQuery & groupQuery
virtual QStringList getGroupPeerNames(int groupId) const =0
void userLeft(const ToxPk &user, const QString &name)