qTox
Version: nightly | Commit: bc751c8e1cac455f9690654fcfe0f560d2d7dfdd
|
Go to the documentation of this file.
34 for (
auto it = dialogs.begin(); it != dialogs.end();) {
36 it = dialogs.erase(it);
54 if (dialog ==
nullptr) {
62 std::shared_ptr<FriendChatroom> chatroom,
65 auto friendWidget = dialog->
addFriend(chatroom, form);
78 std::shared_ptr<GroupChatroom> chatroom,
81 auto groupWidget = dialog->
addGroup(chatroom, form);
96 if (dialog !=
nullptr) {
110 auto iter = list.find(
id);
111 if (iter == list.end()) {
116 if (dialog->windowState() & Qt::WindowMinimized) {
117 dialog->showNormal();
121 dialog->activateWindow();
128 if (dialog ==
nullptr) {
144 if (dialog ==
nullptr) {
157 if (dialog ==
nullptr) {
192 ContentDialog* dialog = qobject_cast<ContentDialog*>(sender());
198 ContentDialog* dialog = qobject_cast<ContentDialog*>(sender());
void updateContactStatusLight(const ContactId &contactId)
void updateFriendStatus(const ToxPk &friendPk)
bool isContactActive(const ContactId &contactId) const override
ContentDialog * focusDialog(const ContactId &id, const QHash< const ContactId &, ContentDialog * > &list)
Focus the dialog if it exists.
void removeGroup(const GroupId &groupId) override
static ContentDialogManager * getInstance()
ContentDialog * current()
ContentDialog * getFriendDialog(const ToxPk &friendPk) const
ContentDialog * currentDialog
static ContentDialogManager * instance
void updateFriendStatus(const ToxPk &friendPk, Status::Status status)
FriendWidget * addFriendToDialog(ContentDialog *dialog, std::shared_ptr< FriendChatroom > chatroom, GenericChatForm *form)
static Friend * findFriend(const ToxPk &friendPk)
IDialogs * getFriendDialogs(const ToxPk &friendPk) const
IDialogs * getGroupDialogs(const GroupId &groupId) const
Status::Status getStatus() const
void focusContact(const ContactId &contactId)
bool contactWidgetExists(const ContactId &groupId)
void updateTitleAndStatusIcon()
Update window title and icon.
This class represents a Tox Public Key, which is a part of Tox ID.
bool isContactActive(const ContactId &contactId)
ContentDialog * getGroupDialog(const GroupId &friendPk) const
const GroupId & getPersistentId() const override
void focusContact(const ContactId &friendPk)
This class represents a long term persistent group identifier.
GroupWidget * addGroup(std::shared_ptr< GroupChatroom > chatroom, GenericChatForm *form)
const ToxPk & getPublicKey() const
void removeFriend(const ToxPk &friendPk) override
QHash< const ContactId &, ContentDialog * > contactDialogs
GroupWidget * addGroupToDialog(ContentDialog *dialog, std::shared_ptr< GroupChatroom > chatroom, GenericChatForm *form)
void addContentDialog(ContentDialog &dialog)
FriendWidget * addFriend(std::shared_ptr< FriendChatroom > chatroom, GenericChatForm *form)
void updateGroupStatus(const GroupId &friendPk)
bool hasContact(const ContactId &contactId) const override