qTox
Version: nightly | Commit: bc751c8e1cac455f9690654fcfe0f560d2d7dfdd
src
widget
form
groupchatform.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 "
genericchatform.h
"
23
#include "
src/core/toxpk.h
"
24
#include <QMap>
25
26
namespace
Ui
{
27
class
MainWindow;
28
}
29
class
Group
;
30
class
TabCompleter
;
31
class
FlowLayout
;
32
class
QTimer;
33
class
GroupId
;
34
class
IMessageDispatcher
;
35
struct
Message
;
36
class
Settings
;
37
class
IGroupSettings
;
38
39
class
GroupChatForm
:
public
GenericChatForm
40
{
41
Q_OBJECT
42
public
:
43
explicit
GroupChatForm
(
Core
& _core,
Group
* chatGroup,
IChatLog
&
chatLog
,
IMessageDispatcher
&
messageDispatcher
,
IGroupSettings
& _settings);
44
~GroupChatForm
();
45
46
void
peerAudioPlaying
(
ToxPk
peerPk);
47
48
private
slots:
49
void
onScreenshotClicked
()
override
;
50
void
onAttachClicked
()
override
;
51
void
onMicMuteToggle
();
52
void
onVolMuteToggle
();
53
void
onCallClicked
();
54
void
onUserJoined
(
const
ToxPk
& user,
const
QString& name);
55
void
onUserLeft
(
const
ToxPk
& user,
const
QString& name);
56
void
onPeerNameChanged
(
const
ToxPk
& peer,
const
QString& oldName,
const
QString& newName);
57
void
onTitleChanged
(
const
QString& author,
const
QString& title);
58
void
onLabelContextMenuRequested
(
const
QPoint& localPos);
59
60
protected
:
61
void
keyPressEvent
(QKeyEvent* ev)
final
;
62
void
keyReleaseEvent
(QKeyEvent* ev)
final
;
63
// drag & drop
64
void
dragEnterEvent
(QDragEnterEvent* ev)
final
;
65
void
dropEvent
(QDropEvent* ev)
final
;
66
67
private
:
68
void
retranslateUi
();
69
void
updateUserCount
(
int
numPeers);
70
void
updateUserNames
();
71
void
joinGroupCall
();
72
void
leaveGroupCall
();
73
74
private
:
75
Core
&
core
;
76
Group
*
group
;
77
QMap<ToxPk, QLabel*>
peerLabels
;
78
QMap<ToxPk, QTimer*>
peerAudioTimers
;
79
FlowLayout
*
namesListLayout
;
80
QLabel*
nusersLabel
;
81
TabCompleter
*
tabber
;
82
bool
inCall
;
83
IGroupSettings
&
settings
;
84
};
Settings
Definition:
settings.h:51
GroupChatForm::nusersLabel
QLabel * nusersLabel
Definition:
groupchatform.h:80
GroupChatForm::onPeerNameChanged
void onPeerNameChanged(const ToxPk &peer, const QString &oldName, const QString &newName)
Definition:
groupchatform.cpp:248
GenericChatForm
Parent class for all chatforms. It's provide the minimum required UI elements and methods to work wit...
Definition:
genericchatform.h:67
GroupChatForm::joinGroupCall
void joinGroupCall()
Definition:
groupchatform.cpp:441
GroupChatForm::retranslateUi
void retranslateUi()
Definition:
groupchatform.cpp:380
GroupChatForm::core
Core & core
Definition:
groupchatform.h:75
GroupChatForm::onTitleChanged
void onTitleChanged(const QString &author, const QString &title)
Definition:
groupchatform.cpp:146
GroupChatForm::onAttachClicked
void onAttachClicked() override
Definition:
groupchatform.cpp:161
IGroupSettings
Definition:
igroupsettings.h:26
GroupChatForm::peerAudioPlaying
void peerAudioPlaying(ToxPk peerPk)
Definition:
groupchatform.cpp:255
GroupChatForm::dragEnterEvent
void dragEnterEvent(QDragEnterEvent *ev) final
Definition:
groupchatform.cpp:280
GroupChatForm::onUserLeft
void onUserLeft(const ToxPk &user, const QString &name)
Definition:
groupchatform.cpp:240
GroupChatForm::dropEvent
void dropEvent(QDropEvent *ev) final
Definition:
groupchatform.cpp:291
GroupChatForm::onUserJoined
void onUserJoined(const ToxPk &user, const QString &name)
Definition:
groupchatform.cpp:232
GenericChatForm::chatLog
IChatLog & chatLog
Definition:
genericchatform.h:166
GroupChatForm::updateUserNames
void updateUserNames()
Updates user names' labels at the top of group chat.
Definition:
groupchatform.cpp:169
GroupChatForm::keyReleaseEvent
void keyReleaseEvent(QKeyEvent *ev) final
Definition:
groupchatform.cpp:360
GroupChatForm::onMicMuteToggle
void onMicMuteToggle()
Definition:
groupchatform.cpp:308
GroupChatForm
Definition:
groupchatform.h:39
toxpk.h
GroupChatForm::group
Group * group
Definition:
groupchatform.h:76
IMessageDispatcher
Definition:
imessagedispatcher.h:34
IChatLog
Definition:
ichatlog.h:83
FlowLayout
Definition:
flowlayout.h:46
GroupChatForm::peerAudioTimers
QMap< ToxPk, QTimer * > peerAudioTimers
Timeout = peer stopped sending audio.
Definition:
groupchatform.h:78
Ui
Definition:
filetransferwidget.h:30
ToxPk
This class represents a Tox Public Key, which is a part of Tox ID.
Definition:
toxpk.h:26
GroupChatForm::inCall
bool inCall
Definition:
groupchatform.h:82
TabCompleter
Definition:
tabcompleter.h:30
GroupChatForm::peerLabels
QMap< ToxPk, QLabel * > peerLabels
Maps peernumbers to the QLabels in namesListLayout.
Definition:
groupchatform.h:77
GroupId
This class represents a long term persistent group identifier.
Definition:
groupid.h:26
Group
Definition:
group.h:34
GroupChatForm::keyPressEvent
void keyPressEvent(QKeyEvent *ev) final
Definition:
groupchatform.cpp:349
GroupChatForm::onScreenshotClicked
void onScreenshotClicked() override
Definition:
groupchatform.cpp:156
GroupChatForm::settings
IGroupSettings & settings
Definition:
groupchatform.h:83
GroupChatForm::leaveGroupCall
void leaveGroupCall()
Definition:
groupchatform.cpp:450
GroupChatForm::onVolMuteToggle
void onVolMuteToggle()
Definition:
groupchatform.cpp:319
GroupChatForm::onLabelContextMenuRequested
void onLabelContextMenuRequested(const QPoint &localPos)
Definition:
groupchatform.cpp:385
genericchatform.h
GroupChatForm::onCallClicked
void onCallClicked()
Definition:
groupchatform.cpp:330
GroupChatForm::tabber
TabCompleter * tabber
Definition:
groupchatform.h:81
GroupChatForm::~GroupChatForm
~GroupChatForm()
Definition:
groupchatform.cpp:141
GenericChatForm::messageDispatcher
IMessageDispatcher & messageDispatcher
Definition:
genericchatform.h:167
GroupChatForm::updateUserCount
void updateUserCount(int numPeers)
Updates users' count label text.
Definition:
groupchatform.cpp:374
Message
Definition:
message.h:52
GroupChatForm::namesListLayout
FlowLayout * namesListLayout
Definition:
groupchatform.h:79
GroupChatForm::GroupChatForm
GroupChatForm(Core &_core, Group *chatGroup, IChatLog &chatLog, IMessageDispatcher &messageDispatcher, IGroupSettings &_settings)
Definition:
groupchatform.cpp:85
Core
Definition:
core.h:59
Generated by
1.8.17