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
8f886cb9
Commit
8f886cb9
authored
May 30, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(ui/modules/Linphone/Chat/Message): supports text to speech
parent
33987a9c
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
24 additions
and
22 deletions
+24
-22
CMakeLists.txt
linphone-desktop/CMakeLists.txt
+1
-1
en.ts
linphone-desktop/assets/languages/en.ts
+2
-5
fr.ts
linphone-desktop/assets/languages/fr.ts
+2
-5
resources.qrc
linphone-desktop/resources.qrc
+0
-1
App.cpp
linphone-desktop/src/app/App.cpp
+3
-0
App.hpp
linphone-desktop/src/app/App.hpp
+11
-0
Message.qml
linphone-desktop/ui/modules/Linphone/Chat/Message.qml
+5
-0
MessageMenu.qml
linphone-desktop/ui/modules/Linphone/Chat/MessageMenu.qml
+0
-10
No files found.
linphone-desktop/CMakeLists.txt
View file @
8f886cb9
...
...
@@ -74,7 +74,7 @@ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG -DQT_QML_DEBUG -DQT_
# Define packages, libs, sources, headers, resources and languages.
# ------------------------------------------------------------------------------
set
(
QT5_PACKAGES Core Gui Quick Widgets QuickControls2 Svg LinguistTools Concurrent Network
)
set
(
QT5_PACKAGES Core Gui Quick Widgets QuickControls2 Svg LinguistTools Concurrent Network
TextToSpeech
)
if
(
LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS
)
include
(
"
${
EP_linphone_CONFIG_DIR
}
/LinphoneConfig.cmake"
)
...
...
linphone-desktop/assets/languages/en.ts
View file @
8f886cb9
...
...
@@ -828,12 +828,9 @@ your friend's SIP address or username.</translation>
<
source
>
menuCopy
<
/source
>
<
translation
>
Copy
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
MessageMenu
<
/name
>
<
message
>
<
source
>
copy
<
/source
>
<
translation
>
Copy
<
/translation
>
<
source
>
menuPlayMe
<
/source
>
<
translation
>
Play
me
!
<
/translation
>
<
/message
>
<
/context
>
<
context
>
...
...
linphone-desktop/assets/languages/fr.ts
View file @
8f886cb9
...
...
@@ -827,12 +827,9 @@ un chat ou ajouter un contact.</translation>
<
source
>
menuCopy
<
/source
>
<
translation
>
Copier
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
MessageMenu
<
/name
>
<
message
>
<
source
>
copy
<
/source
>
<
translation
type
=
"
unfinished
"
>
<
/translation
>
<
source
>
menuPlayMe
<
/source
>
<
translation
>
Joue
-
moi
!
<
/translation
>
<
/message
>
<
/context
>
<
context
>
...
...
linphone-desktop/resources.qrc
View file @
8f886cb9
...
...
@@ -314,7 +314,6 @@
<file>
ui/modules/Linphone/Chat/FileMessage.qml
</file>
<file>
ui/modules/Linphone/Chat/IncomingMessage.qml
</file>
<file>
ui/modules/Linphone/Chat/Message.js
</file>
<file>
ui/modules/Linphone/Chat/MessageMenu.qml
</file>
<file>
ui/modules/Linphone/Chat/Message.qml
</file>
<file>
ui/modules/Linphone/Chat/OutgoingMessage.qml
</file>
<file>
ui/modules/Linphone/Codecs/CodecAttribute.qml
</file>
...
...
linphone-desktop/src/app/App.cpp
View file @
8f886cb9
...
...
@@ -171,6 +171,9 @@ void App::initContentApp () {
mEngine
->
addImageProvider
(
AvatarProvider
::
PROVIDER_ID
,
new
AvatarProvider
());
mEngine
->
addImageProvider
(
ThumbnailProvider
::
PROVIDER_ID
,
new
ThumbnailProvider
());
mTextToSpeech
=
new
QTextToSpeech
(
this
);
QQmlEngine
::
setObjectOwnership
(
mTextToSpeech
,
QQmlEngine
::
CppOwnership
);
registerTypes
();
registerSharedTypes
();
...
...
linphone-desktop/src/app/App.hpp
View file @
8f886cb9
...
...
@@ -26,6 +26,7 @@
#include <QCommandLineParser>
#include <QQmlApplicationEngine>
#include <QQuickWindow>
#include <QTextToSpeech>
#include "../components/notifier/Notifier.hpp"
#include "../externals/single-application/SingleApplication.hpp"
...
...
@@ -44,6 +45,8 @@ class App : public SingleApplication {
Q_PROPERTY
(
QVariantList
availableLocales
READ
getAvailableLocales
CONSTANT
);
Q_PROPERTY
(
QString
qtVersion
READ
getQtVersion
CONSTANT
);
Q_PROPERTY
(
QTextToSpeech
*
textToSpeech
READ
getTextToSpeech
CONSTANT
);
public:
App
(
int
&
argc
,
char
*
argv
[]);
~
App
();
...
...
@@ -86,6 +89,10 @@ signals:
void
configLocaleChanged
(
const
QString
&
locale
);
private:
QTextToSpeech
*
getTextToSpeech
()
const
{
return
mTextToSpeech
;
}
void
registerTypes
();
void
registerSharedTypes
();
void
setTrayIcon
();
...
...
@@ -111,6 +118,8 @@ private:
QVariantList
mAvailableLocales
;
QString
mLocale
;
QTextToSpeech
*
mTextToSpeech
=
nullptr
;
QQmlApplicationEngine
*
mEngine
=
nullptr
;
DefaultTranslator
*
mTranslator
=
nullptr
;
...
...
@@ -120,4 +129,6 @@ private:
QQuickWindow
*
mSettingsWindow
=
nullptr
;
};
Q_DECLARE_METATYPE
(
QTextToSpeech
*
);
#endif // APP_H_
linphone-desktop/ui/modules/Linphone/Chat/Message.qml
View file @
8f886cb9
...
...
@@ -74,6 +74,11 @@ Item {
text
:
qsTr
(
'
menuCopy
'
)
onTriggered
:
Clipboard
.
text
=
$chatEntry
.
content
}
MenuItem
{
text
:
qsTr
(
'
menuPlayMe
'
)
onTriggered
:
App
.
textToSpeech
.
say
(
$chatEntry
.
content
)
}
}
// Handle hovered link.
...
...
linphone-desktop/ui/modules/Linphone/Chat/MessageMenu.qml
deleted
100644 → 0
View file @
33987a9c
import
QtQuick
2.7
import
QtQuick
.
Controls
2.1
// =============================================================================
Menu
{
MenuItem
{
text
:
qsTr
(
'
copy
'
)
}
}
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