Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linphone-desktop
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
linphone-desktop
Commits
e56412e9
Commit
e56412e9
authored
Apr 18, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(ui/modules/Linphone/TelKeypad/TelKeypad): supports color on click
parent
6c29ac7c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
8 deletions
+19
-8
CallModel.cpp
linphone-desktop/src/components/call/CallModel.cpp
+1
-0
TelKeypad.qml
linphone-desktop/ui/modules/Linphone/TelKeypad/TelKeypad.qml
+16
-7
TelKeypadButton.qml
...desktop/ui/modules/Linphone/TelKeypad/TelKeypadButton.qml
+2
-1
No files found.
linphone-desktop/src/components/call/CallModel.cpp
View file @
e56412e9
...
...
@@ -385,5 +385,6 @@ bool CallModel::getRecording () const {
// -----------------------------------------------------------------------------
void
CallModel
::
sendDtmf
(
const
QString
&
dtmf
)
{
qInfo
()
<<
QStringLiteral
(
"Send dtmf: `%1`."
).
arg
(
dtmf
);
mLinphoneCall
->
sendDtmf
(
dtmf
.
constData
()[
0
].
toLatin1
());
}
linphone-desktop/ui/modules/Linphone/TelKeypad/TelKeypad.qml
View file @
e56412e9
...
...
@@ -3,6 +3,7 @@ import QtQuick.Layouts 1.3
import
Common
1.0
import
Linphone
.
Styles
1.0
import
Utils
1.0
// =============================================================================
...
...
@@ -71,11 +72,7 @@ Rectangle {
icon
:
modelData
.
icon
||
''
text
:
modelData
.
text
onClicked
:
{
var
text
=
modelData
.
text
console
.
info
(
'
Send dtmf:
'
+
text
)
telKeypad
.
call
.
sendDtmf
(
text
)
}
onClicked
:
telKeypad
.
call
.
sendDtmf
(
modelData
.
text
)
}
}
}
...
...
@@ -87,6 +84,8 @@ Rectangle {
readonly
property
int
delta
:
5
property
var
_timeout
property
int
_id
property
var
_mouseX
property
var
_mouseY
...
...
@@ -103,12 +102,22 @@ Rectangle {
onPressed
:
{
_mouseX
=
mouse
.
x
_mouseY
=
mouse
.
y
_id
=
parseInt
(
_mouseX
/
(
parent
.
width
/
grid
.
columns
))
+
parseInt
(
_mouseY
/
(
parent
.
height
/
grid
.
rows
))
*
grid
.
columns
}
onReleased
:
{
if
(
Math
.
abs
(
_mouseX
-
mouse
.
x
)
<=
delta
&&
Math
.
abs
(
_mouseY
-
mouse
.
y
)
<=
delta
)
{
var
id
=
parseInt
(
_mouseX
/
(
parent
.
width
/
grid
.
columns
))
+
parseInt
(
_mouseY
/
(
parent
.
height
/
grid
.
rows
))
*
grid
.
columns
grid
.
children
[
id
].
clicked
()
grid
.
children
[
_id
].
color
=
TelKeypadStyle
.
button
.
color
.
pressed
grid
.
children
[
_id
].
clicked
()
if
(
_timeout
)
{
Utils
.
clearTimeout
(
_timeout
)
}
_timeout
=
Utils
.
setTimeout
(
this
,
100
,
(
function
(
id
)
{
grid
.
children
[
id
].
color
=
TelKeypadStyle
.
button
.
color
.
normal
}).
bind
(
this
,
_id
))
}
}
}
...
...
linphone-desktop/ui/modules/Linphone/TelKeypad/TelKeypadButton.qml
View file @
e56412e9
...
...
@@ -8,6 +8,7 @@ import Linphone.Styles 1.0
Item
{
id
:
button
property
color
color
:
TelKeypadStyle
.
button
.
color
.
normal
property
string
icon
:
''
property
string
text
:
''
...
...
@@ -19,7 +20,7 @@ Item {
anchors.fill
:
parent
background
:
Rectangle
{
color
:
TelKeypadStyle
.
button
.
color
.
normal
color
:
button
.
color
}
contentItem
:
Text
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment