Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jami-client-windows
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
savoirfairelinux
jami-client-windows
Commits
ca027aba
Commit
ca027aba
authored
6 years ago
by
Isa
Committed by
Andreas Traczyk
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
fix: show duration of call during call
Change-Id: I6b4d8522bdf9554871314a22d49ff51002840931
parent
43865373
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
videooverlay.cpp
+36
-3
36 additions, 3 deletions
videooverlay.cpp
videooverlay.h
+6
-1
6 additions, 1 deletion
videooverlay.h
videoview.cpp
+1
-1
1 addition, 1 deletion
videoview.cpp
with
43 additions
and
5 deletions
videooverlay.cpp
+
36
−
3
View file @
ca027aba
...
@@ -31,7 +31,8 @@
...
@@ -31,7 +31,8 @@
VideoOverlay
::
VideoOverlay
(
QWidget
*
parent
)
:
VideoOverlay
::
VideoOverlay
(
QWidget
*
parent
)
:
QWidget
(
parent
),
QWidget
(
parent
),
ui
(
new
Ui
::
VideoOverlay
)
ui
(
new
Ui
::
VideoOverlay
),
oneSecondTimer_
(
new
QTimer
(
this
))
{
{
ui
->
setupUi
(
this
);
ui
->
setupUi
(
this
);
...
@@ -44,6 +45,12 @@ VideoOverlay::VideoOverlay(QWidget* parent) :
...
@@ -44,6 +45,12 @@ VideoOverlay::VideoOverlay(QWidget* parent) :
ui
->
noMicButton
->
setCheckable
(
true
);
ui
->
noMicButton
->
setCheckable
(
true
);
ui
->
onHoldLabel
->
setVisible
(
false
);
ui
->
onHoldLabel
->
setVisible
(
false
);
connect
(
LRCInstance
::
getCurrentCallModel
(),
&
lrc
::
api
::
NewCallModel
::
callStarted
,
[
this
](
const
std
::
string
&
tempCallId
)
{
callId
=
tempCallId
;
});
connect
(
oneSecondTimer_
,
&
QTimer
::
timeout
,
this
,
&
VideoOverlay
::
setTime
);
oneSecondTimer_
->
start
(
1000
);
}
}
VideoOverlay
::~
VideoOverlay
()
VideoOverlay
::~
VideoOverlay
()
...
@@ -58,9 +65,35 @@ VideoOverlay::setName(const QString& name)
...
@@ -58,9 +65,35 @@ VideoOverlay::setName(const QString& name)
}
}
void
void
VideoOverlay
::
setTime
(
const
QString
&
time
)
VideoOverlay
::
setTime
()
{
{
ui
->
timerLabel
->
setText
(
time
);
if
(
callId
.
empty
())
{
return
;
}
auto
callInfo
=
LRCInstance
::
getCurrentCallModel
()
->
getCall
(
callId
);
if
(
callInfo
.
status
==
lrc
::
api
::
call
::
Status
::
IN_PROGRESS
)
{
int
numSeconds
=
std
::
chrono
::
duration_cast
<
std
::
chrono
::
seconds
>
(
std
::
chrono
::
steady_clock
::
now
()
-
callInfo
.
startTime
).
count
();
QString
labelSec
;
QString
labelMin
;
int
numMinutes
=
numSeconds
/
60
;
int
remainder
=
numSeconds
-
numMinutes
*
60
;
if
(
remainder
<
10
)
{
labelSec
=
":0"
+
QString
::
number
(
remainder
);
}
else
{
labelSec
=
":"
+
QString
::
number
(
remainder
);
}
if
(
numMinutes
<
10
)
{
labelMin
=
"0"
+
QString
::
number
(
numMinutes
);
}
else
{
labelMin
=
QString
::
number
(
numMinutes
);
}
ui
->
timerLabel
->
setText
(
labelMin
+
labelSec
);
}
}
}
void
VideoOverlay
::
toggleContextButtons
(
bool
visible
)
void
VideoOverlay
::
toggleContextButtons
(
bool
visible
)
...
...
This diff is collapsed.
Click to expand it.
videooverlay.h
+
6
−
1
View file @
ca027aba
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
#include
<QWidget>
#include
<QWidget>
#include
<QMenu>
#include
<QMenu>
#include
<QTimer>
namespace
Ui
{
namespace
Ui
{
class
VideoOverlay
;
class
VideoOverlay
;
...
@@ -35,7 +36,6 @@ public:
...
@@ -35,7 +36,6 @@ public:
public:
public:
void
setName
(
const
QString
&
name
);
void
setName
(
const
QString
&
name
);
void
setTime
(
const
QString
&
time
);
inline
bool
isDialogVisible
(){
return
dialogVisible_
;
};
inline
bool
isDialogVisible
(){
return
dialogVisible_
;
};
void
toggleContextButtons
(
bool
visible
);
void
toggleContextButtons
(
bool
visible
);
void
setVideoMuteVisibility
(
bool
visible
);
void
setVideoMuteVisibility
(
bool
visible
);
...
@@ -43,6 +43,9 @@ public:
...
@@ -43,6 +43,9 @@ public:
void
simulateShowChatview
(
bool
checked
);
void
simulateShowChatview
(
bool
checked
);
bool
getShowChatView
();
bool
getShowChatView
();
public
slots
:
void
setTime
();
//UI SLOTS
//UI SLOTS
private
slots
:
private
slots
:
void
on_hangupButton_clicked
();
void
on_hangupButton_clicked
();
...
@@ -56,6 +59,8 @@ private slots:
...
@@ -56,6 +59,8 @@ private slots:
private
:
private
:
Ui
::
VideoOverlay
*
ui
;
Ui
::
VideoOverlay
*
ui
;
bool
dialogVisible_
=
false
;
bool
dialogVisible_
=
false
;
QTimer
*
oneSecondTimer_
;
std
::
string
callId
;
signals
:
signals
:
void
setChatVisibility
(
bool
visible
);
void
setChatVisibility
(
bool
visible
);
...
...
This diff is collapsed.
Click to expand it.
videoview.cpp
+
1
−
1
View file @
ca027aba
...
@@ -70,6 +70,7 @@ VideoView::VideoView(QWidget* parent) :
...
@@ -70,6 +70,7 @@ VideoView::VideoView(QWidget* parent) :
emit
this
->
setChatVisibility
(
visible
);
emit
this
->
setChatVisibility
(
visible
);
});
});
connect
(
overlay_
,
&
VideoOverlay
::
videoCfgBtnClicked
,
[
=
](){
emit
videoSettingsClicked
();});
connect
(
overlay_
,
&
VideoOverlay
::
videoCfgBtnClicked
,
[
=
](){
emit
videoSettingsClicked
();});
}
}
VideoView
::~
VideoView
()
VideoView
::~
VideoView
()
...
@@ -187,7 +188,6 @@ VideoView::updateCall()
...
@@ -187,7 +188,6 @@ VideoView::updateCall()
{
{
if
(
auto
call
=
CallModel
::
instance
().
selectedCall
())
{
if
(
auto
call
=
CallModel
::
instance
().
selectedCall
())
{
overlay_
->
setName
(
call
->
formattedName
());
overlay_
->
setName
(
call
->
formattedName
());
overlay_
->
setTime
(
call
->
length
());
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment