matrixion/src/ActiveCallBar.h

41 lines
991 B
C
Raw Normal View History

2020-07-11 02:19:48 +03:00
#pragma once
#include <QWidget>
2020-07-23 04:15:45 +03:00
#include "WebRTCSession.h"
2020-07-11 02:19:48 +03:00
class QHBoxLayout;
class QLabel;
2020-07-23 04:15:45 +03:00
class QTimer;
class Avatar;
2020-07-11 02:19:48 +03:00
class FlatButton;
class ActiveCallBar : public QWidget
{
Q_OBJECT
public:
ActiveCallBar(QWidget *parent = nullptr);
public slots:
2020-07-23 04:15:45 +03:00
void update(WebRTCSession::State);
2020-08-01 21:31:10 +03:00
void setCallParty(const QString &userid,
const QString &displayName,
const QString &roomName,
const QString &avatarUrl);
2020-07-11 02:19:48 +03:00
private:
2020-07-23 04:15:45 +03:00
QHBoxLayout *layout_ = nullptr;
Avatar *avatar_ = nullptr;
2020-07-11 02:19:48 +03:00
QLabel *callPartyLabel_ = nullptr;
2020-07-23 04:15:45 +03:00
QLabel *stateLabel_ = nullptr;
QLabel *durationLabel_ = nullptr;
2020-07-11 02:19:48 +03:00
FlatButton *muteBtn_ = nullptr;
2020-07-23 04:15:45 +03:00
int buttonSize_ = 22;
2020-07-11 02:19:48 +03:00
bool muted_ = false;
2020-07-23 04:15:45 +03:00
qint64 callStartTime_ = 0;
QTimer *timer_ = nullptr;
void setMuteIcon(bool muted);
2020-07-11 02:19:48 +03:00
};