summary refs log tree commit diff
path: root/src/ActiveCallBar.h
diff options
context:
space:
mode:
authortrilene <trilene@runbox.com>2020-07-22 21:15:45 -0400
committertrilene <trilene@runbox.com>2020-07-22 21:15:45 -0400
commit88cfa3a8fa7554ab545f6779f2dda9709f72fbbb (patch)
treea0259cfd76727b27dd1538860c229aaf08ba4131 /src/ActiveCallBar.h
parentUpdate mtxclient reference (diff)
downloadnheko-88cfa3a8fa7554ab545f6779f2dda9709f72fbbb.tar.xz
Polish voice call UI
Diffstat (limited to 'src/ActiveCallBar.h')
-rw-r--r--src/ActiveCallBar.h23
1 files changed, 19 insertions, 4 deletions
diff --git a/src/ActiveCallBar.h b/src/ActiveCallBar.h

index dd01e2ad..8440d7f3 100644 --- a/src/ActiveCallBar.h +++ b/src/ActiveCallBar.h
@@ -2,9 +2,12 @@ #include <QWidget> +#include "WebRTCSession.h" + class QHBoxLayout; class QLabel; -class QString; +class QTimer; +class Avatar; class FlatButton; class ActiveCallBar : public QWidget @@ -15,12 +18,24 @@ public: ActiveCallBar(QWidget *parent = nullptr); public slots: - void setCallParty(const QString &userid, const QString &displayName); + void update(WebRTCSession::State); + void setCallParty( + const QString &userid, + const QString &displayName, + const QString &roomName, + const QString &avatarUrl); private: - QHBoxLayout *topLayout_ = nullptr; + QHBoxLayout *layout_ = nullptr; + Avatar *avatar_ = nullptr; QLabel *callPartyLabel_ = nullptr; + QLabel *stateLabel_ = nullptr; + QLabel *durationLabel_ = nullptr; FlatButton *muteBtn_ = nullptr; - int buttonSize_ = 32; + int buttonSize_ = 22; bool muted_ = false; + qint64 callStartTime_ = 0; + QTimer *timer_ = nullptr; + + void setMuteIcon(bool muted); };