qTox  Version: nightly | Commit: bc751c8e1cac455f9690654fcfe0f560d2d7dfdd
Signals | Public Member Functions | Private Attributes | List of all members
Group Class Reference

#include <group.h>

Inheritance diagram for Group:
Inheritance graph
Collaboration diagram for Group:
Collaboration graph

Signals

void titleChangedByUser (const QString &title)
 
void titleChanged (const QString &author, const QString &title)
 
void userJoined (const ToxPk &user, const QString &name)
 
void userLeft (const ToxPk &user, const QString &name)
 
void numPeersChanged (int numPeers)
 
void peerNameChanged (const ToxPk &peer, const QString &oldName, const QString &newName)
 
- Signals inherited from Contact
void displayedNameChanged (const QString &newName)
 

Public Member Functions

 Group (int groupId, const GroupId persistentGroupId, const QString &name, bool isAvGroupchat, const QString &selfName, ICoreGroupQuery &groupQuery, ICoreIdHandler &idHandler)
 
bool isAvGroupchat () const
 
uint32_t getId () const override
 
const GroupIdgetPersistentId () const override
 
int getPeersCount () const
 
void regeneratePeerList ()
 
const QMap< ToxPk, QString > & getPeerList () const
 Gets the PKs and names of all peers. More...
 
bool peerHasNickname (ToxPk pk)
 
void setEventFlag (bool f) override
 
bool getEventFlag () const override
 
void setMentionedFlag (bool f)
 
bool getMentionedFlag () const
 
void updateUsername (ToxPk pk, const QString newName)
 
void setName (const QString &newTitle) override
 
void setTitle (const QString &author, const QString &newTitle)
 
QString getName () const
 
QString getDisplayedName () const override
 
QString resolveToxPk (const ToxPk &id) const
 
void setSelfName (const QString &name)
 
QString getSelfName () const
 
- Public Member Functions inherited from Contact
virtual ~Contact ()=0
 

Private Attributes

ICoreGroupQuerygroupQuery
 
ICoreIdHandleridHandler
 
QString selfName
 
QString title
 
QMap< ToxPk, QString > peerDisplayNames
 
bool hasNewMessages
 
bool userWasMentioned
 
int toxGroupNum
 
const GroupId groupId
 
bool avGroupchat
 

Detailed Description

Definition at line 34 of file group.h.

Constructor & Destructor Documentation

◆ Group()

Group::Group ( int  groupId,
const GroupId  persistentGroupId,
const QString &  name,
bool  isAvGroupchat,
const QString &  selfName,
ICoreGroupQuery groupQuery,
ICoreIdHandler idHandler 
)

Definition at line 33 of file group.cpp.

Member Function Documentation

◆ getDisplayedName()

QString Group::getDisplayedName ( ) const
overridevirtual

Implements Contact.

Definition at line 77 of file group.cpp.

Here is the call graph for this function:

◆ getEventFlag()

bool Group::getEventFlag ( ) const
overridevirtual

Implements Contact.

Definition at line 169 of file group.cpp.

Here is the caller graph for this function:

◆ getId()

uint32_t Group::getId ( ) const
overridevirtual

Implements Contact.

Definition at line 140 of file group.cpp.

Here is the caller graph for this function:

◆ getMentionedFlag()

bool Group::getMentionedFlag ( ) const

Definition at line 179 of file group.cpp.

◆ getName()

QString Group::getName ( ) const

Definition at line 72 of file group.cpp.

Here is the caller graph for this function:

◆ getPeerList()

const QMap< ToxPk, QString > & Group::getPeerList ( ) const

Gets the PKs and names of all peers.

Returns
PKs and names of all peers, including our own PK and name

Definition at line 159 of file group.cpp.

Here is the caller graph for this function:

◆ getPeersCount()

int Group::getPeersCount ( ) const

Definition at line 150 of file group.cpp.

Here is the caller graph for this function:

◆ getPersistentId()

const GroupId & Group::getPersistentId ( ) const
overridevirtual

Implements Contact.

Definition at line 145 of file group.cpp.

Here is the caller graph for this function:

◆ getSelfName()

QString Group::getSelfName ( ) const

Definition at line 200 of file group.cpp.

Here is the caller graph for this function:

◆ isAvGroupchat()

bool Group::isAvGroupchat ( ) const

Definition at line 135 of file group.cpp.

◆ numPeersChanged

void Group::numPeersChanged ( int  numPeers)
signal
Here is the caller graph for this function:

◆ peerHasNickname()

bool Group::peerHasNickname ( ToxPk  pk)

◆ peerNameChanged

void Group::peerNameChanged ( const ToxPk peer,
const QString &  oldName,
const QString &  newName 
)
signal
Here is the caller graph for this function:

◆ regeneratePeerList()

void Group::regeneratePeerList ( )

Definition at line 82 of file group.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resolveToxPk()

QString Group::resolveToxPk ( const ToxPk id) const

Definition at line 184 of file group.cpp.

◆ setEventFlag()

void Group::setEventFlag ( bool  f)
overridevirtual

Implements Contact.

Definition at line 164 of file group.cpp.

Here is the caller graph for this function:

◆ setMentionedFlag()

void Group::setMentionedFlag ( bool  f)

Definition at line 174 of file group.cpp.

Here is the caller graph for this function:

◆ setName()

void Group::setName ( const QString &  newTitle)
overridevirtual

Implements Contact.

Definition at line 51 of file group.cpp.

◆ setSelfName()

void Group::setSelfName ( const QString &  name)

Definition at line 195 of file group.cpp.

Here is the caller graph for this function:

◆ setTitle()

void Group::setTitle ( const QString &  author,
const QString &  newTitle 
)

Definition at line 62 of file group.cpp.

Here is the caller graph for this function:

◆ titleChanged

void Group::titleChanged ( const QString &  author,
const QString &  title 
)
signal
Here is the caller graph for this function:

◆ titleChangedByUser

void Group::titleChangedByUser ( const QString &  title)
signal
Here is the caller graph for this function:

◆ updateUsername()

void Group::updateUsername ( ToxPk  pk,
const QString  newName 
)

Definition at line 123 of file group.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ userJoined

void Group::userJoined ( const ToxPk user,
const QString &  name 
)
signal
Here is the caller graph for this function:

◆ userLeft

void Group::userLeft ( const ToxPk user,
const QString &  name 
)
signal
Here is the caller graph for this function:

Member Data Documentation

◆ avGroupchat

bool Group::avGroupchat
private

Definition at line 81 of file group.h.

◆ groupId

const GroupId Group::groupId
private

Definition at line 80 of file group.h.

◆ groupQuery

ICoreGroupQuery& Group::groupQuery
private

Definition at line 72 of file group.h.

◆ hasNewMessages

bool Group::hasNewMessages
private

Definition at line 77 of file group.h.

◆ idHandler

ICoreIdHandler& Group::idHandler
private

Definition at line 73 of file group.h.

◆ peerDisplayNames

QMap<ToxPk, QString> Group::peerDisplayNames
private

Definition at line 76 of file group.h.

◆ selfName

QString Group::selfName
private

Definition at line 74 of file group.h.

◆ title

QString Group::title
private

Definition at line 75 of file group.h.

◆ toxGroupNum

int Group::toxGroupNum
private

Definition at line 79 of file group.h.

◆ userWasMentioned

bool Group::userWasMentioned
private

Definition at line 78 of file group.h.


The documentation for this class was generated from the following files: