mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Call notifications
This commit is contained in:
parent
98f15af670
commit
755a5677a2
|
@ -226,6 +226,7 @@ void ChatForm::onAvInvite(int FriendId, int CallId, bool video)
|
||||||
videoButton->style()->polish(videoButton);
|
videoButton->style()->polish(videoButton);
|
||||||
connect(callButton, SIGNAL(clicked()), this, SLOT(onAnswerCallTriggered()));
|
connect(callButton, SIGNAL(clicked()), this, SLOT(onAnswerCallTriggered()));
|
||||||
}
|
}
|
||||||
|
addSystemInfoMessage(tr("%1 calling").arg(f->getName()), "white", QDateTime::currentDateTime());
|
||||||
|
|
||||||
Widget* w = Widget::getInstance();
|
Widget* w = Widget::getInstance();
|
||||||
if (!w->isFriendWidgetCurActiveWidget(f)|| w->isMinimized() || !w->isActiveWindow())
|
if (!w->isFriendWidgetCurActiveWidget(f)|| w->isMinimized() || !w->isActiveWindow())
|
||||||
|
@ -336,6 +337,7 @@ void ChatForm::onAvRinging(int FriendId, int CallId, bool video)
|
||||||
videoButton->style()->polish(videoButton);
|
videoButton->style()->polish(videoButton);
|
||||||
connect(callButton, SIGNAL(clicked()), this, SLOT(onCancelCallTriggered()));
|
connect(callButton, SIGNAL(clicked()), this, SLOT(onCancelCallTriggered()));
|
||||||
}
|
}
|
||||||
|
addSystemInfoMessage(tr("%1 calling").arg(f->getName()), "white", QDateTime::currentDateTime());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChatForm::onAvStarting(int FriendId, int CallId, bool video)
|
void ChatForm::onAvStarting(int FriendId, int CallId, bool video)
|
||||||
|
@ -386,7 +388,9 @@ void ChatForm::onAvEnding(int FriendId, int)
|
||||||
videoButton->disconnect();
|
videoButton->disconnect();
|
||||||
connect(callButton, SIGNAL(clicked()), this, SLOT(onCallTriggered()));
|
connect(callButton, SIGNAL(clicked()), this, SLOT(onCallTriggered()));
|
||||||
connect(videoButton, SIGNAL(clicked()), this, SLOT(onVideoCallTriggered()));
|
connect(videoButton, SIGNAL(clicked()), this, SLOT(onVideoCallTriggered()));
|
||||||
|
|
||||||
|
addSystemInfoMessage(tr("Call with %1 ended").arg(f->getName()), "white", QDateTime::currentDateTime());
|
||||||
|
|
||||||
netcam->hide();
|
netcam->hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -461,6 +465,8 @@ void ChatForm::onAvRejected(int FriendId, int)
|
||||||
videoButton->disconnect();
|
videoButton->disconnect();
|
||||||
connect(callButton, SIGNAL(clicked()), this, SLOT(onCallTriggered()));
|
connect(callButton, SIGNAL(clicked()), this, SLOT(onCallTriggered()));
|
||||||
connect(videoButton, SIGNAL(clicked()), this, SLOT(onVideoCallTriggered()));
|
connect(videoButton, SIGNAL(clicked()), this, SLOT(onVideoCallTriggered()));
|
||||||
|
|
||||||
|
addSystemInfoMessage(tr("Call rejected").arg(f->getName()), "white", QDateTime::currentDateTime());
|
||||||
|
|
||||||
netcam->hide();
|
netcam->hide();
|
||||||
}
|
}
|
||||||
|
|
|
@ -192,8 +192,9 @@ void GenericChatForm::onSaveLogClicked()
|
||||||
file.close();
|
file.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// THIS FUNCTION IS DEPRECATED
|
/**
|
||||||
/// The only reason it's still alive is because the groupchat API is a bit limited
|
* @deprecated The only reason it's still alive is because the groupchat API is a bit limited
|
||||||
|
*/
|
||||||
void GenericChatForm::addMessage(const QString& author, const QString &message, bool isAction, const QDateTime &datetime)
|
void GenericChatForm::addMessage(const QString& author, const QString &message, bool isAction, const QDateTime &datetime)
|
||||||
{
|
{
|
||||||
ChatActionPtr ca = genMessageActionAction(author, message, isAction, datetime);
|
ChatActionPtr ca = genMessageActionAction(author, message, isAction, datetime);
|
||||||
|
@ -212,8 +213,9 @@ void GenericChatForm::addSelfMessage(const QString &message, bool isAction, cons
|
||||||
chatWidget->insertMessage(ca);
|
chatWidget->insertMessage(ca);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// THIS FUNCTION IS DEPRECATED
|
/**
|
||||||
/// The only reason it's still alive is because the groupchat API is a bit limited
|
* @deprecated The only reason it's still alive is because the groupchat API is a bit limited
|
||||||
|
*/
|
||||||
void GenericChatForm::addAlertMessage(const QString& author, QString message, QDateTime datetime)
|
void GenericChatForm::addAlertMessage(const QString& author, QString message, QDateTime datetime)
|
||||||
{
|
{
|
||||||
QString date = datetime.toString(Settings::getInstance().getTimestampFormat());
|
QString date = datetime.toString(Settings::getInstance().getTimestampFormat());
|
||||||
|
@ -291,8 +293,9 @@ void GenericChatForm::clearChatArea(bool notinform)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// THIS FUNCTION IS DEPRECATED
|
/**
|
||||||
/// The only reason it's still alive is because the groupchat API is a bit limited
|
* @deprecated The only reason it's still alive is because the groupchat API is a bit limited
|
||||||
|
*/
|
||||||
ChatActionPtr GenericChatForm::genMessageActionAction(const QString &author, QString message, bool isAction, const QDateTime &datetime)
|
ChatActionPtr GenericChatForm::genMessageActionAction(const QString &author, QString message, bool isAction, const QDateTime &datetime)
|
||||||
{
|
{
|
||||||
if (earliestMessage == nullptr)
|
if (earliestMessage == nullptr)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user