mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
closes tux3/qtox#850
This commit is contained in:
parent
0eba4fefca
commit
17561a8c3b
|
@ -68,7 +68,8 @@ ChatForm::ChatForm(Friend* chatFriend)
|
||||||
mainLayout->insertWidget(1, isTypingLabel);
|
mainLayout->insertWidget(1, isTypingLabel);
|
||||||
|
|
||||||
netcam = new NetCamView();
|
netcam = new NetCamView();
|
||||||
timer = nullptr;
|
callDurationTimer = nullptr;
|
||||||
|
disableCallButtonsTimer = nullptr;
|
||||||
|
|
||||||
headTextLayout->addWidget(statusMessageLabel);
|
headTextLayout->addWidget(statusMessageLabel);
|
||||||
headTextLayout->addStretch();
|
headTextLayout->addStretch();
|
||||||
|
@ -277,9 +278,7 @@ void ChatForm::onAvInvite(int FriendId, int CallId, bool video)
|
||||||
connect(callConfirm, &CallConfirmWidget::rejected, this, &ChatForm::onRejectCallTriggered);
|
connect(callConfirm, &CallConfirmWidget::rejected, this, &ChatForm::onRejectCallTriggered);
|
||||||
|
|
||||||
callButton->setObjectName("grey");
|
callButton->setObjectName("grey");
|
||||||
callButton->style()->polish(callButton);
|
|
||||||
videoButton->setObjectName("yellow");
|
videoButton->setObjectName("yellow");
|
||||||
videoButton->style()->polish(videoButton);
|
|
||||||
connect(videoButton, &QPushButton::clicked, this, &ChatForm::onAnswerCallTriggered);
|
connect(videoButton, &QPushButton::clicked, this, &ChatForm::onAnswerCallTriggered);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -290,12 +289,12 @@ void ChatForm::onAvInvite(int FriendId, int CallId, bool video)
|
||||||
connect(callConfirm, &CallConfirmWidget::accepted, this, &ChatForm::onAnswerCallTriggered);
|
connect(callConfirm, &CallConfirmWidget::accepted, this, &ChatForm::onAnswerCallTriggered);
|
||||||
connect(callConfirm, &CallConfirmWidget::rejected, this, &ChatForm::onRejectCallTriggered);
|
connect(callConfirm, &CallConfirmWidget::rejected, this, &ChatForm::onRejectCallTriggered);
|
||||||
|
|
||||||
callButton->setObjectName("yellow");
|
|
||||||
callButton->style()->polish(callButton);
|
callButton->style()->polish(callButton);
|
||||||
videoButton->setObjectName("grey");
|
|
||||||
videoButton->style()->polish(videoButton);
|
videoButton->style()->polish(videoButton);
|
||||||
connect(callButton, &QPushButton::clicked, this, &ChatForm::onAnswerCallTriggered);
|
connect(callButton, &QPushButton::clicked, this, &ChatForm::onAnswerCallTriggered);
|
||||||
}
|
}
|
||||||
|
callButton->style()->polish(callButton);
|
||||||
|
videoButton->style()->polish(videoButton);
|
||||||
|
|
||||||
addSystemInfoMessage(tr("%1 is calling").arg(f->getDisplayedName()), "white", QDateTime::currentDateTime());
|
addSystemInfoMessage(tr("%1 is calling").arg(f->getDisplayedName()), "white", QDateTime::currentDateTime());
|
||||||
|
|
||||||
|
@ -324,21 +323,21 @@ void ChatForm::onAvStart(int FriendId, int CallId, bool video)
|
||||||
if (video)
|
if (video)
|
||||||
{
|
{
|
||||||
callButton->setObjectName("grey");
|
callButton->setObjectName("grey");
|
||||||
callButton->style()->polish(callButton);
|
|
||||||
videoButton->setObjectName("red");
|
videoButton->setObjectName("red");
|
||||||
videoButton->style()->polish(videoButton);
|
connect(videoButton, SIGNAL(clicked()),
|
||||||
connect(videoButton, SIGNAL(clicked()), this, SLOT(onHangupCallTriggered()));
|
this, SLOT(onHangupCallTriggered()));
|
||||||
|
|
||||||
netcam->show(Core::getInstance()->getVideoSourceFromCall(CallId), f->getDisplayedName());
|
netcam->show(Core::getInstance()->getVideoSourceFromCall(CallId), f->getDisplayedName());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
callButton->setObjectName("red");
|
callButton->setObjectName("red");
|
||||||
callButton->style()->polish(callButton);
|
|
||||||
videoButton->setObjectName("grey");
|
videoButton->setObjectName("grey");
|
||||||
videoButton->style()->polish(videoButton);
|
connect(callButton, SIGNAL(clicked()),
|
||||||
connect(callButton, SIGNAL(clicked()), this, SLOT(onHangupCallTriggered()));
|
this, SLOT(onHangupCallTriggered()));
|
||||||
}
|
}
|
||||||
|
callButton->style()->polish(callButton);
|
||||||
|
videoButton->style()->polish(videoButton);
|
||||||
|
|
||||||
startCounter();
|
startCounter();
|
||||||
}
|
}
|
||||||
|
@ -355,20 +354,7 @@ void ChatForm::onAvCancel(int FriendId, int)
|
||||||
|
|
||||||
stopCounter();
|
stopCounter();
|
||||||
|
|
||||||
audioInputFlag = false;
|
enableCallButtons();
|
||||||
audioOutputFlag = false;
|
|
||||||
micButton->setObjectName("green");
|
|
||||||
micButton->style()->polish(micButton);
|
|
||||||
volButton->setObjectName("green");
|
|
||||||
volButton->style()->polish(volButton);
|
|
||||||
callButton->disconnect();
|
|
||||||
videoButton->disconnect();
|
|
||||||
callButton->setObjectName("green");
|
|
||||||
callButton->style()->polish(callButton);
|
|
||||||
videoButton->setObjectName("green");
|
|
||||||
videoButton->style()->polish(videoButton);
|
|
||||||
connect(callButton, SIGNAL(clicked()), this, SLOT(onCallTriggered()));
|
|
||||||
connect(videoButton, SIGNAL(clicked()), this, SLOT(onVideoCallTriggered()));
|
|
||||||
|
|
||||||
netcam->hide();
|
netcam->hide();
|
||||||
|
|
||||||
|
@ -385,21 +371,8 @@ void ChatForm::onAvEnd(int FriendId, int)
|
||||||
delete callConfirm;
|
delete callConfirm;
|
||||||
callConfirm = nullptr;
|
callConfirm = nullptr;
|
||||||
|
|
||||||
audioInputFlag = false;
|
enableCallButtons();
|
||||||
audioOutputFlag = false;
|
|
||||||
micButton->setObjectName("green");
|
|
||||||
micButton->style()->polish(micButton);
|
|
||||||
volButton->setObjectName("green");
|
|
||||||
volButton->style()->polish(volButton);
|
|
||||||
callButton->disconnect();
|
|
||||||
videoButton->disconnect();
|
|
||||||
callButton->setObjectName("green");
|
|
||||||
callButton->style()->polish(callButton);
|
|
||||||
videoButton->setObjectName("green");
|
|
||||||
videoButton->style()->polish(videoButton);
|
|
||||||
connect(callButton, SIGNAL(clicked()), this, SLOT(onCallTriggered()));
|
|
||||||
connect(videoButton, SIGNAL(clicked()), this, SLOT(onVideoCallTriggered()));
|
|
||||||
|
|
||||||
netcam->hide();
|
netcam->hide();
|
||||||
|
|
||||||
stopCounter();
|
stopCounter();
|
||||||
|
@ -421,7 +394,8 @@ void ChatForm::onAvRinging(int FriendId, int CallId, bool video)
|
||||||
callButton->style()->polish(callButton);
|
callButton->style()->polish(callButton);
|
||||||
videoButton->setObjectName("yellow");
|
videoButton->setObjectName("yellow");
|
||||||
videoButton->style()->polish(videoButton);
|
videoButton->style()->polish(videoButton);
|
||||||
connect(videoButton, SIGNAL(clicked()), this, SLOT(onCancelCallTriggered()));
|
connect(videoButton, SIGNAL(clicked()),
|
||||||
|
this, SLOT(onCancelCallTriggered()));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -429,7 +403,8 @@ void ChatForm::onAvRinging(int FriendId, int CallId, bool video)
|
||||||
callButton->style()->polish(callButton);
|
callButton->style()->polish(callButton);
|
||||||
videoButton->setObjectName("grey");
|
videoButton->setObjectName("grey");
|
||||||
videoButton->style()->polish(videoButton);
|
videoButton->style()->polish(videoButton);
|
||||||
connect(callButton, SIGNAL(clicked()), this, SLOT(onCancelCallTriggered()));
|
connect(callButton, SIGNAL(clicked()),
|
||||||
|
this, SLOT(onCancelCallTriggered()));
|
||||||
}
|
}
|
||||||
|
|
||||||
addSystemInfoMessage(tr("Calling to %1").arg(f->getDisplayedName()), "white", QDateTime::currentDateTime());
|
addSystemInfoMessage(tr("Calling to %1").arg(f->getDisplayedName()), "white", QDateTime::currentDateTime());
|
||||||
|
@ -476,22 +451,7 @@ void ChatForm::onAvEnding(int FriendId, int)
|
||||||
delete callConfirm;
|
delete callConfirm;
|
||||||
callConfirm = nullptr;
|
callConfirm = nullptr;
|
||||||
|
|
||||||
audioInputFlag = false;
|
enableCallButtons();
|
||||||
audioOutputFlag = false;
|
|
||||||
micButton->setObjectName("green");
|
|
||||||
micButton->style()->polish(micButton);
|
|
||||||
volButton->setObjectName("green");
|
|
||||||
volButton->style()->polish(volButton);
|
|
||||||
callButton->disconnect();
|
|
||||||
videoButton->disconnect();
|
|
||||||
callButton->setObjectName("green");
|
|
||||||
callButton->style()->polish(callButton);
|
|
||||||
callButton->disconnect();
|
|
||||||
videoButton->setObjectName("green");
|
|
||||||
videoButton->style()->polish(videoButton);
|
|
||||||
videoButton->disconnect();
|
|
||||||
connect(callButton, SIGNAL(clicked()), this, SLOT(onCallTriggered()));
|
|
||||||
connect(videoButton, SIGNAL(clicked()), this, SLOT(onVideoCallTriggered()));
|
|
||||||
|
|
||||||
netcam->hide();
|
netcam->hide();
|
||||||
|
|
||||||
|
@ -508,23 +468,8 @@ void ChatForm::onAvRequestTimeout(int FriendId, int)
|
||||||
delete callConfirm;
|
delete callConfirm;
|
||||||
callConfirm = nullptr;
|
callConfirm = nullptr;
|
||||||
|
|
||||||
audioInputFlag = false;
|
enableCallButtons();
|
||||||
audioOutputFlag = false;
|
|
||||||
micButton->setObjectName("green");
|
|
||||||
micButton->style()->polish(micButton);
|
|
||||||
volButton->setObjectName("green");
|
|
||||||
volButton->style()->polish(volButton);
|
|
||||||
callButton->disconnect();
|
|
||||||
videoButton->disconnect();
|
|
||||||
callButton->setObjectName("green");
|
|
||||||
callButton->style()->polish(callButton);
|
|
||||||
callButton->disconnect();
|
|
||||||
videoButton->setObjectName("green");
|
|
||||||
videoButton->style()->polish(videoButton);
|
|
||||||
videoButton->disconnect();
|
|
||||||
connect(callButton, SIGNAL(clicked()), this, SLOT(onCallTriggered()));
|
|
||||||
connect(videoButton, SIGNAL(clicked()), this, SLOT(onVideoCallTriggered()));
|
|
||||||
|
|
||||||
netcam->hide();
|
netcam->hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -537,23 +482,8 @@ void ChatForm::onAvPeerTimeout(int FriendId, int)
|
||||||
|
|
||||||
delete callConfirm;
|
delete callConfirm;
|
||||||
callConfirm = nullptr;
|
callConfirm = nullptr;
|
||||||
|
|
||||||
audioInputFlag = false;
|
enableCallButtons();
|
||||||
audioOutputFlag = false;
|
|
||||||
micButton->setObjectName("green");
|
|
||||||
micButton->style()->polish(micButton);
|
|
||||||
volButton->setObjectName("green");
|
|
||||||
volButton->style()->polish(volButton);
|
|
||||||
callButton->disconnect();
|
|
||||||
videoButton->disconnect();
|
|
||||||
callButton->setObjectName("green");
|
|
||||||
callButton->style()->polish(callButton);
|
|
||||||
callButton->disconnect();
|
|
||||||
videoButton->setObjectName("green");
|
|
||||||
videoButton->style()->polish(videoButton);
|
|
||||||
videoButton->disconnect();
|
|
||||||
connect(callButton, SIGNAL(clicked()), this, SLOT(onCallTriggered()));
|
|
||||||
connect(videoButton, SIGNAL(clicked()), this, SLOT(onVideoCallTriggered()));
|
|
||||||
|
|
||||||
netcam->hide();
|
netcam->hide();
|
||||||
}
|
}
|
||||||
|
@ -568,22 +498,7 @@ void ChatForm::onAvRejected(int FriendId, int)
|
||||||
delete callConfirm;
|
delete callConfirm;
|
||||||
callConfirm = nullptr;
|
callConfirm = nullptr;
|
||||||
|
|
||||||
audioInputFlag = false;
|
enableCallButtons();
|
||||||
audioOutputFlag = false;
|
|
||||||
micButton->setObjectName("green");
|
|
||||||
micButton->style()->polish(micButton);
|
|
||||||
volButton->setObjectName("green");
|
|
||||||
volButton->style()->polish(volButton);
|
|
||||||
callButton->disconnect();
|
|
||||||
videoButton->disconnect();
|
|
||||||
callButton->setObjectName("green");
|
|
||||||
callButton->style()->polish(callButton);
|
|
||||||
callButton->disconnect();
|
|
||||||
videoButton->setObjectName("green");
|
|
||||||
videoButton->style()->polish(videoButton);
|
|
||||||
videoButton->disconnect();
|
|
||||||
connect(callButton, SIGNAL(clicked()), this, SLOT(onCallTriggered()));
|
|
||||||
connect(videoButton, SIGNAL(clicked()), this, SLOT(onVideoCallTriggered()));
|
|
||||||
|
|
||||||
addSystemInfoMessage(tr("Call rejected"), "white", QDateTime::currentDateTime());
|
addSystemInfoMessage(tr("Call rejected"), "white", QDateTime::currentDateTime());
|
||||||
|
|
||||||
|
@ -629,10 +544,6 @@ void ChatForm::onHangupCallTriggered()
|
||||||
audioInputFlag = false;
|
audioInputFlag = false;
|
||||||
audioOutputFlag = false;
|
audioOutputFlag = false;
|
||||||
emit hangupCall(callId);
|
emit hangupCall(callId);
|
||||||
micButton->setObjectName("green");
|
|
||||||
micButton->style()->polish(micButton);
|
|
||||||
volButton->setObjectName("green");
|
|
||||||
volButton->style()->polish(volButton);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChatForm::onRejectCallTriggered()
|
void ChatForm::onRejectCallTriggered()
|
||||||
|
@ -648,10 +559,9 @@ void ChatForm::onRejectCallTriggered()
|
||||||
audioInputFlag = false;
|
audioInputFlag = false;
|
||||||
audioOutputFlag = false;
|
audioOutputFlag = false;
|
||||||
emit rejectCall(callId);
|
emit rejectCall(callId);
|
||||||
micButton->setObjectName("green");
|
|
||||||
micButton->style()->polish(micButton);
|
enableCallButtons();
|
||||||
volButton->setObjectName("green");
|
|
||||||
volButton->style()->polish(volButton);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChatForm::onCallTriggered()
|
void ChatForm::onCallTriggered()
|
||||||
|
@ -686,37 +596,77 @@ void ChatForm::onAvCallFailed(int FriendId)
|
||||||
delete callConfirm;
|
delete callConfirm;
|
||||||
callConfirm = nullptr;
|
callConfirm = nullptr;
|
||||||
|
|
||||||
audioInputFlag = false;
|
enableCallButtons();
|
||||||
audioOutputFlag = false;
|
|
||||||
callButton->disconnect();
|
|
||||||
videoButton->disconnect();
|
|
||||||
connect(callButton, SIGNAL(clicked()), this, SLOT(onCallTriggered()));
|
|
||||||
connect(videoButton, SIGNAL(clicked()), this, SLOT(onVideoCallTriggered()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChatForm::onCancelCallTriggered()
|
void ChatForm::onCancelCallTriggered()
|
||||||
{
|
{
|
||||||
qDebug() << "onCancelCallTriggered";
|
qDebug() << "onCancelCallTriggered";
|
||||||
|
|
||||||
|
enableCallButtons();
|
||||||
|
|
||||||
|
netcam->hide();
|
||||||
|
emit cancelCall(callId, f->getFriendID());
|
||||||
|
}
|
||||||
|
|
||||||
|
void ChatForm::enableCallButtons()
|
||||||
|
{
|
||||||
|
qDebug() << "enableCallButtons";
|
||||||
|
|
||||||
|
audioInputFlag = false;
|
||||||
|
audioOutputFlag = false;
|
||||||
|
|
||||||
|
micButton->setObjectName("grey");
|
||||||
|
micButton->style()->polish(micButton);
|
||||||
|
micButton->disconnect();
|
||||||
|
volButton->setObjectName("grey");
|
||||||
|
volButton->style()->polish(volButton);
|
||||||
|
volButton->disconnect();
|
||||||
|
|
||||||
|
callButton->setObjectName("grey");
|
||||||
|
callButton->style()->polish(callButton);
|
||||||
|
callButton->disconnect();
|
||||||
|
videoButton->setObjectName("grey");
|
||||||
|
videoButton->style()->polish(videoButton);
|
||||||
|
videoButton->disconnect();
|
||||||
|
|
||||||
|
if(disableCallButtonsTimer == nullptr)
|
||||||
|
{
|
||||||
|
disableCallButtonsTimer = new QTimer();
|
||||||
|
connect(disableCallButtonsTimer, SIGNAL(timeout()),
|
||||||
|
this, SLOT(onEnableCallButtons()));
|
||||||
|
disableCallButtonsTimer->start(1500); // 1.5sec
|
||||||
|
qDebug() << "timer started!!";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void ChatForm::onEnableCallButtons()
|
||||||
|
{
|
||||||
|
qDebug() << "onEnableCallButtons";
|
||||||
audioInputFlag = false;
|
audioInputFlag = false;
|
||||||
audioOutputFlag = false;
|
audioOutputFlag = false;
|
||||||
micButton->setObjectName("green");
|
micButton->setObjectName("green");
|
||||||
micButton->style()->polish(micButton);
|
micButton->style()->polish(micButton);
|
||||||
volButton->setObjectName("green");
|
volButton->setObjectName("green");
|
||||||
volButton->style()->polish(volButton);
|
volButton->style()->polish(volButton);
|
||||||
callButton->disconnect();
|
|
||||||
videoButton->disconnect();
|
|
||||||
callButton->setObjectName("green");
|
callButton->setObjectName("green");
|
||||||
callButton->style()->polish(callButton);
|
callButton->style()->polish(callButton);
|
||||||
callButton->disconnect();
|
|
||||||
videoButton->setObjectName("green");
|
videoButton->setObjectName("green");
|
||||||
videoButton->style()->polish(videoButton);
|
videoButton->style()->polish(videoButton);
|
||||||
videoButton->disconnect();
|
|
||||||
connect(callButton, SIGNAL(clicked()), this, SLOT(onCallTriggered()));
|
connect(callButton, SIGNAL(clicked()),
|
||||||
connect(videoButton, SIGNAL(clicked()), this, SLOT(onVideoCallTriggered()));
|
this, SLOT(onCallTriggered()));
|
||||||
|
connect(videoButton, SIGNAL(clicked()),
|
||||||
netcam->hide();
|
this, SLOT(onVideoCallTriggered()));
|
||||||
emit cancelCall(callId, f->getFriendID());
|
connect(micButton, SIGNAL(clicked()),
|
||||||
|
this, SLOT(onMicMuteToggle()));
|
||||||
|
connect(volButton, SIGNAL(clicked()),
|
||||||
|
this, SLOT(onVolMuteToggle()));
|
||||||
|
|
||||||
|
disableCallButtonsTimer->stop();
|
||||||
|
disableCallButtonsTimer = nullptr;
|
||||||
|
delete disableCallButtonsTimer;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChatForm::onMicMuteToggle()
|
void ChatForm::onMicMuteToggle()
|
||||||
|
@ -898,11 +848,11 @@ void ChatForm::onLoadHistory()
|
||||||
|
|
||||||
void ChatForm::startCounter()
|
void ChatForm::startCounter()
|
||||||
{
|
{
|
||||||
if (!timer)
|
if (!callDurationTimer)
|
||||||
{
|
{
|
||||||
timer = new QTimer();
|
callDurationTimer = new QTimer();
|
||||||
connect(timer, SIGNAL(timeout()), this, SLOT(updateTime()));
|
connect(callDurationTimer, SIGNAL(timeout()), this, SLOT(onUpdateTime()));
|
||||||
timer->start(1000);
|
callDurationTimer->start(1000);
|
||||||
timeElapsed.start();
|
timeElapsed.start();
|
||||||
callDuration->show();
|
callDuration->show();
|
||||||
}
|
}
|
||||||
|
@ -910,20 +860,21 @@ void ChatForm::startCounter()
|
||||||
|
|
||||||
void ChatForm::stopCounter()
|
void ChatForm::stopCounter()
|
||||||
{
|
{
|
||||||
if (timer)
|
if (callDurationTimer)
|
||||||
{
|
{
|
||||||
addSystemInfoMessage(tr("Call with %1 ended. %2").arg(f->getDisplayedName(),
|
addSystemInfoMessage(tr("Call with %1 ended. %2").arg(f->getDisplayedName(),
|
||||||
secondsToDHMS(timeElapsed.elapsed()/1000)),
|
secondsToDHMS(timeElapsed.elapsed()/1000)),
|
||||||
"white", QDateTime::currentDateTime());
|
"white", QDateTime::currentDateTime());
|
||||||
timer->stop();
|
callDurationTimer->stop();
|
||||||
callDuration->setText("");
|
callDuration->setText("");
|
||||||
callDuration->hide();
|
callDuration->hide();
|
||||||
timer = nullptr;
|
callDurationTimer = nullptr;
|
||||||
delete timer;
|
|
||||||
|
delete callDurationTimer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChatForm::updateTime()
|
void ChatForm::onUpdateTime()
|
||||||
{
|
{
|
||||||
callDuration->setText(secondsToDHMS(timeElapsed.elapsed()/1000));
|
callDuration->setText(secondsToDHMS(timeElapsed.elapsed()/1000));
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,10 +19,11 @@
|
||||||
|
|
||||||
#include "genericchatform.h"
|
#include "genericchatform.h"
|
||||||
#include "src/corestructs.h"
|
#include "src/corestructs.h"
|
||||||
|
#include <QSet>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QElapsedTimer>
|
#include <QElapsedTimer>
|
||||||
#include <QSet>
|
|
||||||
|
|
||||||
struct Friend;
|
struct Friend;
|
||||||
class FileTransferInstance;
|
class FileTransferInstance;
|
||||||
|
@ -93,7 +94,8 @@ private slots:
|
||||||
void onFileTansBtnClicked(QString widgetName, QString buttonName);
|
void onFileTansBtnClicked(QString widgetName, QString buttonName);
|
||||||
void onFileSendFailed(int FriendId, const QString &fname);
|
void onFileSendFailed(int FriendId, const QString &fname);
|
||||||
void onLoadHistory();
|
void onLoadHistory();
|
||||||
void updateTime();
|
void onUpdateTime();
|
||||||
|
void onEnableCallButtons();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// drag & drop
|
// drag & drop
|
||||||
|
@ -108,10 +110,11 @@ private:
|
||||||
NetCamView* netcam;
|
NetCamView* netcam;
|
||||||
int callId;
|
int callId;
|
||||||
QLabel *callDuration;
|
QLabel *callDuration;
|
||||||
QTimer *timer;
|
QTimer *callDurationTimer;
|
||||||
|
QTimer typingTimer;
|
||||||
|
QTimer *disableCallButtonsTimer;
|
||||||
QElapsedTimer timeElapsed;
|
QElapsedTimer timeElapsed;
|
||||||
QLabel *isTypingLabel;
|
QLabel *isTypingLabel;
|
||||||
QTimer typingTimer;
|
|
||||||
|
|
||||||
QHash<uint, FileTransferInstance*> ftransWidgets;
|
QHash<uint, FileTransferInstance*> ftransWidgets;
|
||||||
void startCounter();
|
void startCounter();
|
||||||
|
@ -120,6 +123,7 @@ private:
|
||||||
QHash<int, int> receipts;
|
QHash<int, int> receipts;
|
||||||
QMap<int, MessageActionPtr> undeliveredMsgs;
|
QMap<int, MessageActionPtr> undeliveredMsgs;
|
||||||
CallConfirmWidget *callConfirm;
|
CallConfirmWidget *callConfirm;
|
||||||
|
void enableCallButtons();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // CHATFORM_H
|
#endif // CHATFORM_H
|
||||||
|
|
|
@ -23,6 +23,16 @@ QPushButton#red
|
||||||
height: 18px;
|
height: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QPushButton#grey
|
||||||
|
{
|
||||||
|
background-color: transparent;
|
||||||
|
background-image: url(":/ui/volButton/volButtonDisabled.png");
|
||||||
|
background-repeat: none;
|
||||||
|
border: none;
|
||||||
|
width: 22px;
|
||||||
|
height: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
QPushButton:focus {
|
QPushButton:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user