qTox
Version: nightly | Commit: bc751c8e1cac455f9690654fcfe0f560d2d7dfdd
src
model
chatroom
groupchatroom.h
Go to the documentation of this file.
1
/*
2
Copyright © 2014-2019 by The qTox Project Contributors
3
4
This file is part of qTox, a Qt-based graphical interface for Tox.
5
6
qTox is libre software: you can redistribute it and/or modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation, either version 3 of the License, or
9
(at your option) any later version.
10
11
qTox is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU General Public License for more details.
15
16
You should have received a copy of the GNU General Public License
17
along with qTox. If not, see <http://www.gnu.org/licenses/>.
18
*/
19
20
#pragma once
21
22
#include "
chatroom.h
"
23
24
#include <QObject>
25
26
class
Core
;
27
class
IDialogsManager
;
28
class
Group
;
29
class
ToxPk
;
30
31
class
GroupChatroom
:
public
QObject,
public
Chatroom
32
{
33
Q_OBJECT
34
public
:
35
GroupChatroom
(
Group
*
group
,
IDialogsManager
*
dialogsManager
,
Core
& _core);
36
37
Contact
*
getContact
()
override
;
38
39
Group
*
getGroup
();
40
41
bool
hasNewMessage
()
const
;
42
void
resetEventFlags
();
43
44
bool
friendExists
(
const
ToxPk
& pk);
45
void
inviteFriend
(
const
ToxPk
& pk);
46
47
bool
possibleToOpenInNewWindow
()
const
;
48
bool
canBeRemovedFromWindow
()
const
;
49
void
removeGroupFromDialogs
();
50
51
private
:
52
Group
*
group
{
nullptr
};
53
IDialogsManager
*
dialogsManager
{
nullptr
};
54
Core
&
core
;
55
};
IDialogsManager
Definition:
idialogsmanager.h:27
GroupChatroom::inviteFriend
void inviteFriend(const ToxPk &pk)
Definition:
groupchatroom.cpp:64
GroupChatroom::dialogsManager
IDialogsManager * dialogsManager
Definition:
groupchatroom.h:53
GroupChatroom::getGroup
Group * getGroup()
Definition:
groupchatroom.cpp:43
GroupChatroom::hasNewMessage
bool hasNewMessage() const
Definition:
groupchatroom.cpp:48
GroupChatroom
Definition:
groupchatroom.h:31
GroupChatroom::possibleToOpenInNewWindow
bool possibleToOpenInNewWindow() const
Definition:
groupchatroom.cpp:76
chatroom.h
Chatroom
Definition:
chatroom.h:24
ToxPk
This class represents a Tox Public Key, which is a part of Tox ID.
Definition:
toxpk.h:26
GroupChatroom::removeGroupFromDialogs
void removeGroupFromDialogs()
Definition:
groupchatroom.cpp:90
Contact
Definition:
contact.h:26
GroupChatroom::group
Group * group
Definition:
groupchatroom.h:52
GroupChatroom::core
Core & core
Definition:
groupchatroom.h:54
GroupChatroom::resetEventFlags
void resetEventFlags()
Definition:
groupchatroom.cpp:53
Group
Definition:
group.h:34
GroupChatroom::canBeRemovedFromWindow
bool canBeRemovedFromWindow() const
Definition:
groupchatroom.cpp:83
GroupChatroom::getContact
Contact * getContact() override
Definition:
groupchatroom.cpp:38
GroupChatroom::friendExists
bool friendExists(const ToxPk &pk)
Definition:
groupchatroom.cpp:59
GroupChatroom::GroupChatroom
GroupChatroom(Group *group, IDialogsManager *dialogsManager, Core &_core)
Definition:
groupchatroom.cpp:31
Core
Definition:
core.h:59
Generated by
1.8.17