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

#include <chatform.h>

Inheritance diagram for ChatForm:
Inheritance graph
Collaboration diagram for ChatForm:
Collaboration graph

Public Slots

void onAvInvite (uint32_t friendId, bool video)
 
void onAvStart (uint32_t friendId, bool video)
 
void onAvEnd (uint32_t friendId, bool error)
 
void onAvatarChanged (const ToxPk &friendPk, const QPixmap &pic)
 
void onFileNameChanged (const ToxPk &friendPk)
 
void onExtensionSupportChanged (ExtensionSet extensions)
 
void clearChatArea ()
 
void onShowMessagesClicked ()
 
void onSplitterMoved (int pos, int index)
 
void reloadTheme () final
 
- Public Slots inherited from GenericChatForm
void focusInput ()
 
void onChatMessageFontChanged (const QFont &font)
 
void setColorizedNames (bool enable)
 
virtual void reloadTheme ()
 

Signals

void incomingNotification (uint32_t friendId)
 
void outgoingNotification ()
 
void stopNotification ()
 
void endCallNotification ()
 
void rejectCall (uint32_t friendId)
 
void acceptCall (uint32_t friendId)
 
void updateFriendActivity (Friend &frnd)
 
- Signals inherited from GenericChatForm
void messageInserted ()
 

Public Member Functions

 ChatForm (Profile &profile, Friend *chatFriend, IChatLog &chatLog, IMessageDispatcher &messageDispatcher)
 
 ~ChatForm () override
 
void setStatusMessage (const QString &newMessage)
 
void setFriendTyping (bool isTyping)
 
void show (ContentLayout *contentLayout) final
 
- Public Member Functions inherited from GenericChatForm
 GenericChatForm (const Core &_core, const Contact *contact, IChatLog &chatLog, IMessageDispatcher &messageDispatcher, QWidget *parent=nullptr)
 
 ~GenericChatForm () override
 
void setName (const QString &newName)
 
void addSystemInfoMessage (const QDateTime &datetime, SystemMessageType messageType, SystemMessage::Args messageArgs)
 
QDateTime getLatestTime () const
 

Static Public Attributes

static const QString ACTION_PREFIX = QStringLiteral("/me ")
 

Protected Member Functions

std::unique_ptr< NetCamViewcreateNetcam ()
 
void dragEnterEvent (QDragEnterEvent *ev) final
 
void dropEvent (QDropEvent *ev) final
 
void hideEvent (QHideEvent *event) final
 
void showEvent (QShowEvent *event) final
 
- Protected Member Functions inherited from GenericChatForm
ChatMessage::Ptr createMessage (const ToxPk &author, const QString &message, const QDateTime &datetime, bool isAction, bool isSent, bool colorizeName=false)
 
void adjustFileMenuPosition ()
 
void hideEvent (QHideEvent *event) override
 
void showEvent (QShowEvent *) override
 
bool event (QEvent *) final
 
void resizeEvent (QResizeEvent *event) final
 
bool eventFilter (QObject *object, QEvent *event) final
 
bool searchInText (const QString &phrase, const ParameterSearch &parameter, SearchDirection direction)
 
std::pair< int, int > indexForSearchInLine (const QString &txt, const QString &phrase, const ParameterSearch &parameter, SearchDirection direction)
 

Private Slots

void updateFriendActivityForFile (const ToxFile &file)
 
void onAttachClicked () override
 
void onScreenshotClicked () override
 
void onTextEditChanged ()
 
void onCallTriggered ()
 
void onVideoCallTriggered ()
 
void onAnswerCallTriggered (bool video)
 
void onRejectCallTriggered ()
 
void onMicMuteToggle ()
 
void onVolMuteToggle ()
 
void onFriendStatusChanged (const ToxPk &friendPk, Status::Status status)
 
void onFriendTypingChanged (quint32 friendId, bool isTyping)
 
void onFriendNameChanged (const QString &name)
 
void onStatusMessage (const QString &message)
 
void onUpdateTime ()
 
void previewImage (const QPixmap &pixmap)
 
void cancelImagePreview ()
 
void sendImageFromPreview ()
 
void doScreenshot ()
 
void onCopyStatusMessage ()
 
void callUpdateFriendActivity ()
 

Private Member Functions

void updateMuteMicButton ()
 
void updateMuteVolButton ()
 
void retranslateUi ()
 
void showOutgoingCall (bool video)
 
void startCounter ()
 
void stopCounter (bool error=false)
 
void updateCallButtons ()
 
void showNetcam ()
 
void hideNetcam ()
 

Private Attributes

Corecore
 
Friendf
 
CroppingLabelstatusMessageLabel
 
QMenu statusMessageMenu
 
QLabel * callDuration
 
QTimer * callDurationTimer
 
QTimer typingTimer
 
QElapsedTimer timeElapsed
 
QAction * copyStatusAction
 
QPixmap imagePreviewSource
 
ImagePreviewButtonimagePreview
 
bool isTyping
 
bool lastCallIsVideo
 
std::unique_ptr< NetCamViewnetcam
 

Additional Inherited Members

- Static Public Member Functions inherited from GenericChatForm
static QString resolveToxPk (const ToxPk &pk)
 Searches for name (possibly alias) of someone with specified public key among all of your friends or groups you are participated. More...
 
- Protected Slots inherited from GenericChatForm
void onChatContextMenuRequested (QPoint pos)
 
virtual void onScreenshotClicked ()=0
 
void onSendTriggered ()
 
virtual void onAttachClicked ()=0
 
void onEmoteButtonClicked ()
 
void onEmoteInsertRequested (QString str)
 
void onCopyLogClicked ()
 
void clearChatArea ()
 
void clearChatArea (bool confirm, bool inform)
 
void onSelectAllClicked ()
 
void showFileMenu ()
 
void hideFileMenu ()
 
void quoteSelectedText ()
 
void copyLink ()
 Callback of GenericChatForm::copyLinkAction. More...
 
void onLoadHistory ()
 
void onExportChat ()
 
void searchFormShow ()
 
void updateShowDateInfo (const ChatLine::Ptr &prevLine, const ChatLine::Ptr &topLine)
 
void goToCurrentDate ()
 
- Protected Attributes inherited from GenericChatForm
const Corecore
 
bool audioInputFlag
 
bool audioOutputFlag
 
int curRow
 
QAction * clearAction
 
QAction * quoteAction
 
QAction * copyLinkAction
 
QAction * searchAction
 
QAction * goToCurrentDateAction
 
QAction * loadHistoryAction
 
QAction * exportChatAction
 
QMenu menu
 
QVBoxLayout * contentLayout
 
QPushButton * emoteButton
 
QPushButton * fileButton
 
QPushButton * screenshotButton
 
QPushButton * sendButton
 
QSplitter * bodySplitter
 
ChatFormHeaderheadWidget
 
SearchFormsearchForm
 
QLabel * dateInfo
 
ChatWidgetchatWidget
 
ChatTextEditmsgEdit
 
FlyoutOverlayWidgetfileFlyout
 
Widgetparent
 
IChatLogchatLog
 
IMessageDispatchermessageDispatcher
 

Detailed Description

Definition at line 46 of file chatform.h.

Constructor & Destructor Documentation

◆ ChatForm()

ChatForm::ChatForm ( Profile profile,
Friend chatFriend,
IChatLog chatLog,
IMessageDispatcher messageDispatcher 
)

Definition at line 108 of file chatform.cpp.

Here is the call graph for this function:

◆ ~ChatForm()

ChatForm::~ChatForm ( )
override

Definition at line 213 of file chatform.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ acceptCall

void ChatForm::acceptCall ( uint32_t  friendId)
signal
Here is the caller graph for this function:

◆ callUpdateFriendActivity

void ChatForm::callUpdateFriendActivity ( )
privateslot

Definition at line 225 of file chatform.cpp.

◆ cancelImagePreview

void ChatForm::cancelImagePreview ( )
privateslot

Definition at line 596 of file chatform.cpp.

◆ clearChatArea

void ChatForm::clearChatArea ( )
slot

Definition at line 569 of file chatform.cpp.

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

◆ createNetcam()

std::unique_ptr< NetCamView > ChatForm::createNetcam ( )
protected

Definition at line 505 of file chatform.cpp.

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

◆ doScreenshot

void ChatForm::doScreenshot ( )
privateslot

Definition at line 581 of file chatform.cpp.

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

◆ dragEnterEvent()

void ChatForm::dragEnterEvent ( QDragEnterEvent *  ev)
finalprotected

Definition at line 519 of file chatform.cpp.

◆ dropEvent()

void ChatForm::dropEvent ( QDropEvent *  ev)
finalprotected

Definition at line 526 of file chatform.cpp.

Here is the call graph for this function:

◆ endCallNotification

void ChatForm::endCallNotification ( )
signal
Here is the caller graph for this function:

◆ hideEvent()

void ChatForm::hideEvent ( QHideEvent *  event)
finalprotected

Definition at line 726 of file chatform.cpp.

Here is the call graph for this function:

◆ hideNetcam()

void ChatForm::hideNetcam ( )
private

Definition at line 762 of file chatform.cpp.

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

◆ incomingNotification

void ChatForm::incomingNotification ( uint32_t  friendId)
signal
Here is the caller graph for this function:

◆ onAnswerCallTriggered

void ChatForm::onAnswerCallTriggered ( bool  video)
privateslot

Definition at line 381 of file chatform.cpp.

Here is the call graph for this function:

◆ onAttachClicked

void ChatForm::onAttachClicked ( )
overrideprivateslot

Definition at line 275 of file chatform.cpp.

Here is the call graph for this function:

◆ onAvatarChanged

void ChatForm::onAvatarChanged ( const ToxPk friendPk,
const QPixmap &  pic 
)
slot

Definition at line 496 of file chatform.cpp.

Here is the call graph for this function:

◆ onAvEnd

void ChatForm::onAvEnd ( uint32_t  friendId,
bool  error 
)
slot

Definition at line 353 of file chatform.cpp.

Here is the call graph for this function:

◆ onAvInvite

void ChatForm::onAvInvite ( uint32_t  friendId,
bool  video 
)
slot

Definition at line 306 of file chatform.cpp.

Here is the call graph for this function:

◆ onAvStart

void ChatForm::onAvStart ( uint32_t  friendId,
bool  video 
)
slot

Definition at line 336 of file chatform.cpp.

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

◆ onCallTriggered

void ChatForm::onCallTriggered ( )
privateslot

Definition at line 406 of file chatform.cpp.

Here is the call graph for this function:

◆ onCopyStatusMessage

void ChatForm::onCopyStatusMessage ( )
privateslot

Definition at line 636 of file chatform.cpp.

Here is the call graph for this function:

◆ onExtensionSupportChanged

void ChatForm::onExtensionSupportChanged ( ExtensionSet  extensions)
slot

Definition at line 249 of file chatform.cpp.

Here is the call graph for this function:

◆ onFileNameChanged

void ChatForm::onFileNameChanged ( const ToxPk friendPk)
slot

Definition at line 238 of file chatform.cpp.

Here is the call graph for this function:

◆ onFriendNameChanged

void ChatForm::onFriendNameChanged ( const QString &  name)
privateslot

Definition at line 482 of file chatform.cpp.

Here is the call graph for this function:

◆ onFriendStatusChanged

void ChatForm::onFriendStatusChanged ( const ToxPk friendPk,
Status::Status  status 
)
privateslot

Definition at line 456 of file chatform.cpp.

Here is the call graph for this function:

◆ onFriendTypingChanged

void ChatForm::onFriendTypingChanged ( quint32  friendId,
bool  isTyping 
)
privateslot

Definition at line 475 of file chatform.cpp.

Here is the call graph for this function:

◆ onMicMuteToggle

void ChatForm::onMicMuteToggle ( )
privateslot

Definition at line 442 of file chatform.cpp.

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

◆ onRejectCallTriggered

void ChatForm::onRejectCallTriggered ( )
privateslot

Definition at line 400 of file chatform.cpp.

Here is the call graph for this function:

◆ onScreenshotClicked

void ChatForm::onScreenshotClicked ( )
overrideprivateslot

Definition at line 574 of file chatform.cpp.

Here is the call graph for this function:

◆ onShowMessagesClicked

void ChatForm::onShowMessagesClicked ( )
slot

Definition at line 785 of file chatform.cpp.

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

◆ onSplitterMoved

void ChatForm::onSplitterMoved ( int  pos,
int  index 
)
slot

Definition at line 778 of file chatform.cpp.

Here is the caller graph for this function:

◆ onStatusMessage

void ChatForm::onStatusMessage ( const QString &  message)
privateslot

Definition at line 489 of file chatform.cpp.

Here is the call graph for this function:

◆ onTextEditChanged

void ChatForm::onTextEditChanged ( )
privateslot

Definition at line 254 of file chatform.cpp.

Here is the call graph for this function:

◆ onUpdateTime

void ChatForm::onUpdateTime ( )
privateslot

Definition at line 699 of file chatform.cpp.

Here is the caller graph for this function:

◆ onVideoCallTriggered

void ChatForm::onVideoCallTriggered ( )
privateslot

Definition at line 417 of file chatform.cpp.

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

◆ onVolMuteToggle

void ChatForm::onVolMuteToggle ( )
privateslot

Definition at line 449 of file chatform.cpp.

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

◆ outgoingNotification

void ChatForm::outgoingNotification ( )
signal
Here is the caller graph for this function:

◆ previewImage

void ChatForm::previewImage ( const QPixmap &  pixmap)
privateslot

Definition at line 589 of file chatform.cpp.

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

◆ rejectCall

void ChatForm::rejectCall ( uint32_t  friendId)
signal
Here is the caller graph for this function:

◆ reloadTheme

void ChatForm::reloadTheme ( )
finalslot

Definition at line 716 of file chatform.cpp.

Here is the call graph for this function:

◆ retranslateUi()

void ChatForm::retranslateUi ( )
private

Definition at line 731 of file chatform.cpp.

Here is the call graph for this function:

◆ sendImageFromPreview

void ChatForm::sendImageFromPreview ( )
privateslot

Definition at line 602 of file chatform.cpp.

Here is the call graph for this function:

◆ setFriendTyping()

void ChatForm::setFriendTyping ( bool  isTyping)

Definition at line 704 of file chatform.cpp.

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

◆ setStatusMessage()

void ChatForm::setStatusMessage ( const QString &  newMessage)

Definition at line 218 of file chatform.cpp.

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

◆ show()

void ChatForm::show ( ContentLayout contentLayout)
finalvirtual

Reimplemented from GenericChatForm.

Definition at line 711 of file chatform.cpp.

Here is the call graph for this function:

◆ showEvent()

void ChatForm::showEvent ( QShowEvent *  event)
finalprotected

Definition at line 721 of file chatform.cpp.

Here is the call graph for this function:

◆ showNetcam()

void ChatForm::showNetcam ( )
private

Definition at line 743 of file chatform.cpp.

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

◆ showOutgoingCall()

void ChatForm::showOutgoingCall ( bool  video)
private

Definition at line 372 of file chatform.cpp.

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

◆ startCounter()

void ChatForm::startCounter ( )
private

Definition at line 668 of file chatform.cpp.

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

◆ stopCounter()

void ChatForm::stopCounter ( bool  error = false)
private

Definition at line 680 of file chatform.cpp.

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

◆ stopNotification

void ChatForm::stopNotification ( )
signal
Here is the caller graph for this function:

◆ updateCallButtons()

void ChatForm::updateCallButtons ( )
private

Definition at line 431 of file chatform.cpp.

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

◆ updateFriendActivity

void ChatForm::updateFriendActivity ( Friend frnd)
signal
Here is the caller graph for this function:

◆ updateFriendActivityForFile

void ChatForm::updateFriendActivityForFile ( const ToxFile file)
privateslot

Definition at line 230 of file chatform.cpp.

Here is the call graph for this function:

◆ updateMuteMicButton()

void ChatForm::updateMuteMicButton ( )
private

Definition at line 646 of file chatform.cpp.

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

◆ updateMuteVolButton()

void ChatForm::updateMuteVolButton ( )
private

Definition at line 657 of file chatform.cpp.

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

Member Data Documentation

◆ ACTION_PREFIX

const QString ChatForm::ACTION_PREFIX = QStringLiteral("/me ")
static

Definition at line 58 of file chatform.h.

◆ callDuration

QLabel* ChatForm::callDuration
private

Definition at line 131 of file chatform.h.

◆ callDurationTimer

QTimer* ChatForm::callDurationTimer
private

Definition at line 132 of file chatform.h.

◆ copyStatusAction

QAction* ChatForm::copyStatusAction
private

Definition at line 135 of file chatform.h.

◆ core

Core& ChatForm::core
private

Definition at line 127 of file chatform.h.

◆ f

Friend* ChatForm::f
private

Definition at line 128 of file chatform.h.

◆ imagePreview

ImagePreviewButton* ChatForm::imagePreview
private

Definition at line 137 of file chatform.h.

◆ imagePreviewSource

QPixmap ChatForm::imagePreviewSource
private

Definition at line 136 of file chatform.h.

◆ isTyping

bool ChatForm::isTyping
private

Definition at line 138 of file chatform.h.

◆ lastCallIsVideo

bool ChatForm::lastCallIsVideo
private

Definition at line 139 of file chatform.h.

◆ netcam

std::unique_ptr<NetCamView> ChatForm::netcam
private

Definition at line 140 of file chatform.h.

◆ statusMessageLabel

CroppingLabel* ChatForm::statusMessageLabel
private

Definition at line 129 of file chatform.h.

◆ statusMessageMenu

QMenu ChatForm::statusMessageMenu
private

Definition at line 130 of file chatform.h.

◆ timeElapsed

QElapsedTimer ChatForm::timeElapsed
private

Definition at line 134 of file chatform.h.

◆ typingTimer

QTimer ChatForm::typingTimer
private

Definition at line 133 of file chatform.h.


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