qTox  Version: nightly | Commit: bc751c8e1cac455f9690654fcfe0f560d2d7dfdd
Public Member Functions | Static Public Member Functions | Private Slots | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
ContentDialogManager Class Reference

#include <contentdialogmanager.h>

Inheritance diagram for ContentDialogManager:
Inheritance graph
Collaboration diagram for ContentDialogManager:
Collaboration graph

Public Member Functions

ContentDialogcurrent ()
 
bool contactWidgetExists (const ContactId &groupId)
 
void focusContact (const ContactId &contactId)
 
void updateFriendStatus (const ToxPk &friendPk)
 
void updateGroupStatus (const GroupId &friendPk)
 
bool isContactActive (const ContactId &contactId)
 
ContentDialoggetFriendDialog (const ToxPk &friendPk) const
 
ContentDialoggetGroupDialog (const GroupId &friendPk) const
 
IDialogsgetFriendDialogs (const ToxPk &friendPk) const
 
IDialogsgetGroupDialogs (const GroupId &groupId) const
 
FriendWidgetaddFriendToDialog (ContentDialog *dialog, std::shared_ptr< FriendChatroom > chatroom, GenericChatForm *form)
 
GroupWidgetaddGroupToDialog (ContentDialog *dialog, std::shared_ptr< GroupChatroom > chatroom, GenericChatForm *form)
 
void addContentDialog (ContentDialog &dialog)
 
- Public Member Functions inherited from IDialogsManager
 IDialogsManager ()=default
 
virtual ~IDialogsManager ()
 
 IDialogsManager (const IDialogsManager &)=default
 
IDialogsManageroperator= (const IDialogsManager &)=default
 
 IDialogsManager (IDialogsManager &&)=default
 
IDialogsManageroperator= (IDialogsManager &&)=default
 

Static Public Member Functions

static ContentDialogManagergetInstance ()
 

Private Slots

void onDialogClose ()
 
void onDialogActivate ()
 

Private Member Functions

ContentDialogfocusDialog (const ContactId &id, const QHash< const ContactId &, ContentDialog * > &list)
 Focus the dialog if it exists. More...
 

Private Attributes

ContentDialogcurrentDialog = nullptr
 
QHash< const ContactId &, ContentDialog * > contactDialogs
 

Static Private Attributes

static ContentDialogManagerinstance
 

Detailed Description

@breaf Manage all content dialogs

Definition at line 33 of file contentdialogmanager.h.

Member Function Documentation

◆ addContentDialog()

void ContentDialogManager::addContentDialog ( ContentDialog dialog)

Definition at line 183 of file contentdialogmanager.cpp.

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

◆ addFriendToDialog()

FriendWidget * ContentDialogManager::addFriendToDialog ( ContentDialog dialog,
std::shared_ptr< FriendChatroom chatroom,
GenericChatForm form 
)

Definition at line 61 of file contentdialogmanager.cpp.

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

◆ addGroupToDialog()

GroupWidget * ContentDialogManager::addGroupToDialog ( ContentDialog dialog,
std::shared_ptr< GroupChatroom chatroom,
GenericChatForm form 
)

Definition at line 77 of file contentdialogmanager.cpp.

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

◆ contactWidgetExists()

bool ContentDialogManager::contactWidgetExists ( const ContactId groupId)

Definition at line 51 of file contentdialogmanager.cpp.

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

◆ current()

ContentDialog * ContentDialogManager::current ( )

Definition at line 46 of file contentdialogmanager.cpp.

Here is the caller graph for this function:

◆ focusContact()

void ContentDialogManager::focusContact ( const ContactId contactId)

Definition at line 93 of file contentdialogmanager.cpp.

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

◆ focusDialog()

ContentDialog * ContentDialogManager::focusDialog ( const ContactId id,
const QHash< const ContactId &, ContentDialog * > &  list 
)
private

Focus the dialog if it exists.

Parameters
idUser Id.
listList with dialogs
Returns
ContentDialog if found, nullptr otherwise

Definition at line 107 of file contentdialogmanager.cpp.

Here is the caller graph for this function:

◆ getFriendDialog()

ContentDialog * ContentDialogManager::getFriendDialog ( const ToxPk friendPk) const

Definition at line 164 of file contentdialogmanager.cpp.

Here is the caller graph for this function:

◆ getFriendDialogs()

IDialogs * ContentDialogManager::getFriendDialogs ( const ToxPk friendPk) const
virtual

Implements IDialogsManager.

Definition at line 206 of file contentdialogmanager.cpp.

Here is the call graph for this function:

◆ getGroupDialog()

ContentDialog * ContentDialogManager::getGroupDialog ( const GroupId friendPk) const

Definition at line 169 of file contentdialogmanager.cpp.

Here is the caller graph for this function:

◆ getGroupDialogs()

IDialogs * ContentDialogManager::getGroupDialogs ( const GroupId groupId) const
virtual

Implements IDialogsManager.

Definition at line 211 of file contentdialogmanager.cpp.

Here is the call graph for this function:

◆ getInstance()

ContentDialogManager * ContentDialogManager::getInstance ( )
static

Definition at line 174 of file contentdialogmanager.cpp.

Here is the caller graph for this function:

◆ isContactActive()

bool ContentDialogManager::isContactActive ( const ContactId contactId)

Definition at line 154 of file contentdialogmanager.cpp.

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

◆ onDialogActivate

void ContentDialogManager::onDialogActivate ( )
privateslot

Definition at line 190 of file contentdialogmanager.cpp.

Here is the caller graph for this function:

◆ onDialogClose

void ContentDialogManager::onDialogClose ( )
privateslot

Definition at line 196 of file contentdialogmanager.cpp.

Here is the caller graph for this function:

◆ updateFriendStatus()

void ContentDialogManager::updateFriendStatus ( const ToxPk friendPk)

Definition at line 125 of file contentdialogmanager.cpp.

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

◆ updateGroupStatus()

void ContentDialogManager::updateGroupStatus ( const GroupId friendPk)

Definition at line 141 of file contentdialogmanager.cpp.

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

Member Data Documentation

◆ contactDialogs

QHash<const ContactId&, ContentDialog*> ContentDialogManager::contactDialogs
private

Definition at line 68 of file contentdialogmanager.h.

◆ currentDialog

ContentDialog* ContentDialogManager::currentDialog = nullptr
private

Definition at line 66 of file contentdialogmanager.h.

◆ instance

ContentDialogManager * ContentDialogManager::instance
staticprivate

Definition at line 70 of file contentdialogmanager.h.


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