mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-04-27 10:08:41 +00:00
Add QRCode feature for attaching accounts.
This commit is contained in:
parent
897af6ed15
commit
8fa1c028fc
46 changed files with 1030 additions and 137 deletions
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
.job-macosx-desktop:
|
.job-macosx-desktop:
|
||||||
stage: build
|
stage: build
|
||||||
tags: [ "macosx-xcode11" ]
|
tags: [ "macmini-m1-xcode13" ]
|
||||||
script:
|
script:
|
||||||
- *build_all_script
|
- *build_all_script
|
||||||
variables:
|
variables:
|
||||||
|
|
@ -88,7 +88,7 @@ job-macosx-ninja-novideo:
|
||||||
|
|
||||||
job-macosx-makefile-package:
|
job-macosx-makefile-package:
|
||||||
stage: package
|
stage: package
|
||||||
tags: [ "macosx-xcode11" ]
|
tags: [ "macmini-m1-xcode13" ]
|
||||||
dependencies: []
|
dependencies: []
|
||||||
only:
|
only:
|
||||||
variables:
|
variables:
|
||||||
|
|
@ -97,6 +97,7 @@ job-macosx-makefile-package:
|
||||||
- $DEPLOY_MACOSX
|
- $DEPLOY_MACOSX
|
||||||
variables:
|
variables:
|
||||||
CMAKE_OPTIONS: -DENABLE_APP_PACKAGING=YES -DENABLE_G729=ON -DLINPHONE_SDK_MAKE_RELEASE_FILE_URL=$MAKE_RELEASE_FILE_URL/$MACOSX_PLATFORM/$APP_FOLDER
|
CMAKE_OPTIONS: -DENABLE_APP_PACKAGING=YES -DENABLE_G729=ON -DLINPHONE_SDK_MAKE_RELEASE_FILE_URL=$MAKE_RELEASE_FILE_URL/$MACOSX_PLATFORM/$APP_FOLDER
|
||||||
|
LINPHONESDK_MACOS_ARCHS: "x86_64,arm64"
|
||||||
extends: job-macosx-makefile
|
extends: job-macosx-makefile
|
||||||
script:
|
script:
|
||||||
- *build_all_script
|
- *build_all_script
|
||||||
|
|
@ -109,7 +110,7 @@ job-macosx-makefile-package:
|
||||||
|
|
||||||
job-macosx-codesigning:
|
job-macosx-codesigning:
|
||||||
stage: signing
|
stage: signing
|
||||||
tags: [ "macosx-xcode11" ]
|
tags: [ "macmini-m1-xcode13" ]
|
||||||
needs:
|
needs:
|
||||||
- job-macosx-makefile-package
|
- job-macosx-makefile-package
|
||||||
only:
|
only:
|
||||||
|
|
@ -134,7 +135,7 @@ job-macosx-codesigning:
|
||||||
|
|
||||||
job-macosx-makefile-deploy:
|
job-macosx-makefile-deploy:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
tags: [ "macosx-xcode11" ]
|
tags: [ "macmini-m1-xcode13" ]
|
||||||
needs:
|
needs:
|
||||||
- job-macosx-codesigning
|
- job-macosx-codesigning
|
||||||
only:
|
only:
|
||||||
|
|
@ -149,7 +150,7 @@ job-macosx-makefile-deploy:
|
||||||
|
|
||||||
job-macosx-makefile-plugins-deploy:
|
job-macosx-makefile-plugins-deploy:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
tags: [ "macosx-xcode11" ]
|
tags: [ "macmini-m1-xcode13" ]
|
||||||
needs:
|
needs:
|
||||||
- job-macosx-makefile
|
- job-macosx-makefile
|
||||||
only:
|
only:
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ include(CheckCXXCompilerFlag)
|
||||||
set(TARGET_NAME linphone-qt)
|
set(TARGET_NAME linphone-qt)
|
||||||
set(LINPHONE_QML_DIR "WORK/qml_files/ui")
|
set(LINPHONE_QML_DIR "WORK/qml_files/ui")
|
||||||
set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS true)
|
set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS true)
|
||||||
set(CMAKE_CXX_STANDARD 11)
|
set(CMAKE_CXX_STANDARD 14)
|
||||||
|
|
||||||
if(UNIX AND NOT APPLE)
|
if(UNIX AND NOT APPLE)
|
||||||
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||||
|
|
@ -154,6 +154,7 @@ set(SOURCES
|
||||||
src/app/providers/AvatarProvider.cpp
|
src/app/providers/AvatarProvider.cpp
|
||||||
src/app/providers/ImageProvider.cpp
|
src/app/providers/ImageProvider.cpp
|
||||||
src/app/providers/ExternalImageProvider.cpp
|
src/app/providers/ExternalImageProvider.cpp
|
||||||
|
src/app/providers/QRCodeProvider.cpp
|
||||||
src/app/providers/ThumbnailProvider.cpp
|
src/app/providers/ThumbnailProvider.cpp
|
||||||
src/app/proxyModel/ProxyListModel.cpp
|
src/app/proxyModel/ProxyListModel.cpp
|
||||||
src/app/proxyModel/SortFilterProxyModel.cpp
|
src/app/proxyModel/SortFilterProxyModel.cpp
|
||||||
|
|
@ -281,6 +282,7 @@ set(HEADERS
|
||||||
src/app/providers/AvatarProvider.hpp
|
src/app/providers/AvatarProvider.hpp
|
||||||
src/app/providers/ImageProvider.hpp
|
src/app/providers/ImageProvider.hpp
|
||||||
src/app/providers/ExternalImageProvider.hpp
|
src/app/providers/ExternalImageProvider.hpp
|
||||||
|
src/app/providers/QRCodeProvider.hpp
|
||||||
src/app/providers/ThumbnailProvider.hpp
|
src/app/providers/ThumbnailProvider.hpp
|
||||||
src/app/proxyModel/ProxyAbstractListModel.hpp
|
src/app/proxyModel/ProxyAbstractListModel.hpp
|
||||||
src/app/proxyModel/ProxyAbstractMapModel.hpp
|
src/app/proxyModel/ProxyAbstractMapModel.hpp
|
||||||
|
|
|
||||||
|
|
@ -1325,6 +1325,31 @@ Server url ikke konfigureret.</translation>
|
||||||
<extracomment>'Last remote provisioning failed' : Test to warn the user that the last fetch of remote provisioning has failed.</extracomment>
|
<extracomment>'Last remote provisioning failed' : Test to warn the user that the last fetch of remote provisioning has failed.</extracomment>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>generateLabel</source>
|
||||||
|
<extracomment>'generate' : title button to generate a code.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>or</source>
|
||||||
|
<extracomment>'or' : conjunction to choose between options.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>remoteProvisioningHow</source>
|
||||||
|
<extracomment>'Click on %1 to obtain your remote provisioning QR code' : Describe how to get a remote provisioning QR code by clicking on %1 button (1% is the text in button)</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>scanQRCode</source>
|
||||||
|
<extracomment>'Scan the QR code with your phone' : Explain how to use the QRCode by flasing it.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>scanQRCodeWhere</source>
|
||||||
|
<extracomment>'In your app go in assistant - QR code provisioning' : Describe where to flash the QRCode in the mobile application.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>HistoryView</name>
|
<name>HistoryView</name>
|
||||||
|
|
|
||||||
|
|
@ -1325,6 +1325,31 @@ Server URL ist nicht konfiguriert.</translation>
|
||||||
<extracomment>'Last remote provisioning failed' : Test to warn the user that the last fetch of remote provisioning has failed.</extracomment>
|
<extracomment>'Last remote provisioning failed' : Test to warn the user that the last fetch of remote provisioning has failed.</extracomment>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>generateLabel</source>
|
||||||
|
<extracomment>'generate' : title button to generate a code.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>or</source>
|
||||||
|
<extracomment>'or' : conjunction to choose between options.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>remoteProvisioningHow</source>
|
||||||
|
<extracomment>'Click on %1 to obtain your remote provisioning QR code' : Describe how to get a remote provisioning QR code by clicking on %1 button (1% is the text in button)</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>scanQRCode</source>
|
||||||
|
<extracomment>'Scan the QR code with your phone' : Explain how to use the QRCode by flasing it.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>scanQRCodeWhere</source>
|
||||||
|
<extracomment>'In your app go in assistant - QR code provisioning' : Describe where to flash the QRCode in the mobile application.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>HistoryView</name>
|
<name>HistoryView</name>
|
||||||
|
|
|
||||||
|
|
@ -1325,6 +1325,31 @@ Server URL not configured.</translation>
|
||||||
<extracomment>'Last remote provisioning failed' : Test to warn the user that the last fetch of remote provisioning has failed.</extracomment>
|
<extracomment>'Last remote provisioning failed' : Test to warn the user that the last fetch of remote provisioning has failed.</extracomment>
|
||||||
<translation>Last remote provisioning failed</translation>
|
<translation>Last remote provisioning failed</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>generateLabel</source>
|
||||||
|
<extracomment>'generate' : title button to generate a code.</extracomment>
|
||||||
|
<translation>generate</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>or</source>
|
||||||
|
<extracomment>'or' : conjunction to choose between options.</extracomment>
|
||||||
|
<translation>or</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>remoteProvisioningHow</source>
|
||||||
|
<extracomment>'Click on %1 to obtain your remote provisioning QR code' : Describe how to get a remote provisioning QR code by clicking on %1 button (1% is the text in button)</extracomment>
|
||||||
|
<translation>Click on %1 to obtain your remote provisioning QR code</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>scanQRCode</source>
|
||||||
|
<extracomment>'Scan the QR code with your phone' : Explain how to use the QRCode by flasing it.</extracomment>
|
||||||
|
<translation>Scan the QR code with your phone</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>scanQRCodeWhere</source>
|
||||||
|
<extracomment>'In your app go in assistant - QR code provisioning' : Describe where to flash the QRCode in the mobile application.</extracomment>
|
||||||
|
<translation>In your app go in assistant - QR code provisioning</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>HistoryView</name>
|
<name>HistoryView</name>
|
||||||
|
|
|
||||||
|
|
@ -1325,6 +1325,31 @@ URL del servidor no configurada.</translation>
|
||||||
<extracomment>'Last remote provisioning failed' : Test to warn the user that the last fetch of remote provisioning has failed.</extracomment>
|
<extracomment>'Last remote provisioning failed' : Test to warn the user that the last fetch of remote provisioning has failed.</extracomment>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>generateLabel</source>
|
||||||
|
<extracomment>'generate' : title button to generate a code.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>or</source>
|
||||||
|
<extracomment>'or' : conjunction to choose between options.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>remoteProvisioningHow</source>
|
||||||
|
<extracomment>'Click on %1 to obtain your remote provisioning QR code' : Describe how to get a remote provisioning QR code by clicking on %1 button (1% is the text in button)</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>scanQRCode</source>
|
||||||
|
<extracomment>'Scan the QR code with your phone' : Explain how to use the QRCode by flasing it.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>scanQRCodeWhere</source>
|
||||||
|
<extracomment>'In your app go in assistant - QR code provisioning' : Describe where to flash the QRCode in the mobile application.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>HistoryView</name>
|
<name>HistoryView</name>
|
||||||
|
|
|
||||||
|
|
@ -1325,6 +1325,31 @@ URL du serveur non configurée.</translation>
|
||||||
<extracomment>'Last remote provisioning failed' : Test to warn the user that the last fetch of remote provisioning has failed.</extracomment>
|
<extracomment>'Last remote provisioning failed' : Test to warn the user that the last fetch of remote provisioning has failed.</extracomment>
|
||||||
<translation>La dernière configuration n'a pas pu être récupérée</translation>
|
<translation>La dernière configuration n'a pas pu être récupérée</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>generateLabel</source>
|
||||||
|
<extracomment>'generate' : title button to generate a code.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>or</source>
|
||||||
|
<extracomment>'or' : conjunction to choose between options.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>remoteProvisioningHow</source>
|
||||||
|
<extracomment>'Click on %1 to obtain your remote provisioning QR code' : Describe how to get a remote provisioning QR code by clicking on %1 button (1% is the text in button)</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>scanQRCode</source>
|
||||||
|
<extracomment>'Scan the QR code with your phone' : Explain how to use the QRCode by flasing it.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>scanQRCodeWhere</source>
|
||||||
|
<extracomment>'In your app go in assistant - QR code provisioning' : Describe where to flash the QRCode in the mobile application.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>HistoryView</name>
|
<name>HistoryView</name>
|
||||||
|
|
|
||||||
|
|
@ -1315,6 +1315,31 @@ A kiszolgáló URL-je nincs konfigurálva.</translation>
|
||||||
<extracomment>'Last remote provisioning failed' : Test to warn the user that the last fetch of remote provisioning has failed.</extracomment>
|
<extracomment>'Last remote provisioning failed' : Test to warn the user that the last fetch of remote provisioning has failed.</extracomment>
|
||||||
<translation>Az utolsó távoli kiépítés nem sikerült</translation>
|
<translation>Az utolsó távoli kiépítés nem sikerült</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>generateLabel</source>
|
||||||
|
<extracomment>'generate' : title button to generate a code.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>or</source>
|
||||||
|
<extracomment>'or' : conjunction to choose between options.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>remoteProvisioningHow</source>
|
||||||
|
<extracomment>'Click on %1 to obtain your remote provisioning QR code' : Describe how to get a remote provisioning QR code by clicking on %1 button (1% is the text in button)</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>scanQRCode</source>
|
||||||
|
<extracomment>'Scan the QR code with your phone' : Explain how to use the QRCode by flasing it.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>scanQRCodeWhere</source>
|
||||||
|
<extracomment>'In your app go in assistant - QR code provisioning' : Describe where to flash the QRCode in the mobile application.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>HistoryView</name>
|
<name>HistoryView</name>
|
||||||
|
|
|
||||||
|
|
@ -1325,6 +1325,31 @@ URL del server non configurato.</translation>
|
||||||
<extracomment>'Last remote provisioning failed' : Test to warn the user that the last fetch of remote provisioning has failed.</extracomment>
|
<extracomment>'Last remote provisioning failed' : Test to warn the user that the last fetch of remote provisioning has failed.</extracomment>
|
||||||
<translation>L'ultima configurazione remota è fallita</translation>
|
<translation>L'ultima configurazione remota è fallita</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>generateLabel</source>
|
||||||
|
<extracomment>'generate' : title button to generate a code.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>or</source>
|
||||||
|
<extracomment>'or' : conjunction to choose between options.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>remoteProvisioningHow</source>
|
||||||
|
<extracomment>'Click on %1 to obtain your remote provisioning QR code' : Describe how to get a remote provisioning QR code by clicking on %1 button (1% is the text in button)</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>scanQRCode</source>
|
||||||
|
<extracomment>'Scan the QR code with your phone' : Explain how to use the QRCode by flasing it.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>scanQRCodeWhere</source>
|
||||||
|
<extracomment>'In your app go in assistant - QR code provisioning' : Describe where to flash the QRCode in the mobile application.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>HistoryView</name>
|
<name>HistoryView</name>
|
||||||
|
|
|
||||||
|
|
@ -1315,6 +1315,31 @@
|
||||||
<extracomment>'Last remote provisioning failed' : Test to warn the user that the last fetch of remote provisioning has failed.</extracomment>
|
<extracomment>'Last remote provisioning failed' : Test to warn the user that the last fetch of remote provisioning has failed.</extracomment>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>generateLabel</source>
|
||||||
|
<extracomment>'generate' : title button to generate a code.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>or</source>
|
||||||
|
<extracomment>'or' : conjunction to choose between options.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>remoteProvisioningHow</source>
|
||||||
|
<extracomment>'Click on %1 to obtain your remote provisioning QR code' : Describe how to get a remote provisioning QR code by clicking on %1 button (1% is the text in button)</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>scanQRCode</source>
|
||||||
|
<extracomment>'Scan the QR code with your phone' : Explain how to use the QRCode by flasing it.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>scanQRCodeWhere</source>
|
||||||
|
<extracomment>'In your app go in assistant - QR code provisioning' : Describe where to flash the QRCode in the mobile application.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>HistoryView</name>
|
<name>HistoryView</name>
|
||||||
|
|
|
||||||
|
|
@ -1335,6 +1335,31 @@ Nesukonfigūruotas serverio url.</translation>
|
||||||
<extracomment>'Last remote provisioning failed' : Test to warn the user that the last fetch of remote provisioning has failed.</extracomment>
|
<extracomment>'Last remote provisioning failed' : Test to warn the user that the last fetch of remote provisioning has failed.</extracomment>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>generateLabel</source>
|
||||||
|
<extracomment>'generate' : title button to generate a code.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>or</source>
|
||||||
|
<extracomment>'or' : conjunction to choose between options.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>remoteProvisioningHow</source>
|
||||||
|
<extracomment>'Click on %1 to obtain your remote provisioning QR code' : Describe how to get a remote provisioning QR code by clicking on %1 button (1% is the text in button)</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>scanQRCode</source>
|
||||||
|
<extracomment>'Scan the QR code with your phone' : Explain how to use the QRCode by flasing it.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>scanQRCodeWhere</source>
|
||||||
|
<extracomment>'In your app go in assistant - QR code provisioning' : Describe where to flash the QRCode in the mobile application.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>HistoryView</name>
|
<name>HistoryView</name>
|
||||||
|
|
|
||||||
|
|
@ -1325,6 +1325,31 @@ URL do servidor não configurado.</translation>
|
||||||
<extracomment>'Last remote provisioning failed' : Test to warn the user that the last fetch of remote provisioning has failed.</extracomment>
|
<extracomment>'Last remote provisioning failed' : Test to warn the user that the last fetch of remote provisioning has failed.</extracomment>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>generateLabel</source>
|
||||||
|
<extracomment>'generate' : title button to generate a code.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>or</source>
|
||||||
|
<extracomment>'or' : conjunction to choose between options.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>remoteProvisioningHow</source>
|
||||||
|
<extracomment>'Click on %1 to obtain your remote provisioning QR code' : Describe how to get a remote provisioning QR code by clicking on %1 button (1% is the text in button)</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>scanQRCode</source>
|
||||||
|
<extracomment>'Scan the QR code with your phone' : Explain how to use the QRCode by flasing it.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>scanQRCodeWhere</source>
|
||||||
|
<extracomment>'In your app go in assistant - QR code provisioning' : Describe where to flash the QRCode in the mobile application.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>HistoryView</name>
|
<name>HistoryView</name>
|
||||||
|
|
|
||||||
|
|
@ -1335,6 +1335,31 @@
|
||||||
<extracomment>'Last remote provisioning failed' : Test to warn the user that the last fetch of remote provisioning has failed.</extracomment>
|
<extracomment>'Last remote provisioning failed' : Test to warn the user that the last fetch of remote provisioning has failed.</extracomment>
|
||||||
<translation>Последняя удалённая инициализация не удалась</translation>
|
<translation>Последняя удалённая инициализация не удалась</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>generateLabel</source>
|
||||||
|
<extracomment>'generate' : title button to generate a code.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>or</source>
|
||||||
|
<extracomment>'or' : conjunction to choose between options.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>remoteProvisioningHow</source>
|
||||||
|
<extracomment>'Click on %1 to obtain your remote provisioning QR code' : Describe how to get a remote provisioning QR code by clicking on %1 button (1% is the text in button)</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>scanQRCode</source>
|
||||||
|
<extracomment>'Scan the QR code with your phone' : Explain how to use the QRCode by flasing it.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>scanQRCodeWhere</source>
|
||||||
|
<extracomment>'In your app go in assistant - QR code provisioning' : Describe where to flash the QRCode in the mobile application.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>HistoryView</name>
|
<name>HistoryView</name>
|
||||||
|
|
|
||||||
|
|
@ -1325,6 +1325,31 @@ Serverwebbadressen är inte konfigurerad.</translation>
|
||||||
<extracomment>'Last remote provisioning failed' : Test to warn the user that the last fetch of remote provisioning has failed.</extracomment>
|
<extracomment>'Last remote provisioning failed' : Test to warn the user that the last fetch of remote provisioning has failed.</extracomment>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>generateLabel</source>
|
||||||
|
<extracomment>'generate' : title button to generate a code.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>or</source>
|
||||||
|
<extracomment>'or' : conjunction to choose between options.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>remoteProvisioningHow</source>
|
||||||
|
<extracomment>'Click on %1 to obtain your remote provisioning QR code' : Describe how to get a remote provisioning QR code by clicking on %1 button (1% is the text in button)</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>scanQRCode</source>
|
||||||
|
<extracomment>'Scan the QR code with your phone' : Explain how to use the QRCode by flasing it.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>scanQRCodeWhere</source>
|
||||||
|
<extracomment>'In your app go in assistant - QR code provisioning' : Describe where to flash the QRCode in the mobile application.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>HistoryView</name>
|
<name>HistoryView</name>
|
||||||
|
|
|
||||||
|
|
@ -1315,6 +1315,31 @@ Sunucu url'si yapılandırılmadı.</translation>
|
||||||
<extracomment>'Last remote provisioning failed' : Test to warn the user that the last fetch of remote provisioning has failed.</extracomment>
|
<extracomment>'Last remote provisioning failed' : Test to warn the user that the last fetch of remote provisioning has failed.</extracomment>
|
||||||
<translation>Son uzaktan ön hazırlık başarısız</translation>
|
<translation>Son uzaktan ön hazırlık başarısız</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>generateLabel</source>
|
||||||
|
<extracomment>'generate' : title button to generate a code.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>or</source>
|
||||||
|
<extracomment>'or' : conjunction to choose between options.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>remoteProvisioningHow</source>
|
||||||
|
<extracomment>'Click on %1 to obtain your remote provisioning QR code' : Describe how to get a remote provisioning QR code by clicking on %1 button (1% is the text in button)</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>scanQRCode</source>
|
||||||
|
<extracomment>'Scan the QR code with your phone' : Explain how to use the QRCode by flasing it.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>scanQRCodeWhere</source>
|
||||||
|
<extracomment>'In your app go in assistant - QR code provisioning' : Describe where to flash the QRCode in the mobile application.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>HistoryView</name>
|
<name>HistoryView</name>
|
||||||
|
|
|
||||||
|
|
@ -1335,6 +1335,31 @@
|
||||||
<extracomment>'Last remote provisioning failed' : Test to warn the user that the last fetch of remote provisioning has failed.</extracomment>
|
<extracomment>'Last remote provisioning failed' : Test to warn the user that the last fetch of remote provisioning has failed.</extracomment>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>generateLabel</source>
|
||||||
|
<extracomment>'generate' : title button to generate a code.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>or</source>
|
||||||
|
<extracomment>'or' : conjunction to choose between options.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>remoteProvisioningHow</source>
|
||||||
|
<extracomment>'Click on %1 to obtain your remote provisioning QR code' : Describe how to get a remote provisioning QR code by clicking on %1 button (1% is the text in button)</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>scanQRCode</source>
|
||||||
|
<extracomment>'Scan the QR code with your phone' : Explain how to use the QRCode by flasing it.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>scanQRCodeWhere</source>
|
||||||
|
<extracomment>'In your app go in assistant - QR code provisioning' : Describe where to flash the QRCode in the mobile application.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>HistoryView</name>
|
<name>HistoryView</name>
|
||||||
|
|
|
||||||
|
|
@ -1315,6 +1315,31 @@
|
||||||
<extracomment>'Last remote provisioning failed' : Test to warn the user that the last fetch of remote provisioning has failed.</extracomment>
|
<extracomment>'Last remote provisioning failed' : Test to warn the user that the last fetch of remote provisioning has failed.</extracomment>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>generateLabel</source>
|
||||||
|
<extracomment>'generate' : title button to generate a code.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>or</source>
|
||||||
|
<extracomment>'or' : conjunction to choose between options.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>remoteProvisioningHow</source>
|
||||||
|
<extracomment>'Click on %1 to obtain your remote provisioning QR code' : Describe how to get a remote provisioning QR code by clicking on %1 button (1% is the text in button)</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>scanQRCode</source>
|
||||||
|
<extracomment>'Scan the QR code with your phone' : Explain how to use the QRCode by flasing it.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>scanQRCodeWhere</source>
|
||||||
|
<extracomment>'In your app go in assistant - QR code provisioning' : Describe where to flash the QRCode in the mobile application.</extracomment>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>HistoryView</name>
|
<name>HistoryView</name>
|
||||||
|
|
|
||||||
|
|
@ -14,3 +14,6 @@ zrtp_key_agreements_suites=MS_ZRTP_KEY_AGREEMENT_K255_KYB512
|
||||||
|
|
||||||
[video]
|
[video]
|
||||||
max_mosaic_size=vga
|
max_mosaic_size=vga
|
||||||
|
|
||||||
|
[ui]
|
||||||
|
use_qrcode=0
|
||||||
|
|
@ -512,6 +512,7 @@
|
||||||
<file>ui/views/App/Styles/Main/Assistant/AssistantAbstractViewStyle.qml</file>
|
<file>ui/views/App/Styles/Main/Assistant/AssistantAbstractViewStyle.qml</file>
|
||||||
<file>ui/views/App/Styles/Main/Assistant/AssistantHomeStyle.qml</file>
|
<file>ui/views/App/Styles/Main/Assistant/AssistantHomeStyle.qml</file>
|
||||||
<file>ui/views/App/Styles/Main/Assistant/CreateAppSipAccountStyle.qml</file>
|
<file>ui/views/App/Styles/Main/Assistant/CreateAppSipAccountStyle.qml</file>
|
||||||
|
<file>ui/views/App/Styles/Main/Assistant/FetchRemoteConfigurationStyle.qml</file>
|
||||||
<file>ui/views/App/Styles/Main/AssistantStyle.qml</file>
|
<file>ui/views/App/Styles/Main/AssistantStyle.qml</file>
|
||||||
<file>ui/views/App/Styles/Main/Assistant/UseAppSipAccountStyle.qml</file>
|
<file>ui/views/App/Styles/Main/Assistant/UseAppSipAccountStyle.qml</file>
|
||||||
<file>ui/views/App/Styles/Main/ConferencesStyle.qml</file>
|
<file>ui/views/App/Styles/Main/ConferencesStyle.qml</file>
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,7 @@
|
||||||
#include "providers/AvatarProvider.hpp"
|
#include "providers/AvatarProvider.hpp"
|
||||||
#include "providers/ImageProvider.hpp"
|
#include "providers/ImageProvider.hpp"
|
||||||
#include "providers/ExternalImageProvider.hpp"
|
#include "providers/ExternalImageProvider.hpp"
|
||||||
|
#include "providers/QRCodeProvider.hpp"
|
||||||
#include "providers/ThumbnailProvider.hpp"
|
#include "providers/ThumbnailProvider.hpp"
|
||||||
#include "translator/DefaultTranslator.hpp"
|
#include "translator/DefaultTranslator.hpp"
|
||||||
#include "utils/Utils.hpp"
|
#include "utils/Utils.hpp"
|
||||||
|
|
@ -380,6 +381,7 @@ void App::initContentApp () {
|
||||||
mEngine->addImageProvider(AvatarProvider::ProviderId, new AvatarProvider());
|
mEngine->addImageProvider(AvatarProvider::ProviderId, new AvatarProvider());
|
||||||
mEngine->addImageProvider(ImageProvider::ProviderId, new ImageProvider());
|
mEngine->addImageProvider(ImageProvider::ProviderId, new ImageProvider());
|
||||||
mEngine->addImageProvider(ExternalImageProvider::ProviderId, new ExternalImageProvider());
|
mEngine->addImageProvider(ExternalImageProvider::ProviderId, new ExternalImageProvider());
|
||||||
|
mEngine->addImageProvider(QRCodeProvider::ProviderId, new QRCodeProvider());
|
||||||
mEngine->addImageProvider(ThumbnailProvider::ProviderId, new ThumbnailProvider());
|
mEngine->addImageProvider(ThumbnailProvider::ProviderId, new ThumbnailProvider());
|
||||||
|
|
||||||
mEngine->rootContext()->setContextProperty("applicationName", APPLICATION_NAME);
|
mEngine->rootContext()->setContextProperty("applicationName", APPLICATION_NAME);
|
||||||
|
|
|
||||||
72
linphone-app/src/app/providers/QRCodeProvider.cpp
Normal file
72
linphone-app/src/app/providers/QRCodeProvider.cpp
Normal file
|
|
@ -0,0 +1,72 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2010-2020 Belledonne Communications SARL.
|
||||||
|
*
|
||||||
|
* This file is part of linphone-desktop
|
||||||
|
* (see https://www.linphone.org).
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <QElapsedTimer>
|
||||||
|
#include <QFileInfo>
|
||||||
|
#include <QPainter>
|
||||||
|
#include <QScreen>
|
||||||
|
#include <QSvgRenderer>
|
||||||
|
#include <QQmlPropertyMap>
|
||||||
|
#include <QByteArray>
|
||||||
|
#include <QBuffer>
|
||||||
|
#include <QImageReader>
|
||||||
|
#include "app/App.hpp"
|
||||||
|
|
||||||
|
#include "QRCodeProvider.hpp"
|
||||||
|
#include "components/other/colors/ColorListModel.hpp"
|
||||||
|
#include "components/other/colors/ColorModel.hpp"
|
||||||
|
#include "components/other/images/ImageListModel.hpp"
|
||||||
|
#include "components/other/images/ImageModel.hpp"
|
||||||
|
|
||||||
|
#include "utils/Constants.hpp"
|
||||||
|
|
||||||
|
// =============================================================================
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
const QString QRCodeProvider::ProviderId = "qrcode";
|
||||||
|
|
||||||
|
QRCodeProvider::QRCodeProvider () : QQuickImageProvider(
|
||||||
|
QQmlImageProviderBase::Image,
|
||||||
|
QQmlImageProviderBase::ForceAsynchronousImageLoading
|
||||||
|
) {}
|
||||||
|
|
||||||
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
QImage QRCodeProvider::requestImage (const QString &id, QSize *size, const QSize &requestedSize) {
|
||||||
|
unsigned int w = requestedSize.width()>0?requestedSize.width() : 100;
|
||||||
|
unsigned int h = requestedSize.height()>0 ? requestedSize.height() : 100;
|
||||||
|
auto content = linphone::Factory::get()->createQrcode(id.toStdString(), w, h, 0);
|
||||||
|
if( !content)
|
||||||
|
return QImage();
|
||||||
|
QImage image(w, h, QImage::Format_Indexed8);
|
||||||
|
for (int y = 0;y<h; y++)
|
||||||
|
memcpy(image.scanLine(y), content->getBuffer() + y*w, w);
|
||||||
|
QVector<QRgb> colorTable(256);
|
||||||
|
for(int i=0;i<256;i++)
|
||||||
|
colorTable[i] = qRgb(i,i,i);
|
||||||
|
image.setColorTable(colorTable);
|
||||||
|
*size = image.size();
|
||||||
|
return image;
|
||||||
|
}
|
||||||
|
|
||||||
|
QPixmap QRCodeProvider::requestPixmap (const QString &id, QSize *size, const QSize &requestedSize) {
|
||||||
|
return QPixmap::fromImage(requestImage(id, size, requestedSize));
|
||||||
|
}
|
||||||
39
linphone-app/src/app/providers/QRCodeProvider.hpp
Normal file
39
linphone-app/src/app/providers/QRCodeProvider.hpp
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2010-2020 Belledonne Communications SARL.
|
||||||
|
*
|
||||||
|
* This file is part of linphone-desktop
|
||||||
|
* (see https://www.linphone.org).
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef QRCODE_PROVIDER_H_
|
||||||
|
#define QRCODE_PROVIDER_H_
|
||||||
|
|
||||||
|
#include <QQuickImageProvider>
|
||||||
|
|
||||||
|
// =============================================================================
|
||||||
|
|
||||||
|
class QRCodeProvider : public QQuickImageProvider {
|
||||||
|
public:
|
||||||
|
QRCodeProvider ();
|
||||||
|
|
||||||
|
QImage requestImage (const QString &id, QSize *size, const QSize &requestedSize) override;
|
||||||
|
QPixmap requestPixmap (const QString &id, QSize *size, const QSize &requestedSize) override;
|
||||||
|
|
||||||
|
static const QString ProviderId;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // AVATAR_PROVIDER_H_
|
||||||
|
|
@ -28,7 +28,10 @@
|
||||||
|
|
||||||
#include "AssistantModel.hpp"
|
#include "AssistantModel.hpp"
|
||||||
|
|
||||||
|
#include <linphone/FlexiAPIClient.hh>
|
||||||
|
|
||||||
#include <QtDebug>
|
#include <QtDebug>
|
||||||
|
#include <QTimer>
|
||||||
|
|
||||||
// =============================================================================
|
// =============================================================================
|
||||||
|
|
||||||
|
|
@ -148,12 +151,18 @@ private:
|
||||||
|
|
||||||
AssistantModel::AssistantModel (QObject *parent) : QObject(parent) {
|
AssistantModel::AssistantModel (QObject *parent) : QObject(parent) {
|
||||||
mHandlers = make_shared<AssistantModel::Handlers>(this);
|
mHandlers = make_shared<AssistantModel::Handlers>(this);
|
||||||
|
|
||||||
shared_ptr<linphone::Core> core = CoreManager::getInstance()->getCore();
|
shared_ptr<linphone::Core> core = CoreManager::getInstance()->getCore();
|
||||||
|
connect(CoreManager::getInstance()->getHandlers().get(), &CoreHandlers::foundQRCode, this, &AssistantModel::onQRCodeFound);
|
||||||
|
mIsReadingQRCode = false;
|
||||||
mAccountCreator = core->createAccountCreator(
|
mAccountCreator = core->createAccountCreator(
|
||||||
core->getConfig()->getString("assistant", "xmlrpc_url", Constants::DefaultXmlrpcUri)
|
core->getConfig()->getString("assistant", "xmlrpc_url", Constants::DefaultXmlrpcUri)
|
||||||
);
|
);
|
||||||
mAccountCreator->addListener(mHandlers);
|
mAccountCreator->addListener(mHandlers);
|
||||||
|
connect(this, &AssistantModel::apiReceived, this, &AssistantModel::onApiReceived);
|
||||||
|
}
|
||||||
|
|
||||||
|
AssistantModel::~AssistantModel(){
|
||||||
|
setIsReadingQRCode(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
@ -269,6 +278,79 @@ bool AssistantModel::addOtherSipAccount (const QVariantMap &map) {
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
void AssistantModel::createTestAccount(){
|
||||||
|
}
|
||||||
|
void AssistantModel::generateQRCode(){
|
||||||
|
auto flexiAPIClient = make_shared<FlexiAPIClient>(CoreManager::getInstance()->getCore()->cPtr());
|
||||||
|
flexiAPIClient
|
||||||
|
->accountProvision()
|
||||||
|
->then([this](FlexiAPIClient::Response response){
|
||||||
|
emit newQRCodeReceived(response.json()["provisioning_token"].asCString());
|
||||||
|
})
|
||||||
|
->error([this](FlexiAPIClient::Response response){
|
||||||
|
emit newQRCodeNotReceived(Utils::coreStringToAppString(response.body), response.code);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
void AssistantModel::requestQRCode(){
|
||||||
|
auto flexiAPIClient = make_shared<FlexiAPIClient>(CoreManager::getInstance()->getCore()->cPtr());
|
||||||
|
|
||||||
|
flexiAPIClient
|
||||||
|
->accountAuthTokenCreate()
|
||||||
|
->then([this](FlexiAPIClient::Response response) {
|
||||||
|
mToken = response.json()["token"].asCString();
|
||||||
|
emit newQRCodeReceived(mToken);
|
||||||
|
QTimer::singleShot(5000, this, &AssistantModel::checkLinkingAccount);
|
||||||
|
})->error([this](FlexiAPIClient::Response response){
|
||||||
|
qWarning() << response.code << " => " << response.body.c_str();
|
||||||
|
emit newQRCodeNotReceived(Utils::coreStringToAppString(response.body), response.code);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void AssistantModel::readQRCode(){
|
||||||
|
setIsReadingQRCode(!mIsReadingQRCode);
|
||||||
|
}
|
||||||
|
void AssistantModel::newQRCodeNotReceivedTest(){
|
||||||
|
emit newQRCodeNotReceived("Cannot generate a provisioning key",0);
|
||||||
|
}
|
||||||
|
void AssistantModel::checkLinkingAccount(){
|
||||||
|
auto flexiAPIClient = make_shared<FlexiAPIClient>(CoreManager::getInstance()->getCore()->cPtr());
|
||||||
|
flexiAPIClient
|
||||||
|
->accountApiKeyFromAuthTokenGenerate(mToken.toStdString())
|
||||||
|
->then([this](FlexiAPIClient::Response response)mutable{
|
||||||
|
emit apiReceived(Utils::coreStringToAppString(response.json()["api_key"].asCString()));
|
||||||
|
})->error([this](FlexiAPIClient::Response){
|
||||||
|
QTimer::singleShot(5000, this, &AssistantModel::checkLinkingAccount);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void AssistantModel::onApiReceived(QString apiKey){
|
||||||
|
auto flexiAPIClient = make_shared<FlexiAPIClient>(CoreManager::getInstance()->getCore()->cPtr());
|
||||||
|
flexiAPIClient->setApiKey(Utils::appStringToCoreString(apiKey).c_str())
|
||||||
|
->accountProvision()
|
||||||
|
->then([this](FlexiAPIClient::Response response){
|
||||||
|
emit provisioningTokenReceived(response.json()["provisioning_token"].asCString());
|
||||||
|
})->error([this](FlexiAPIClient::Response response){
|
||||||
|
//it provisioningTokenReceived("token");
|
||||||
|
emit this->newQRCodeNotReceived("Cannot generate a provisioning key"+(response.body.empty() ? "" : " : " +Utils::coreStringToAppString(response.body)), response.code);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
void AssistantModel::onQRCodeFound(const std::string & result){
|
||||||
|
setIsReadingQRCode(false);
|
||||||
|
emit qRCodeFound(Utils::coreStringToAppString(result));
|
||||||
|
}
|
||||||
|
|
||||||
|
void AssistantModel::attachAccount(const QString& token){
|
||||||
|
auto flexiAPIClient = make_shared<FlexiAPIClient>(CoreManager::getInstance()->getCore()->cPtr());
|
||||||
|
flexiAPIClient->
|
||||||
|
accountAuthTokenAttach(Utils::appStringToCoreString(token))
|
||||||
|
->then([this](FlexiAPIClient::Response response){
|
||||||
|
qWarning() << "Attached";
|
||||||
|
emit qRCodeAttached();
|
||||||
|
})
|
||||||
|
->error([this](FlexiAPIClient::Response response){
|
||||||
|
emit qRCodeNotAttached("Cannot attach"+ (response.body.empty() ? "" : " : " +Utils::coreStringToAppString(response.body)), response.code);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
@ -431,6 +513,21 @@ void AssistantModel::setConfigFilename (const QString &configFilename) {
|
||||||
emit configFilenameChanged(configFilename);
|
emit configFilenameChanged(configFilename);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool AssistantModel::getIsReadingQRCode() const{
|
||||||
|
return mIsReadingQRCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
void AssistantModel::setIsReadingQRCode(bool isReading){
|
||||||
|
if( mIsReadingQRCode != isReading){
|
||||||
|
if( CoreManager::getInstance()->getCore()->qrcodeVideoPreviewEnabled() != isReading){
|
||||||
|
CoreManager::getInstance()->getCore()->enableQrcodeVideoPreview(isReading);
|
||||||
|
//CoreManager::getInstance()->getCore()->enableVideoPreview(isReading);
|
||||||
|
}
|
||||||
|
mIsReadingQRCode = isReading;
|
||||||
|
emit isReadingQRCodeChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
QString AssistantModel::mapAccountCreatorUsernameStatusToString (linphone::AccountCreator::UsernameStatus status) const {
|
QString AssistantModel::mapAccountCreatorUsernameStatusToString (linphone::AccountCreator::UsernameStatus status) const {
|
||||||
|
|
|
||||||
|
|
@ -39,9 +39,11 @@ class AssistantModel : public QObject {
|
||||||
Q_PROPERTY(QString displayName READ getDisplayName WRITE setDisplayName NOTIFY displayNameChanged);
|
Q_PROPERTY(QString displayName READ getDisplayName WRITE setDisplayName NOTIFY displayNameChanged);
|
||||||
Q_PROPERTY(QString activationCode READ getActivationCode WRITE setActivationCode NOTIFY activationCodeChanged);
|
Q_PROPERTY(QString activationCode READ getActivationCode WRITE setActivationCode NOTIFY activationCodeChanged);
|
||||||
Q_PROPERTY(QString configFilename READ getConfigFilename WRITE setConfigFilename NOTIFY configFilenameChanged);
|
Q_PROPERTY(QString configFilename READ getConfigFilename WRITE setConfigFilename NOTIFY configFilenameChanged);
|
||||||
|
Q_PROPERTY(bool isReadingQRCode READ getIsReadingQRCode WRITE setIsReadingQRCode NOTIFY isReadingQRCodeChanged);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AssistantModel (QObject *parent = Q_NULLPTR);
|
AssistantModel (QObject *parent = Q_NULLPTR);
|
||||||
|
virtual ~AssistantModel();
|
||||||
|
|
||||||
Q_INVOKABLE void activate ();
|
Q_INVOKABLE void activate ();
|
||||||
Q_INVOKABLE void create ();
|
Q_INVOKABLE void create ();
|
||||||
|
|
@ -51,6 +53,20 @@ public:
|
||||||
|
|
||||||
Q_INVOKABLE bool addOtherSipAccount (const QVariantMap &map);
|
Q_INVOKABLE bool addOtherSipAccount (const QVariantMap &map);
|
||||||
|
|
||||||
|
Q_INVOKABLE void createTestAccount();
|
||||||
|
Q_INVOKABLE void generateQRCode();
|
||||||
|
Q_INVOKABLE void requestQRCode();
|
||||||
|
Q_INVOKABLE void readQRCode();
|
||||||
|
|
||||||
|
Q_INVOKABLE void attachAccount(const QString& token);
|
||||||
|
|
||||||
|
void checkLinkingAccount();
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
void onQRCodeFound(const std::string & result);
|
||||||
|
void onApiReceived(QString apiKey);
|
||||||
|
void newQRCodeNotReceivedTest();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void emailChanged (const QString &email, const QString &error);
|
void emailChanged (const QString &email, const QString &error);
|
||||||
void passwordChanged (const QString &password, const QString &error);
|
void passwordChanged (const QString &password, const QString &error);
|
||||||
|
|
@ -67,6 +83,18 @@ signals:
|
||||||
|
|
||||||
void configFilenameChanged (const QString &configFilename);
|
void configFilenameChanged (const QString &configFilename);
|
||||||
|
|
||||||
|
void newQRCodeReceived(QString code);// code for QRCode generation.
|
||||||
|
void newQRCodeNotReceived(QString message, int errorCode);// The QRCode couldn't be generated. Return HTTP error code.
|
||||||
|
void provisioningTokenReceived(QString token);// Provisioning token to use
|
||||||
|
void isReadingQRCodeChanged();
|
||||||
|
void qRCodeFound(QString token);
|
||||||
|
|
||||||
|
void qRCodeAttached();
|
||||||
|
void qRCodeNotAttached(QString message, int errorCode);
|
||||||
|
void apiReceived(QString apiKey);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString getEmail () const;
|
QString getEmail () const;
|
||||||
void setEmail (const QString &email);
|
void setEmail (const QString &email);
|
||||||
|
|
@ -92,10 +120,15 @@ private:
|
||||||
QString getConfigFilename () const;
|
QString getConfigFilename () const;
|
||||||
void setConfigFilename (const QString &configFilename);
|
void setConfigFilename (const QString &configFilename);
|
||||||
|
|
||||||
|
bool getIsReadingQRCode() const;
|
||||||
|
void setIsReadingQRCode(bool isReading);
|
||||||
|
|
||||||
QString mapAccountCreatorUsernameStatusToString (linphone::AccountCreator::UsernameStatus status) const;
|
QString mapAccountCreatorUsernameStatusToString (linphone::AccountCreator::UsernameStatus status) const;
|
||||||
|
|
||||||
QString mCountryCode;
|
QString mCountryCode;
|
||||||
QString mConfigFilename;
|
QString mConfigFilename;
|
||||||
|
QString mToken;
|
||||||
|
bool mIsReadingQRCode;
|
||||||
|
|
||||||
std::shared_ptr<linphone::AccountCreator> mAccountCreator;
|
std::shared_ptr<linphone::AccountCreator> mAccountCreator;
|
||||||
std::shared_ptr<Handlers> mHandlers;
|
std::shared_ptr<Handlers> mHandlers;
|
||||||
|
|
|
||||||
|
|
@ -323,11 +323,11 @@ void ConferenceInfoModel::deleteConferenceInfo(){
|
||||||
|
|
||||||
//-------------------------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
void ConferenceInfoModel::onStateChanged(linphone::ConferenceSchedulerState state){
|
void ConferenceInfoModel::onStateChanged(linphone::ConferenceScheduler::State state){
|
||||||
qDebug() << "ConferenceInfoModel::onStateChanged: " << (int) state;
|
qDebug() << "ConferenceInfoModel::onStateChanged: " << (int) state;
|
||||||
if( state == linphone::ConferenceSchedulerState::Ready)
|
if( state == linphone::ConferenceScheduler::State::Ready)
|
||||||
emit conferenceCreated();
|
emit conferenceCreated();
|
||||||
else if( state == linphone::ConferenceSchedulerState::Error)
|
else if( state == linphone::ConferenceScheduler::State::Error)
|
||||||
emit conferenceCreationFailed();
|
emit conferenceCreationFailed();
|
||||||
}
|
}
|
||||||
void ConferenceInfoModel::onInvitationsSent(const std::list<std::shared_ptr<linphone::Address>> & failedInvitations) {
|
void ConferenceInfoModel::onInvitationsSent(const std::list<std::shared_ptr<linphone::Address>> & failedInvitations) {
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ public:
|
||||||
|
|
||||||
// SCHEDULER
|
// SCHEDULER
|
||||||
|
|
||||||
virtual void onStateChanged(linphone::ConferenceSchedulerState state);
|
virtual void onStateChanged(linphone::ConferenceScheduler::State state);
|
||||||
virtual void onInvitationsSent(const std::list<std::shared_ptr<linphone::Address>> & failedInvitations);
|
virtual void onInvitationsSent(const std::list<std::shared_ptr<linphone::Address>> & failedInvitations);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -54,10 +54,10 @@ std::shared_ptr<linphone::ConferenceScheduler> ConferenceScheduler::getConferenc
|
||||||
return mConferenceScheduler;
|
return mConferenceScheduler;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConferenceScheduler::onStateChanged(linphone::ConferenceSchedulerState state) {
|
void ConferenceScheduler::onStateChanged(linphone::ConferenceScheduler::State state) {
|
||||||
qDebug() << "ConferenceScheduler::onStateChanged : " << (int)state;
|
qDebug() << "ConferenceScheduler::onStateChanged : " << (int)state;
|
||||||
emit stateChanged(state);
|
emit stateChanged(state);
|
||||||
if( state == linphone::ConferenceSchedulerState::Ready) {
|
if( state == linphone::ConferenceScheduler::State::Ready) {
|
||||||
emit CoreManager::getInstance()->getHandlers()->conferenceInfoReceived(mConferenceScheduler->getInfo());
|
emit CoreManager::getInstance()->getHandlers()->conferenceInfoReceived(mConferenceScheduler->getInfo());
|
||||||
if( (mSendInvite & 1) == 1){
|
if( (mSendInvite & 1) == 1){
|
||||||
std::shared_ptr<linphone::ChatRoomParams> params = CoreManager::getInstance()->getCore()->createDefaultChatRoomParams();
|
std::shared_ptr<linphone::ChatRoomParams> params = CoreManager::getInstance()->getCore()->createDefaultChatRoomParams();
|
||||||
|
|
|
||||||
|
|
@ -36,13 +36,13 @@ public:
|
||||||
virtual ~ConferenceScheduler ();
|
virtual ~ConferenceScheduler ();
|
||||||
std::shared_ptr<linphone::ConferenceScheduler> getConferenceScheduler();
|
std::shared_ptr<linphone::ConferenceScheduler> getConferenceScheduler();
|
||||||
|
|
||||||
virtual void onStateChanged(linphone::ConferenceSchedulerState state);
|
virtual void onStateChanged(linphone::ConferenceScheduler::State state);
|
||||||
virtual void onInvitationsSent(const std::list<std::shared_ptr<linphone::Address>> & failedInvitations);
|
virtual void onInvitationsSent(const std::list<std::shared_ptr<linphone::Address>> & failedInvitations);
|
||||||
|
|
||||||
int mSendInvite = 1;// TODO : Enum for app = 1, email=2. Both = 3
|
int mSendInvite = 1;// TODO : Enum for app = 1, email=2. Both = 3
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void stateChanged(linphone::ConferenceSchedulerState state);
|
void stateChanged(linphone::ConferenceScheduler::State state);
|
||||||
void invitationsSent(const std::list<std::shared_ptr<linphone::Address>> & failedInvitations);
|
void invitationsSent(const std::list<std::shared_ptr<linphone::Address>> & failedInvitations);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ ConferenceSchedulerListener::~ConferenceSchedulerListener () {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ConferenceSchedulerListener::onStateChanged(const std::shared_ptr<linphone::ConferenceScheduler> & conferenceScheduler, linphone::ConferenceSchedulerState state) {
|
void ConferenceSchedulerListener::onStateChanged(const std::shared_ptr<linphone::ConferenceScheduler> & conferenceScheduler, linphone::ConferenceScheduler::State state) {
|
||||||
qDebug() << "ConferenceSchedulerListener::onStateChanged" << (int) state;
|
qDebug() << "ConferenceSchedulerListener::onStateChanged" << (int) state;
|
||||||
emit stateChanged(state);
|
emit stateChanged(state);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,11 +32,11 @@ public:
|
||||||
ConferenceSchedulerListener();
|
ConferenceSchedulerListener();
|
||||||
virtual ~ConferenceSchedulerListener();
|
virtual ~ConferenceSchedulerListener();
|
||||||
|
|
||||||
virtual void onStateChanged(const std::shared_ptr<linphone::ConferenceScheduler> & conferenceScheduler, linphone::ConferenceSchedulerState state) override;
|
virtual void onStateChanged(const std::shared_ptr<linphone::ConferenceScheduler> & conferenceScheduler, linphone::ConferenceScheduler::State state) override;
|
||||||
virtual void onInvitationsSent(const std::shared_ptr<linphone::ConferenceScheduler> & conferenceScheduler, const std::list<std::shared_ptr<linphone::Address>> & failedInvitations) override;
|
virtual void onInvitationsSent(const std::shared_ptr<linphone::ConferenceScheduler> & conferenceScheduler, const std::list<std::shared_ptr<linphone::Address>> & failedInvitations) override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void stateChanged(linphone::ConferenceSchedulerState state);
|
void stateChanged(linphone::ConferenceScheduler::State state);
|
||||||
void invitationsSent(const std::list<std::shared_ptr<linphone::Address>> & failedInvitations);
|
void invitationsSent(const std::list<std::shared_ptr<linphone::Address>> & failedInvitations);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -283,6 +283,10 @@ void CoreHandlers::onNotifyPresenceReceived (
|
||||||
emit presenceStatusReceived(linphoneFriend);
|
emit presenceStatusReceived(linphoneFriend);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CoreHandlers::onQrcodeFound(const std::shared_ptr<linphone::Core> & core, const std::string & result){
|
||||||
|
emit foundQRCode(result);
|
||||||
|
}
|
||||||
|
|
||||||
void CoreHandlers::onTransferStateChanged (
|
void CoreHandlers::onTransferStateChanged (
|
||||||
const shared_ptr<linphone::Core> &,
|
const shared_ptr<linphone::Core> &,
|
||||||
const shared_ptr<linphone::Call> &call,
|
const shared_ptr<linphone::Call> &call,
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,7 @@ signals:
|
||||||
void ecCalibrationResult(linphone::EcCalibratorStatus status, int delayMs);
|
void ecCalibrationResult(linphone::EcCalibratorStatus status, int delayMs);
|
||||||
void setLastRemoteProvisioningState(const linphone::ConfiguringState &state);
|
void setLastRemoteProvisioningState(const linphone::ConfiguringState &state);
|
||||||
void conferenceInfoReceived(const std::shared_ptr<const linphone::ConferenceInfo> & conferenceInfo);
|
void conferenceInfoReceived(const std::shared_ptr<const linphone::ConferenceInfo> & conferenceInfo);
|
||||||
|
void foundQRCode(const std::string & result);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
@ -166,6 +167,8 @@ private:
|
||||||
const std::shared_ptr<linphone::Friend> &linphoneFriend
|
const std::shared_ptr<linphone::Friend> &linphoneFriend
|
||||||
) override;
|
) override;
|
||||||
|
|
||||||
|
void onQrcodeFound(const std::shared_ptr<linphone::Core> & core, const std::string & result) override;
|
||||||
|
|
||||||
void onTransferStateChanged (
|
void onTransferStateChanged (
|
||||||
const std::shared_ptr<linphone::Core> &core,
|
const std::shared_ptr<linphone::Core> &core,
|
||||||
const std::shared_ptr<linphone::Call> &call,
|
const std::shared_ptr<linphone::Call> &call,
|
||||||
|
|
|
||||||
|
|
@ -283,6 +283,8 @@ void CoreManager::createLinphoneCore (const QString &configPath) {
|
||||||
setOtherPaths();
|
setOtherPaths();
|
||||||
mCore->enableFriendListSubscription(true);
|
mCore->enableFriendListSubscription(true);
|
||||||
mCore->enableRecordAware(true);
|
mCore->enableRecordAware(true);
|
||||||
|
if(mCore->getAccountCreatorUrl() == "")
|
||||||
|
mCore->setAccountCreatorUrl(Constants::DefaultFlexiAPIURL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CoreManager::updateUserAgent(){
|
void CoreManager::updateUserAgent(){
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ void ParticipantDeviceListener::onIsSpeakingChanged(const std::shared_ptr<linpho
|
||||||
}
|
}
|
||||||
|
|
||||||
void ParticipantDeviceListener::onIsMuted(const std::shared_ptr<linphone::ParticipantDevice> & participantDevice, bool isMutedVar) {
|
void ParticipantDeviceListener::onIsMuted(const std::shared_ptr<linphone::ParticipantDevice> & participantDevice, bool isMutedVar) {
|
||||||
qInfo() << "onIsMuted " << isMutedVar << " vs " << participantDevice->getIsMuted();
|
qInfo() << "onIsMuted " << isMutedVar << " vs " << participantDevice->getIsMuted() << " for " << participantDevice->getAddress()->asString().c_str();
|
||||||
emit isMuted(participantDevice, isMutedVar);
|
emit isMuted(participantDevice, isMutedVar);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1481,6 +1481,10 @@ void SettingsModel::setDownloadFolder (const QString &folder) {
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
QString SettingsModel::getRemoteProvisioningRootUrl() const{
|
||||||
|
return Utils::coreStringToAppString(mConfig->getString(UiSection, "remote_provisioning_root", Constants::RemoteProvisioningURL));
|
||||||
|
}
|
||||||
|
|
||||||
QString SettingsModel::getRemoteProvisioning () const {
|
QString SettingsModel::getRemoteProvisioning () const {
|
||||||
return Utils::coreStringToAppString(CoreManager::getInstance()->getCore()->getProvisioningUri());
|
return Utils::coreStringToAppString(CoreManager::getInstance()->getCore()->getProvisioningUri());
|
||||||
}
|
}
|
||||||
|
|
@ -1488,7 +1492,7 @@ QString SettingsModel::getRemoteProvisioning () const {
|
||||||
void SettingsModel::setRemoteProvisioning (const QString &remoteProvisioning) {
|
void SettingsModel::setRemoteProvisioning (const QString &remoteProvisioning) {
|
||||||
QString urlRemoteProvisioning = remoteProvisioning;
|
QString urlRemoteProvisioning = remoteProvisioning;
|
||||||
if( QUrl(urlRemoteProvisioning).isRelative()) {
|
if( QUrl(urlRemoteProvisioning).isRelative()) {
|
||||||
urlRemoteProvisioning = QString(Constants::RemoteProvisioningURL) +"/"+ remoteProvisioning;
|
urlRemoteProvisioning = getRemoteProvisioningRootUrl() +"/"+ remoteProvisioning;
|
||||||
}
|
}
|
||||||
if (!CoreManager::getInstance()->getCore()->setProvisioningUri(Utils::appStringToCoreString(urlRemoteProvisioning)))
|
if (!CoreManager::getInstance()->getCore()->setProvisioningUri(Utils::appStringToCoreString(urlRemoteProvisioning)))
|
||||||
emit remoteProvisioningChanged(urlRemoteProvisioning);
|
emit remoteProvisioningChanged(urlRemoteProvisioning);
|
||||||
|
|
@ -1496,6 +1500,18 @@ void SettingsModel::setRemoteProvisioning (const QString &remoteProvisioning) {
|
||||||
emit remoteProvisioningNotChanged(urlRemoteProvisioning);
|
emit remoteProvisioningNotChanged(urlRemoteProvisioning);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool SettingsModel::isQRCodeAvailable() const{
|
||||||
|
return linphone::Factory::get()->isQrcodeAvailable() && !!mConfig->getInt(UiSection, "use_qrcode", 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
QString SettingsModel::getFlexiAPIUrl() const{
|
||||||
|
return Utils::coreStringToAppString(CoreManager::getInstance()->getCore()->getAccountCreatorUrl());
|
||||||
|
}
|
||||||
|
void SettingsModel::setFlexiAPIUrl (const QString &url){
|
||||||
|
CoreManager::getInstance()->getCore()->setAccountCreatorUrl(Utils::appStringToCoreString(url));
|
||||||
|
emit flexiAPIUrlChanged(url);
|
||||||
|
}
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
bool SettingsModel::getExitOnClose () const {
|
bool SettingsModel::getExitOnClose () const {
|
||||||
|
|
|
||||||
|
|
@ -194,6 +194,7 @@ class SettingsModel : public QObject {
|
||||||
Q_PROPERTY(int textMessageFontSize READ getTextMessageFontSize WRITE setTextMessageFontSize NOTIFY textMessageFontSizeChanged)
|
Q_PROPERTY(int textMessageFontSize READ getTextMessageFontSize WRITE setTextMessageFontSize NOTIFY textMessageFontSizeChanged)
|
||||||
|
|
||||||
Q_PROPERTY(QString remoteProvisioning READ getRemoteProvisioning WRITE setRemoteProvisioning NOTIFY remoteProvisioningChanged)
|
Q_PROPERTY(QString remoteProvisioning READ getRemoteProvisioning WRITE setRemoteProvisioning NOTIFY remoteProvisioningChanged)
|
||||||
|
Q_PROPERTY(QString flexiAPIUrl READ getFlexiAPIUrl WRITE setFlexiAPIUrl NOTIFY flexiAPIUrlChanged)
|
||||||
|
|
||||||
Q_PROPERTY(QString savedScreenshotsFolder READ getSavedScreenshotsFolder WRITE setSavedScreenshotsFolder NOTIFY savedScreenshotsFolderChanged)
|
Q_PROPERTY(QString savedScreenshotsFolder READ getSavedScreenshotsFolder WRITE setSavedScreenshotsFolder NOTIFY savedScreenshotsFolderChanged)
|
||||||
Q_PROPERTY(QString savedCallsFolder READ getSavedCallsFolder WRITE setSavedCallsFolder NOTIFY savedCallsFolderChanged)
|
Q_PROPERTY(QString savedCallsFolder READ getSavedCallsFolder WRITE setSavedCallsFolder NOTIFY savedCallsFolderChanged)
|
||||||
|
|
@ -553,9 +554,14 @@ public:
|
||||||
QString getDownloadFolder () const;
|
QString getDownloadFolder () const;
|
||||||
void setDownloadFolder (const QString &folder);
|
void setDownloadFolder (const QString &folder);
|
||||||
|
|
||||||
|
QString getRemoteProvisioningRootUrl() const;
|
||||||
QString getRemoteProvisioning () const;
|
QString getRemoteProvisioning () const;
|
||||||
void setRemoteProvisioning (const QString &remoteProvisioning);
|
void setRemoteProvisioning (const QString &remoteProvisioning);
|
||||||
|
|
||||||
|
Q_INVOKABLE bool isQRCodeAvailable() const;
|
||||||
|
QString getFlexiAPIUrl() const;
|
||||||
|
void setFlexiAPIUrl (const QString &url);
|
||||||
|
|
||||||
bool getExitOnClose () const;
|
bool getExitOnClose () const;
|
||||||
void setExitOnClose (bool value);
|
void setExitOnClose (bool value);
|
||||||
|
|
||||||
|
|
@ -769,6 +775,7 @@ signals:
|
||||||
|
|
||||||
void remoteProvisioningChanged (const QString &remoteProvisioning);
|
void remoteProvisioningChanged (const QString &remoteProvisioning);
|
||||||
void remoteProvisioningNotChanged (const QString &remoteProvisioning);
|
void remoteProvisioningNotChanged (const QString &remoteProvisioning);
|
||||||
|
void flexiAPIUrlChanged (const QString &url);
|
||||||
|
|
||||||
void exitOnCloseChanged (bool value);
|
void exitOnCloseChanged (bool value);
|
||||||
void mipmapEnabledChanged();
|
void mipmapEnabledChanged();
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,7 @@ constexpr char Constants::DefaultXmlrpcUri[];
|
||||||
constexpr char Constants::DefaultConferenceURI[];
|
constexpr char Constants::DefaultConferenceURI[];
|
||||||
constexpr char Constants::DefaultVideoConferenceURI[];
|
constexpr char Constants::DefaultVideoConferenceURI[];
|
||||||
constexpr char Constants::DefaultLimeServerURL[];
|
constexpr char Constants::DefaultLimeServerURL[];
|
||||||
|
constexpr char Constants::DefaultFlexiAPIURL[];
|
||||||
constexpr char Constants::RemoteProvisioningURL[];
|
constexpr char Constants::RemoteProvisioningURL[];
|
||||||
constexpr char Constants::DefaultAssistantRegistrationUrl[];
|
constexpr char Constants::DefaultAssistantRegistrationUrl[];
|
||||||
constexpr char Constants::DefaultAssistantLoginUrl[];
|
constexpr char Constants::DefaultAssistantLoginUrl[];
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,9 @@ public:
|
||||||
static constexpr char DefaultConferenceURI[] = "sip:conference-factory@sip.linphone.org";
|
static constexpr char DefaultConferenceURI[] = "sip:conference-factory@sip.linphone.org";
|
||||||
static constexpr char DefaultVideoConferenceURI[] = "sip:videoconference-factory@sip.linphone.org";
|
static constexpr char DefaultVideoConferenceURI[] = "sip:videoconference-factory@sip.linphone.org";
|
||||||
static constexpr char DefaultLimeServerURL[] = "https://lime.linphone.org/lime-server/lime-server.php";
|
static constexpr char DefaultLimeServerURL[] = "https://lime.linphone.org/lime-server/lime-server.php";
|
||||||
static constexpr char RemoteProvisioningURL[] = "https://subscribe.linphone.org/flexiapi/provisioning";
|
|
||||||
|
static constexpr char DefaultFlexiAPIURL[] = "http://fs-test-sandbox.linphone.org/flexiapi/api/";// Need "/" at the end
|
||||||
|
static constexpr char RemoteProvisioningURL[] = "http://fs-test-sandbox.linphone.org/flexiapi/provisioning";
|
||||||
|
|
||||||
Q_PROPERTY(QString PasswordRecoveryUrl MEMBER PasswordRecoveryUrl CONSTANT)
|
Q_PROPERTY(QString PasswordRecoveryUrl MEMBER PasswordRecoveryUrl CONSTANT)
|
||||||
Q_PROPERTY(QString CguUrl MEMBER CguUrl CONSTANT)
|
Q_PROPERTY(QString CguUrl MEMBER CguUrl CONSTANT)
|
||||||
|
|
|
||||||
|
|
@ -78,11 +78,11 @@ LinphoneEnums::ConferenceLayout LinphoneEnums::fromLinphone(const linphone::Conf
|
||||||
return static_cast<LinphoneEnums::ConferenceLayout>(layout);
|
return static_cast<LinphoneEnums::ConferenceLayout>(layout);
|
||||||
}
|
}
|
||||||
|
|
||||||
linphone::ConferenceInfoState LinphoneEnums::toLinphone(const LinphoneEnums::ConferenceInfoState& state){
|
linphone::ConferenceInfo::State LinphoneEnums::toLinphone(const LinphoneEnums::ConferenceInfoState& state){
|
||||||
return static_cast<linphone::ConferenceInfoState>(state);
|
return static_cast<linphone::ConferenceInfo::State>(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
LinphoneEnums::ConferenceInfoState LinphoneEnums::fromLinphone(const linphone::ConferenceInfoState& state){
|
LinphoneEnums::ConferenceInfoState LinphoneEnums::fromLinphone(const linphone::ConferenceInfo::State& state){
|
||||||
return static_cast<LinphoneEnums::ConferenceInfoState>(state);
|
return static_cast<LinphoneEnums::ConferenceInfoState>(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -123,14 +123,14 @@ LinphoneEnums::ConferenceLayout fromLinphone(const linphone::ConferenceLayout& l
|
||||||
|
|
||||||
|
|
||||||
enum ConferenceInfoState {
|
enum ConferenceInfoState {
|
||||||
ConferenceInfoStateNew = int(linphone::ConferenceInfoState::New),
|
ConferenceInfoStateNew = int(linphone::ConferenceInfo::State::New),
|
||||||
ConferenceInfoStateUpdated = int(linphone::ConferenceInfoState::Updated),
|
ConferenceInfoStateUpdated = int(linphone::ConferenceInfo::State::Updated),
|
||||||
ConferenceInfoStateCancelled = int(linphone::ConferenceInfoState::Cancelled)
|
ConferenceInfoStateCancelled = int(linphone::ConferenceInfo::State::Cancelled)
|
||||||
};
|
};
|
||||||
Q_ENUM_NS(ConferenceInfoState)
|
Q_ENUM_NS(ConferenceInfoState)
|
||||||
|
|
||||||
linphone::ConferenceInfoState toLinphone(const LinphoneEnums::ConferenceInfoState& state);
|
linphone::ConferenceInfo::State toLinphone(const LinphoneEnums::ConferenceInfoState& state);
|
||||||
LinphoneEnums::ConferenceInfoState fromLinphone(const linphone::ConferenceInfoState& state);
|
LinphoneEnums::ConferenceInfoState fromLinphone(const linphone::ConferenceInfo::State& state);
|
||||||
|
|
||||||
|
|
||||||
enum ParticipantDeviceState {
|
enum ParticipantDeviceState {
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@ Item {
|
||||||
property alias text: button.text
|
property alias text: button.text
|
||||||
property bool enabled: true
|
property bool enabled: true
|
||||||
property bool showBorder : false
|
property bool showBorder : false
|
||||||
|
property alias toggled : button.checked
|
||||||
|
|
||||||
property alias capitalization : button.capitalization
|
property alias capitalization : button.capitalization
|
||||||
|
|
||||||
|
|
@ -44,7 +45,7 @@ Item {
|
||||||
return colorDisabled
|
return colorDisabled
|
||||||
}
|
}
|
||||||
|
|
||||||
return button.down
|
return button.down || button.checked
|
||||||
? colorPressed
|
? colorPressed
|
||||||
: (button.hovered ? colorHovered : colorNormal)
|
: (button.hovered ? colorHovered : colorNormal)
|
||||||
}
|
}
|
||||||
|
|
@ -54,7 +55,7 @@ Item {
|
||||||
return borderColorDisabled
|
return borderColorDisabled
|
||||||
}
|
}
|
||||||
|
|
||||||
return button.down
|
return button.down || button.checked
|
||||||
? borderColorPressed
|
? borderColorPressed
|
||||||
: (button.hovered ? borderColorHovered : borderColorNormal)
|
: (button.hovered ? borderColorHovered : borderColorNormal)
|
||||||
}
|
}
|
||||||
|
|
@ -64,15 +65,16 @@ Item {
|
||||||
return textColorDisabled
|
return textColorDisabled
|
||||||
}
|
}
|
||||||
|
|
||||||
return button.down
|
return button.down || button.checked
|
||||||
? textColorPressed
|
? textColorPressed
|
||||||
: (button.hovered ? textColorHovered : textColorNormal)
|
: (button.hovered ? textColorHovered : textColorNormal)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
property int fitHeight: button.contentItem.implicitHeight + addHeight
|
||||||
height: button.contentItem.implicitHeight + addHeight
|
property int fitWidth: button.contentItem.implicitWidth + addWidth
|
||||||
width: button.contentItem.implicitWidth + addWidth
|
height: fitHeight
|
||||||
|
width: fitWidth
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ Item {
|
||||||
titleColor: isSelected
|
titleColor: isSelected
|
||||||
? TimelineStyle.contact.title.color.selected
|
? TimelineStyle.contact.title.color.selected
|
||||||
: TimelineStyle.contact.title.color.normal
|
: TimelineStyle.contact.title.color.normal
|
||||||
showSubtitle: mainItem.timelineModel.chatRoomModel.isOneToOne || !mainItem.timelineModel.chatRoomModel.isConference
|
showSubtitle: mainItem.timelineModel.chatRoomModel && (mainItem.timelineModel.chatRoomModel.isOneToOne || !mainItem.timelineModel.chatRoomModel.isConference)
|
||||||
TooltipArea {
|
TooltipArea {
|
||||||
id: contactTooltip
|
id: contactTooltip
|
||||||
text: mainItem.timelineModel && UtilsCpp.toDateTimeString(mainItem.timelineModel.chatRoomModel.lastUpdateTime)
|
text: mainItem.timelineModel && UtilsCpp.toDateTimeString(mainItem.timelineModel.chatRoomModel.lastUpdateTime)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import QtQuick 2.7
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Layouts 1.3
|
||||||
|
|
||||||
import Common 1.0
|
import Common 1.0
|
||||||
import Linphone 1.0
|
import Linphone 1.0
|
||||||
|
|
@ -7,18 +8,19 @@ import Utils 1.0
|
||||||
import App.Styles 1.0
|
import App.Styles 1.0
|
||||||
// =============================================================================
|
// =============================================================================
|
||||||
Item{
|
Item{
|
||||||
|
|
||||||
AssistantAbstractView {
|
AssistantAbstractView {
|
||||||
mainAction: requestBlock.execute
|
id: mainItem
|
||||||
mainActionEnabled: url.text.length > 0
|
|
||||||
mainActionLabel: qsTr('confirmAction')
|
|
||||||
|
|
||||||
title: qsTr('fetchRemoteConfigurationTitle')
|
title: qsTr('fetchRemoteConfigurationTitle')
|
||||||
width: AssistantAbstractViewStyle.content.width
|
maximized: true
|
||||||
height: AssistantAbstractViewStyle.content.height
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
//: 'generate' : title button to generate a code.
|
||||||
|
property string generateButtonText: qsTr('generateLabel')
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
AssistantModel {
|
||||||
|
id: assistantModel
|
||||||
|
property string qrcode
|
||||||
|
}
|
||||||
Connections {
|
Connections {
|
||||||
target: SettingsModel
|
target: SettingsModel
|
||||||
|
|
||||||
|
|
@ -38,41 +40,233 @@ Item{
|
||||||
|
|
||||||
onRemoteProvisioningNotChanged: requestBlock.stop(qsTr('remoteProvisioningError'))
|
onRemoteProvisioningNotChanged: requestBlock.stop(qsTr('remoteProvisioningError'))
|
||||||
}
|
}
|
||||||
|
Connections{
|
||||||
|
target: assistantModel
|
||||||
|
onNewQRCodeReceived: {assistantModel.qrcode = 'image://qrcode/'+code; requestBlock.stop('')}
|
||||||
|
onNewQRCodeNotReceived: requestBlock.stop(message)
|
||||||
|
onProvisioningTokenReceived: {url.text = token
|
||||||
|
SettingsModel.remoteProvisioning = url.text
|
||||||
|
assistantModel.qrcode = ''
|
||||||
|
requestBlock.stop('')}
|
||||||
|
|
||||||
|
onQRCodeAttached: requestBlock.stop('Attached')
|
||||||
|
onQRCodeNotAttached: requestBlock.stop(message)
|
||||||
|
|
||||||
|
onQRCodeFound: {
|
||||||
|
if(qRCodeRead.currentIndex == 0)
|
||||||
|
url.text = token;
|
||||||
|
else
|
||||||
|
assistantModel.attachAccount(token)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
Column {
|
ColumnLayout {
|
||||||
anchors.fill: parent.contentItem
|
anchors.fill: parent
|
||||||
anchors.topMargin: AssistantAbstractViewStyle.info.spacing
|
anchors.margins: 0
|
||||||
width: AssistantAbstractViewStyle.content.width
|
spacing: 0
|
||||||
height: AssistantAbstractViewStyle.content.height
|
|
||||||
|
|
||||||
Form {
|
Text{
|
||||||
orientation: Qt.Vertical
|
Layout.alignment: Qt.AlignCenter
|
||||||
width: parent.width
|
Layout.preferredWidth: urlLayout.width
|
||||||
|
|
||||||
FormLine {
|
font.pointSize: FetchRemoteConfigurationStyle.fieldTitles.pointSize
|
||||||
FormGroup {
|
font.weight: Font.Bold
|
||||||
label: qsTr('urlLabel')
|
color: FetchRemoteConfigurationStyle.fieldTitles.color
|
||||||
|
|
||||||
|
|
||||||
|
text: qsTr('urlLabel')
|
||||||
|
}
|
||||||
|
RowLayout{
|
||||||
|
id: urlLayout
|
||||||
|
Layout.preferredHeight: fetchButton.fitHeight
|
||||||
|
Layout.alignment: Qt.AlignCenter
|
||||||
|
|
||||||
|
spacing: 10
|
||||||
|
|
||||||
TextField {
|
TextField {
|
||||||
|
Layout.preferredWidth: mainItem.width/2
|
||||||
id: url
|
id: url
|
||||||
}
|
}
|
||||||
|
TextButtonB {
|
||||||
|
id: fetchButton
|
||||||
|
Layout.preferredWidth: fitWidth
|
||||||
|
Layout.preferredHeight: fitHeight
|
||||||
|
addHeight: 15
|
||||||
|
|
||||||
|
onClicked: SettingsModel.remoteProvisioning = url.text
|
||||||
|
|
||||||
|
text: qsTr('confirmAction')
|
||||||
|
enabled: url.text.length > 0
|
||||||
}
|
}
|
||||||
}
|
/*Dev Tool
|
||||||
|
TextButtonB {
|
||||||
|
id: testButton
|
||||||
|
Layout.preferredWidth: fitWidth
|
||||||
|
Layout.preferredHeight: fitHeight
|
||||||
|
|
||||||
|
onClicked: assistantModel.createTestAccount()
|
||||||
|
|
||||||
|
text: 'Create Test'
|
||||||
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
RequestBlock {
|
RequestBlock {
|
||||||
id: requestBlock
|
id: requestBlock
|
||||||
|
|
||||||
action: (function () {
|
action: (function () {
|
||||||
SettingsModel.remoteProvisioning = url.text
|
|
||||||
})
|
})
|
||||||
|
Layout.preferredWidth: parent.width
|
||||||
|
|
||||||
width: parent.width
|
}
|
||||||
|
Text{
|
||||||
|
Layout.topMargin: 15
|
||||||
|
Layout.alignment: Qt.AlignCenter
|
||||||
|
visible: SettingsModel.isQRCodeAvailable()
|
||||||
|
|
||||||
|
font.pointSize: FetchRemoteConfigurationStyle.fieldTitles.pointSize
|
||||||
|
font.weight: Font.Bold
|
||||||
|
font.capitalization: Font.Capitalize
|
||||||
|
color: FetchRemoteConfigurationStyle.fieldTitles.color
|
||||||
|
//: 'or' : conjunction to choose between options.
|
||||||
|
text: qsTr('or')
|
||||||
|
}
|
||||||
|
ColumnLayout{
|
||||||
|
id: simpleQRCodeOptionsView
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.margins: 15
|
||||||
|
visible: SettingsModel.isQRCodeAvailable() && !SettingsModel.developerSettingsEnabled
|
||||||
|
Layout.alignment: Qt.AlignCenter
|
||||||
|
spacing: 15
|
||||||
|
Rectangle{
|
||||||
|
Layout.fillHeight: true
|
||||||
|
Layout.preferredWidth: height
|
||||||
|
Layout.alignment: Qt.AlignCenter
|
||||||
|
border.color: FetchRemoteConfigurationStyle.qRCode.borderColor
|
||||||
|
radius: 20
|
||||||
|
border.width: 1
|
||||||
|
Text{
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.margins: 10
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
|
||||||
|
visible: assistantModel.qrcode == ''
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
font.pointSize: FetchRemoteConfigurationStyle.explanationQRCode.pointSize
|
||||||
|
color: FetchRemoteConfigurationStyle.explanationQRCode.color
|
||||||
|
//: 'Click on %1 to obtain your remote provisioning QR code' : Describe how to get a remote provisioning QR code by clicking on %1 button (1% is the text in button)
|
||||||
|
text : qsTr('remoteProvisioningHow').arg(mainItem.generateButtonText)
|
||||||
|
}
|
||||||
|
Image{
|
||||||
|
anchors.fill: parent
|
||||||
|
anchors.margins: 20
|
||||||
|
sourceSize.width: width
|
||||||
|
sourceSize.height: height
|
||||||
|
source: assistantModel.qrcode
|
||||||
|
visible: source != ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Text{
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: contentHeight
|
||||||
|
Layout.alignment: Qt.AlignCenter
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
|
||||||
|
visible: assistantModel.qrcode != ''
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
font.pointSize: FetchRemoteConfigurationStyle.explanationQRCode.pointSize
|
||||||
|
color: FetchRemoteConfigurationStyle.explanationQRCode.color
|
||||||
|
//: 'Scan the QR code with your phone' : Explain how to use the QRCode by flasing it.
|
||||||
|
text: qsTr('scanQRCode') + '\n'
|
||||||
|
//: 'In your app go in assistant - QR code provisioning' : Describe where to flash the QRCode in the mobile application.
|
||||||
|
+qsTr('scanQRCodeWhere')
|
||||||
|
}
|
||||||
|
TextButtonB {
|
||||||
|
Layout.alignment: Qt.AlignCenter
|
||||||
|
text: mainItem.generateButtonText
|
||||||
|
onClicked: assistantModel.requestQRCode()
|
||||||
|
capitalization: Font.AllUppercase
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//------------------------------------------------------------------
|
||||||
|
// Developer Section
|
||||||
|
//------------------------------------------------------------------
|
||||||
|
GridLayout{
|
||||||
|
id: allQRCodeOptionsView
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.margins: 15
|
||||||
|
visible: SettingsModel.isQRCodeAvailable() && SettingsModel.developerSettingsEnabled
|
||||||
|
columns: 2
|
||||||
|
RowLayout{
|
||||||
|
Layout.fillWidth: true
|
||||||
|
ComboBox {
|
||||||
|
id: qRCodeGeneration
|
||||||
|
|
||||||
|
model: ['URL', 'Attach token']
|
||||||
|
currentIndex:0
|
||||||
|
Component.onCompleted: {}
|
||||||
|
}
|
||||||
|
TextButtonB {
|
||||||
|
text: mainItem.generateButtonText
|
||||||
|
capitalization: Font.AllUppercase
|
||||||
|
onClicked: if(qRCodeGeneration.currentIndex == 0 )
|
||||||
|
assistantModel.generateQRCode()
|
||||||
|
else
|
||||||
|
assistantModel.requestQRCode()
|
||||||
|
}
|
||||||
|
Item{
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
RowLayout{
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Item{
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
ComboBox {
|
||||||
|
id: qRCodeRead
|
||||||
|
|
||||||
|
model: ['URL', 'Attach token']
|
||||||
|
currentIndex:0
|
||||||
|
Component.onCompleted: {}
|
||||||
|
}
|
||||||
|
TextButtonB {
|
||||||
|
id: qQRCodeReadButton
|
||||||
|
text: 'Read'
|
||||||
|
onClicked:assistantModel.readQRCode()
|
||||||
|
|
||||||
|
toggled: assistantModel.isReadingQRCode
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Image{
|
||||||
|
Layout.fillHeight: true
|
||||||
|
Layout.preferredWidth: height
|
||||||
|
Layout.alignment: Qt.AlignCenter
|
||||||
|
sourceSize.width: width
|
||||||
|
sourceSize.height: height
|
||||||
|
source: assistantModel.qrcode
|
||||||
|
visible: source != ''
|
||||||
|
}
|
||||||
|
CameraSticker{
|
||||||
|
Layout.fillHeight: true
|
||||||
|
Layout.preferredWidth: height
|
||||||
|
Layout.alignment: Qt.AlignCenter
|
||||||
|
showUsername: false
|
||||||
|
showCustomButton: false
|
||||||
|
visible: allQRCodeOptionsView.visible && assistantModel.isReadingQRCode
|
||||||
|
deactivateCamera: !visible
|
||||||
|
isPreview: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Item{
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.fillHeight: true
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
if( !CoreManager.isLastRemoteProvisioningGood() )
|
if( !CoreManager.isLastRemoteProvisioningGood() )
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
pragma Singleton
|
||||||
|
import QtQml 2.2
|
||||||
|
|
||||||
|
import ColorsList 1.0
|
||||||
|
import Units 1.0
|
||||||
|
// =============================================================================
|
||||||
|
|
||||||
|
QtObject {
|
||||||
|
property string sectionName: 'FetchRemoteConfiguration'
|
||||||
|
|
||||||
|
property QtObject fieldTitles: QtObject{
|
||||||
|
property int pointSize: Units.dp * 10
|
||||||
|
property color color: ColorsList.add(sectionName+'_url_title', 'j').color
|
||||||
|
}
|
||||||
|
property QtObject qRCode : QtObject{
|
||||||
|
property color borderColor: ColorsList.add(sectionName+'_qrcode_border', 'border_light').color
|
||||||
|
}
|
||||||
|
property QtObject explanationQRCode : QtObject{
|
||||||
|
property int pointSize: Units.dp * 9
|
||||||
|
property color color: ColorsList.add(sectionName+'_qrcode_text', 'j').color
|
||||||
|
}
|
||||||
|
|
||||||
|
property QtObject checkBox: QtObject {
|
||||||
|
property int width: 300
|
||||||
|
}
|
||||||
|
property QtObject warningBlock: QtObject {
|
||||||
|
property int spacing: 10
|
||||||
|
property int pointSize: Units.dp * 10
|
||||||
|
property color color: ColorsList.add(sectionName+'_description', 'g').color
|
||||||
|
|
||||||
|
property QtObject contactUrl: QtObject {
|
||||||
|
property color color: ColorsList.add(sectionName+'_url', 'i').color
|
||||||
|
property int pointSize: Units.dp * 9
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -28,6 +28,7 @@ singleton ActivateAppSipAccountWithPhoneNumberStyle 1.0 Main/Assistant/Acti
|
||||||
singleton AssistantAbstractViewStyle 1.0 Main/Assistant/AssistantAbstractViewStyle.qml
|
singleton AssistantAbstractViewStyle 1.0 Main/Assistant/AssistantAbstractViewStyle.qml
|
||||||
singleton AssistantHomeStyle 1.0 Main/Assistant/AssistantHomeStyle.qml
|
singleton AssistantHomeStyle 1.0 Main/Assistant/AssistantHomeStyle.qml
|
||||||
singleton CreateAppSipAccountStyle 1.0 Main/Assistant/CreateAppSipAccountStyle.qml
|
singleton CreateAppSipAccountStyle 1.0 Main/Assistant/CreateAppSipAccountStyle.qml
|
||||||
|
singleton FetchRemoteConfigurationStyle 1.0 Main/Assistant/FetchRemoteConfigurationStyle.qml
|
||||||
singleton UseAppSipAccountStyle 1.0 Main/Assistant/UseAppSipAccountStyle.qml
|
singleton UseAppSipAccountStyle 1.0 Main/Assistant/UseAppSipAccountStyle.qml
|
||||||
|
|
||||||
singleton AssistantStyle 1.0 Main/AssistantStyle.qml
|
singleton AssistantStyle 1.0 Main/AssistantStyle.qml
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 51e5432a98a42a889e7cbb4dba52c5be3b433d69
|
Subproject commit 8287aa2050536c6810ebc07cf13db579f091e1b5
|
||||||
Loading…
Add table
Reference in a new issue