Коммит e48c8c26 создал по автору OMP Education's avatar OMP Education
Просмотр файлов

Implement working with Call API

владелец e058e275
# Copyright (C) 2016 Olivier Goffart <ogoffart@woboq.com>
#
# You may use this file under the terms of the 3-clause BSD license.
# See the file LICENSE from this package for details.
# This is the clang-format configuration style to be used by Qt,
# based on the rules from https://wiki.qt.io/Qt_Coding_Style and
# https://wiki.qt.io/Coding_Conventions
---
# Webkit style was loosely based on the Qt style
BasedOnStyle: WebKit
Standard: c++17
# Column width is limited to 100 in accordance with Qt Coding Style.
# https://wiki.qt.io/Qt_Coding_Style
# Note that this may be changed at some point in the future.
ColumnLimit: 100
# How much weight do extra characters after the line length limit have.
# PenaltyExcessCharacter: 4
# Disable reflow of some specific comments
# qdoc comments: indentation rules are different.
# Translation comments and SPDX license identifiers are also excluded.
CommentPragmas: "^!|^:|^ SPDX-License-Identifier:"
# We want a space between the type and the star for pointer types.
PointerBindsToType: false
# We use template< without space.
SpaceAfterTemplateKeyword: false
# We want to break before the operators, but not before a '='.
BreakBeforeBinaryOperators: NonAssignment
# Braces are usually attached, but not after functions or class declarations.
BreakBeforeBraces: Custom
BraceWrapping:
AfterClass: true
AfterControlStatement: false
AfterEnum: false
AfterFunction: true
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: true
AfterUnion: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
# When constructor initializers do not fit on one line, put them each on a new line.
ConstructorInitializerAllOnOneLineOrOnePerLine: true
# Indent initializers by 4 spaces
ConstructorInitializerIndentWidth: 4
# Indent width for line continuations.
ContinuationIndentWidth: 8
# No indentation for namespaces.
NamespaceIndentation: None
# Allow indentation for preprocessing directives (if/ifdef/endif). https://reviews.llvm.org/rL312125
IndentPPDirectives: AfterHash
# Horizontally align arguments after an open bracket.
# The coding style does not specify the following, but this is what gives
# results closest to the existing code.
AlignAfterOpenBracket: true
AlwaysBreakTemplateDeclarations: true
# Ideally we should also allow less short function in a single line, but
# clang-format does not handle that.
AllowShortFunctionsOnASingleLine: Inline
# The coding style specifies some include order categories, but also tells to
# separate categories with an empty line. It does not specify the order within
# the categories. Since the SortInclude feature of clang-format does not
# re-order includes separated by empty lines, the feature is not used.
SortIncludes: false
# macros for which the opening brace stays attached.
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH, forever, Q_FOREVER, QBENCHMARK, QBENCHMARK_ONCE ]
# Break constructor initializers before the colon and after the commas.
BreakConstructorInitializers: BeforeColon
# Avoids the addition of a space between an identifier and the
# initializer list in list-initialization.
SpaceBeforeCpp11BracedList: false
......@@ -3,7 +3,9 @@
* Kirill Chuvilin, <k.chuvilin@omp.ru>
* Product owner, 2024
* Konstantin Zvyagin, <k.zvyagin@omp.ru>
* Maintainer, Reviewer, 2024
* Maintainer, 2024
* Developer, 2024
* Reviewer, 2024
* Andrey Vasilyev
* Developer, 2024
* Ivan Shchitov
......
......@@ -4,12 +4,16 @@
cmake_minimum_required(VERSION 3.5)
project(ru.auroraos.CallApiOverall CXX)
find_package (Qt5 COMPONENTS Core Network Qml Gui Quick LinguistTools REQUIRED)
find_package (Qt5 COMPONENTS Core Network Qml Gui Quick DBus Multimedia LinguistTools REQUIRED)
include(FindPkgConfig)
pkg_search_module(AURORA auroraapp REQUIRED)
pkg_search_module(AURORA auroraapp_i18n REQUIRED)
find_package(PkgConfig)
pkg_check_modules(LIBRESOURCEQT5 libresourceqt5 IMPORTED_TARGET)
cmake_policy(SET CMP0071 NEW)
set(CMAKE_AUTOMOC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
......@@ -18,25 +22,48 @@ set(short_name CallApiOverall)
file(GLOB TsFiles "translations/*.ts")
qt5_add_translation(QmFiles ${TsFiles})
qt5_create_translation(QmFiles ${CMAKE_SOURCE_DIR} ${TsFiles})
set(SOURCES
src/main.cpp
src/controllers/mainpagecontroller.h
src/controllers/mainpagecontroller.cpp
src/callapi/callmanagerdbusadaptor.h
src/callapi/callmanagerdbusadaptor.cpp
src/callapi/dbustypes.h
src/callapi/callservice1dbusinterface.h
src/callapi/callservice1dbusinterface.cpp
src/callapi/callmanager.h
src/callapi/callmanager.cpp
src/callapi/call1dbusobject.h
src/callapi/call1dbusobject.cpp
src/callapi/call1dbusadaptor.h
src/callapi/call1dbusadaptor.cpp
src/earpieceplayer.h
src/earpieceplayer.cpp
)
qt5_add_resources(RESOURCES resources.qrc)
set(CMAKE_SKIP_RPATH FALSE)
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}/lib")
add_executable(${PROJECT_NAME} ${SOURCES} ${QmFiles})
add_executable(${PROJECT_NAME} ${SOURCES} ${QmFiles} ${RESOURCES})
target_compile_definitions(${PROJECT_NAME} PRIVATE
$<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>
)
target_include_directories(${PROJECT_NAME} PRIVATE
$<BUILD_INTERFACE:
${AURORA_INCLUDE_DIRS}
src
>)
target_link_libraries(${PROJECT_NAME} PRIVATE
Qt5::Quick
Qt5::DBus
Qt5::Multimedia
PkgConfig::LIBRESOURCEQT5
${AURORA_LDFLAGS}
)
......@@ -72,8 +99,7 @@ add_custom_target(distfiles
SOURCES
${PROJECT_NAME}.desktop
rpm/${PROJECT_NAME}.spec
rpm/${PROJECT_NAME}.changes.in
rpm/${PROJECT_NAME}.changes.run.in
${RESOURCES}
${QmlFiles}
${TsFiles}
${IconFiles})
......
......@@ -79,5 +79,5 @@ please contact <community@omp.ru>.
This work is licensed under a Creative Commons Attribution 3.0 Unported License
For attribution requirements:
«Open Mobile Platform Code of Conduct»
Copyright (c) 2021 Open Mobile Platform LLC,
Copyright (c) 2024 Open Mobile Platform LLC,
used under a [Creative Commons Attribution Unported license](http://creativecommons.org/licenses/by/3.0/).
# The 3-Clause BSD License
_Copyright (C) Copyright (c) 2024. Open Mobile Platform LLC._
_Copyright (c) 2024 Open Mobile Platform LLC._
Redistribution and use in source and binary forms,
with or without modification,
......
# Call API example
# Call API Overall
Aurora OS example to demonstrate the Call API.
## Terms of Use and Participation
The source code of the project is provided under [the license](LICENSE.BSD-3-Clause.md), that allows it to be used in third-party applications.
The source code of the project is provided under [the license](LICENSE.BSD-3-Clause.md), which allows its use in third-party applications.
The [contributor agreement](CONTRIBUTING.md) documents the rights granted by contributors to the Open Mobile Platform.
The [contributor agreement](CONTRIBUTING.md) documents the rights granted by contributors of the Open Mobile Platform.
For information about contributors see [AUTHORS](AUTHORS.md).
Information about the contributors is specified in the [AUTHORS](AUTHORS.md) file.
[Code of conduct](CODE_OF_CONDUCT.md) is a current set of rules of the Open Mobile Platform which informs you how we expect the members of the community will interact while contributing and communicating.
## Project Structure
The project has a common structure of an application based on C++ and QML for Aurora OS.
The project has a standard structure of an application based on C++ and QML for Aurora OS.
* **[ru.auroraos.CallApiOverall.pro](ru.auroraos.CallApiOverall.pro)** file
describes the project structure for the qmake build system.
* **[icons](icons)** directory contains application icons for different screen resolutions.
* **[CMakeLists.txt](CMakeLists.txt)** file
describes the project structure for the CMake build system.
* **[icons](icons)** directory contains application icons for different screen resolutions.
* **[qml](qml)** directory contains the QML source code and the UI resources.
* **[cover](qml/cover)** directory contains the application cover implementations.
* **[icons](qml/icons)** directory contains the custom UI icons.
......@@ -29,6 +29,8 @@ The project has a common structure of an application based on C++ and QML for Au
**[ru.auroraos.CallApiOverall.spec](rpm/ru.auroraos.CallApiOverall.spec)** file is used by rpmbuild tool.
* **[src](src)** directory contains the C++ source code.
* **[main.cpp](src/main.cpp)** file is the application entry point.
* **[callapi](src/callapi)** directory contains the C++ source code to work with Call API.
* **[controllers](src/controllers)** directory contains the C++ source code with controllers for the QML pages.
* **[translations](translations)** directory contains the UI translation files.
* **[ru.auroraos.CallApiOverall.desktop](ru.auroraos.CallApiOverall.desktop)** file
defines the display and parameters for launching the application.
......@@ -37,13 +39,21 @@ The project has a common structure of an application based on C++ and QML for Au
The project is compatible with all the supported versions of the Aurora OS.
## Project Building
## Features
The project is built in the usual way using the Aurora SDK.
The application has been tested for the following features:
* The application allows to initiate the outgoing call via Call API.
* The application allows to initiate the incoming call via Call API.
* The application allows to hold the current call via Call API.
* The application allows to display the system call notification and call screen.
* The application allows to play test audio-files when the current call is in the outgoing, active and held statuses.
## Features
## Screenshots
![screenshots](screenshots/en/screenshot-01.png)
![screenshots](screenshots/en/screenshot-02.png)
![screenshots](screenshots/en/screenshot-03.png)
## This document in Russian / Перевод этого документа на русский язык
......
# Call API example
# Call API Overall
Приложение для демонстрации работы с Call API под ОС Аврора.
......@@ -6,31 +6,32 @@
Исходный код проекта предоставляется по [лицензии](LICENSE.BSD-3-Clause.md), которая позволяет использовать его в сторонних приложениях.
Соглашение участника [(документ на английском)](CONTRIBUTING.md) регламентирует права, предоставляемые участниками компании «Открытая Мобильная Платформа».
[Соглашение участника](CONTRIBUTING.md) регламентирует права, предоставляемые участниками компании «Открытая Мобильная Платформа».
Информация об участниках указана в файле [AUTHORS](AUTHORS.md).
Кодекс поведения [(документ на английском)](CODE_OF_CONDUCT.md) — это действующий набор правил компании «Открытая Мобильная Платформа», который информирует об ожиданиях по взаимодействию между членами сообщества при общении и работе над проектами
[Кодекс поведения](CODE_OF_CONDUCT.md) это действующий набор правил компании «Открытая Мобильная Платформа», который информирует об ожиданиях по взаимодействию между членами сообщества при общении и работе над проектами.
## Структура проекта
Проект имеет стандартную структуру приложения на базе C++ и QML для ОС Аврора.
* Файл **[ru.auroraos.CallApiOverall.pro](ru.auroraos.CallApiOverall.pro)**
описывает структуру проекта для системы сборки qmake.
* Директория **[icons](icons)** содержит иконки приложения для поддерживаемых разрешений экрана.
* Директория **[qml](qml)** содержит исходный код на QML и ресурсы интерфейса пользователя.
* Директория **[cover](qml/cover)** содержит реализации обложек приложения.
* Директория **[icons](qml/icons)** содержит дополнительные иконки интерфейса пользователя.
* Директория **[pages](qml/pages)** содержит страницы приложения.
* Файл **[CMakeLists.txt](CMakeLists.txt)**
описывает структуру проекта для системы сборки CMake.
* Каталог **[icons](icons)** содержит иконки приложения для поддерживаемых разрешений экрана.
* Каталог **[qml](qml)** содержит исходный код на QML и ресурсы интерфейса пользователя.
* Каталог **[cover](qml/cover)** содержит реализации обложек приложения.
* Каталог **[icons](qml/icons)** содержит дополнительные иконки интерфейса пользователя.
* Каталог **[pages](qml/pages)** содержит страницы приложения.
* Файл **[CallApiOverall.qml](qml/CallApiOverall.qml)**
предоставляет реализацию окна приложения.
* Директория **[rpm](rpm)** содержит настройки сборки rpm-пакета.
* Файл **[ru.auroraos.CallApiOverall.spec](rpm/ru.auroraos.CallApiOverall.spec)**
используется инструментом rpmbuild.
* Директория **[src](src)** содержит исходный код на C++.
* Каталог **[rpm](rpm)** содержит настройки сборки rpm-пакета.
* Файл **[ru.auroraos.CallApiOverall.spec](rpm/ru.auroraos.CallApiOverall.spec)** используется инструментом rpmbuild.
* Каталог **[src](src)** содержит исходный код на C++.
* Файл **[main.cpp](src/main.cpp)** является точкой входа в приложение.
* Директория **[translations](translations)** содержит файлы перевода интерфейса пользователя.
* Каталог **[callapi](src/callapi)** содержит исходный код на C++ для работы с Call API.
* **[controllers](src/controllers)** содержит исходный код на C++ для с контроллерами для QML-страниц.
* Каталог **[translations](translations)** содержит файлы перевода интерфейса пользователя.
* Файл **[ru.auroraos.CallApiOverall.desktop](ru.auroraos.CallApiOverall.desktop)**
определяет отображение и параметры запуска приложения.
......@@ -38,12 +39,21 @@
Проект совместим с актуальными версиями ОС Аврора.
## Сборка проекта
## Функционал
Проект собирается обычным образом с помощью Аврора SDK.
Приложение было протестировано на соответствие следующему функционалу:
## Функционал
* Приложение позволяет инициировать исходящий звонок с помощью Call API.
* Приложение позволяет инициировать входящий звонок с помощью Call API.
* Приложение позволяет ставить текущий вызов на удержание с помощью Call API.
* Приложение позволяет отображать системные уведомление о вызове и экран вызова.
* Приложение позволяет проигрывать тестовые аудио файлы, когда текущий вызов находится в одном из следующих статусов: исходящий, активный или на удержании.
## Снимки экранов
![screenshots](screenshots/ru/screenshot-01.png)
![screenshots](screenshots/ru/screenshot-02.png)
![screenshots](screenshots/ru/screenshot-03.png)
## This document in English
......
Файл добавлен
// SPDX-FileCopyrightText: 2024 Open Mobile Platform LLC <community@omp.ru>
// SPDX-License-Identifier: BSD-3-Clause
import QtQuick 2.0
import Sailfish.Silica 1.0
import ru.auroraos.CallApiOverall 1.0
ApplicationWindow {
objectName: "applicationWindow"
initialPage: Qt.resolvedUrl("pages/MainPage.qml")
cover: Qt.resolvedUrl("cover/DefaultCoverPage.qml")
allowedOrientations: defaultAllowedOrientations
CallManager {
id: appCallManager
}
}
// SPDX-FileCopyrightText: 2024 Open Mobile Platform LLC <community@omp.ru>
// SPDX-License-Identifier: BSD-3-Clause
import QtQuick 2.0
import Sailfish.Silica 1.0
CoverBackground {
objectName: "defaultCover"
CoverPlaceholder {
objectName: "placeholder"
text: qsTr("CallApiOverall")
icon {
source: Qt.resolvedUrl("../icons/CallApiOverall.svg")
sourceSize {
width: icon.width
height: icon.height
}
}
forceFit: true
Icon {
source: Qt.resolvedUrl("../icons/CallApiOverall.svg")
anchors.centerIn: parent
}
}
<svg width="1024" height="1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<path id="Background" d="m0 357.5c0-180.46 0-245.38 56.06-301.44s120.99-56.06 326.74-56.06h258.39c205.76 0 270.68 0 326.74 56.06s56.06 120.99 56.06 326.74v258.39c0 205.76 0 270.68-56.06 326.74-56.06 56.059-120.99 56.059-326.74 56.059h-258.39c-205.76 0-270.68 0-326.74-56.059-56.06-56.06-56.06-120.99-56.06-326.74z" fill="#003e88"/>
<mask id="Frame_Mask" maskUnits="userSpaceOnUse">
<use xlink:href="#Background"/>
</mask>
<g fill="none" mask="url(#Frame_Mask)" stroke="#4169e1" stroke-width="1024">
<path d="m-2e-5 512h1024" stroke-dasharray="1.024, 49.152, 1.024, 0"/>
<path d="m512-2.41e-5v1024" stroke-dasharray="1.024, 49.152, 1.024, 0"/>
<path d="m-2e-5 512h1024" stroke-dasharray="2.56, 506.88, 2.56, 0"/>
<path d="m512-2.41e-5v1024" stroke-dasharray="2.56, 506.88, 2.56, 0"/>
</g>
<radialGradient id="Aurora_Gradient" cx="253.16" cy="572.03" r="346.86" gradientTransform="matrix(1.7323 .99965 -1 1.7329 540.61 -618.36)" gradientUnits="userSpaceOnUse">
<stop stop-color="#fff" offset="0"/>
<stop stop-color="#fff" stop-opacity="0" offset="1"/>
</radialGradient>
<path d="m820.13 625.96h-23.404a3.7229 3.7229 0 0 1-3.2222-5.5952l8.1207-14.064a12.388 12.388 0 0 0 0-12.41l-35.161-60.959-53.775 93.007h-17.831a3.7229 3.7229 0 0 1-3.2222-5.5952l59.109-102.32a12.388 12.388 0 0 0 0-12.41l-35.161-60.959-204.15 353.24-9.2745-16.045a9.8624 9.8624 0 0 1 0-9.9277l197.7-341.96a12.388 12.388 0 0 0 0-12.41l-35.161-60.959-204.21 353.19-9.2528-16.045a9.8624 9.8624 0 0 1 0-9.9277l197.75-342.05a12.388 12.388 0 0 0 0-12.41l-35.182-61.003-206.7 357.61h-17.722a3.7229 3.7229 0 0 1-3.2221-5.5952l211.92-366.76a12.453 12.453 0 0 0 0-12.41l-35.182-60.959-257.66 445.72h-17.831a3.7229 3.7229 0 0 1-3.2221-5.5952l263.02-455.02a12.388 12.388 0 0 0 0-12.41l-35.204-60.938-346.86 601.06h208.15l138.16 238.94 138.18-238.94h209.22z" fill="url(#Aurora_Gradient)"/>
<svg width="252" height="314" viewBox="0 0 252 314" fill="none" xmlns="http://www.w3.org/2000/svg">
<g opacity="0.15">
<circle cx="209.5" cy="186.5" r="11" transform="rotate(90 209.5 186.5)" stroke="black" stroke-width="3"/>
<circle cx="161.5" cy="34.5" r="11" transform="rotate(90 161.5 34.5)" stroke="black" stroke-width="3"/>
<circle cx="134" cy="28" r="6.5" transform="rotate(90 134 28)" stroke="black" stroke-width="3"/>
<circle cx="25" cy="121" r="6.5" transform="rotate(90 25 121)" stroke="black" stroke-width="3"/>
<circle cx="191.5" cy="207.451" r="3.5" transform="rotate(90 191.5 207.451)" fill="#D9D9D9"/>
<circle cx="57.5" cy="204.5" r="3.5" fill="black"/>
<circle cx="27.5" cy="104.5" r="3.5" fill="#D9D9D9"/>
<path d="M111.5 27.0127C74.9508 32.1622 44.5625 56.4949 30.8461 89.5M182.5 42.8656C210.509 61.2751 229 92.9781 229 129C229 141.476 226.782 153.433 222.719 164.5M182.5 215.134C166.278 225.797 146.863 232 126 232C105.137 232 85.7222 225.797 69.5001 215.134M24.0845 144C26.9908 163.92 35.5987 181.99 48.1986 196.5" stroke="black" stroke-width="3" stroke-linecap="round"/>
<mask id="path-9-inside-1_1493_1469" fill="white">
<path fill-rule="evenodd" clip-rule="evenodd" d="M125.999 172C126.088 172 126.177 172 126.266 171.999H164.007V171.999C164.058 171.999 164.11 171.999 164.162 171.999C178.984 171.999 191 159.709 191 144.549C191 130.172 180.194 118.377 166.436 117.196C161.42 99.187 145.215 86 125.999 86C106.782 86 90.5773 99.1871 85.5618 117.196C71.8049 118.378 61 130.173 61 144.549C61 159.656 72.9314 171.913 87.6816 171.999V171.999H87.7545L87.8379 171.999L87.9213 171.999H125.732C125.821 172 125.91 172 125.999 172ZM123.151 120.997L118.766 124.76C120.439 128.081 122.523 131.309 124.976 134.3C127.429 137.29 130.146 139.914 133.063 142.188L137.448 138.424C138.91 137.17 141.01 137.12 142.528 138.306L149.974 144.156C152.026 145.779 152.095 148.924 150.108 150.63L145.54 154.55C141.909 157.667 136.741 158.081 132.668 155.585C126.714 151.956 121.243 147.256 116.538 141.521C111.833 135.786 108.258 129.459 105.798 122.831C104.102 118.296 105.398 113.163 109.03 110.046L113.598 106.126C115.585 104.42 118.613 105.027 119.808 107.385L124.148 115.902C125.016 117.624 124.613 119.742 123.151 120.997Z"/>
</mask>
<path d="M126.266 171.999V168.999H126.256L126.246 168.999L126.266 171.999ZM164.007 171.999V174.999H167.007V171.999H164.007ZM164.007 171.999L164.024 168.999L161.007 168.982V171.999H164.007ZM166.436 117.196L163.546 118.001L164.105 120.007L166.179 120.185L166.436 117.196ZM85.5618 117.196L85.8185 120.185L87.8932 120.007L88.4518 118.001L85.5618 117.196ZM87.6816 171.999H90.6816V169.016L87.6991 168.999L87.6816 171.999ZM87.6816 171.999H84.6816V174.999H87.6816V171.999ZM87.7545 171.999L87.7592 168.999H87.7545V171.999ZM87.8379 171.999L87.8332 174.999L87.8426 174.999L87.8379 171.999ZM87.9213 171.999V168.999H87.9166L87.9213 171.999ZM125.732 171.999L125.751 168.999L125.742 168.999H125.732V171.999ZM118.766 124.76L116.812 122.484L115.03 124.013L116.087 126.11L118.766 124.76ZM123.151 120.997L125.105 123.273L123.151 120.997ZM124.976 134.3L122.657 136.202L122.657 136.202L124.976 134.3ZM133.063 142.188L131.218 144.554L133.154 146.063L135.017 144.465L133.063 142.188ZM137.448 138.424L135.495 136.148L135.495 136.148L137.448 138.424ZM142.528 138.306L144.381 135.947L144.375 135.942L142.528 138.306ZM149.974 144.156L151.836 141.803L151.828 141.797L149.974 144.156ZM150.108 150.63L152.062 152.906V152.906L150.108 150.63ZM145.54 154.55L147.494 156.827L145.54 154.55ZM132.668 155.585L134.237 153.027L134.23 153.023L132.668 155.585ZM105.798 122.831L108.611 121.788L108.608 121.78L105.798 122.831ZM109.03 110.046L110.984 112.323H110.984L109.03 110.046ZM113.598 106.126L111.644 103.849L111.644 103.849L113.598 106.126ZM119.808 107.385L117.132 108.741L117.135 108.747L119.808 107.385ZM124.148 115.902L126.827 114.551L126.821 114.54L124.148 115.902ZM126.246 168.999C126.164 169 126.081 169 125.999 169V175C126.094 175 126.189 175 126.285 174.999L126.246 168.999ZM164.007 168.999H126.266V174.999H164.007V168.999ZM161.007 171.999V171.999H167.007V171.999H161.007ZM164.162 168.999C164.116 168.999 164.07 168.999 164.024 168.999L163.989 174.999C164.047 174.999 164.104 174.999 164.162 174.999V168.999ZM188 144.549C188 158.117 177.264 168.999 164.162 168.999V174.999C180.705 174.999 194 161.302 194 144.549H188ZM166.179 120.185C178.343 121.229 188 131.687 188 144.549H194C194 128.658 182.044 115.524 166.692 114.207L166.179 120.185ZM125.999 89C143.794 89 158.871 101.216 163.546 118.001L169.326 116.391C163.97 97.1582 146.637 83 125.999 83V89ZM88.4518 118.001C93.1264 101.216 108.204 89 125.999 89V83C105.361 83 88.0281 97.1583 82.6718 116.391L88.4518 118.001ZM64 144.549C64 131.687 73.6556 121.23 85.8185 120.185L85.305 114.207C69.9542 115.526 58 128.658 58 144.549H64ZM87.6991 168.999C74.6608 168.923 64 158.069 64 144.549H58C58 161.244 71.2019 174.903 87.6641 174.999L87.6991 168.999ZM90.6816 171.999V171.999H84.6816V171.999H90.6816ZM87.7545 168.999H87.6816V174.999H87.7545V168.999ZM87.8426 168.999L87.7592 168.999L87.7498 174.999L87.8332 174.999L87.8426 168.999ZM87.9166 168.999L87.8332 168.999L87.8426 174.999L87.9259 174.999L87.9166 168.999ZM125.732 168.999H87.9213V174.999H125.732V168.999ZM125.999 169C125.916 169 125.834 169 125.751 168.999L125.713 174.999C125.808 175 125.904 175 125.999 175V169ZM120.719 127.037L125.105 123.273L121.197 118.72L116.812 122.484L120.719 127.037ZM127.296 132.397C124.984 129.579 123.02 126.537 121.445 123.41L116.087 126.11C117.858 129.626 120.062 133.039 122.657 136.202L127.296 132.397ZM134.908 139.822C132.162 137.681 129.605 135.212 127.296 132.397L122.657 136.202C125.254 139.368 128.131 142.147 131.218 144.554L134.908 139.822ZM135.495 136.148L131.109 139.912L135.017 144.465L139.402 140.701L135.495 136.148ZM144.375 135.942C141.729 133.875 138.039 133.964 135.495 136.148L139.402 140.701C139.781 140.375 140.291 140.365 140.681 140.67L144.375 135.942ZM151.828 141.797L144.381 135.947L140.674 140.665L148.121 146.515L151.828 141.797ZM152.062 152.906C155.487 149.967 155.361 144.592 151.836 141.803L148.113 146.509C148.691 146.966 148.704 147.882 148.155 148.353L152.062 152.906ZM147.494 156.827L152.062 152.906L148.155 148.353L143.586 152.274L147.494 156.827ZM131.1 158.142C136.285 161.321 142.876 160.79 147.494 156.827L143.586 152.274C140.941 154.544 137.196 154.841 134.237 153.027L131.1 158.142ZM114.219 143.424C119.139 149.421 124.866 154.343 131.107 158.146L134.23 153.023C128.562 149.569 123.348 145.092 118.858 139.618L114.219 143.424ZM102.986 123.875C105.559 130.809 109.299 137.427 114.219 143.424L118.858 139.618C114.367 134.145 110.957 128.109 108.611 121.788L102.986 123.875ZM107.076 107.77C102.473 111.72 100.858 118.188 102.989 123.883L108.608 121.78C107.345 118.404 108.323 114.606 110.984 112.323L107.076 107.77ZM111.644 103.849L107.076 107.77L110.984 112.323L115.552 108.402L111.644 103.849ZM122.484 106.029C120.418 101.953 115.123 100.864 111.644 103.849L115.552 108.402C116.047 107.977 116.807 108.101 117.132 108.741L122.484 106.029ZM126.821 114.54L122.481 106.023L117.135 108.747L121.475 117.264L126.821 114.54ZM125.105 123.273C127.635 121.102 128.303 117.481 126.827 114.551L121.469 117.252C121.729 117.768 121.591 118.382 121.197 118.72L125.105 123.273Z" fill="black" mask="url(#path-9-inside-1_1493_1469)"/>
</g>
</svg>
// SPDX-FileCopyrightText: 2024 Open Mobile Platform LLC <community@omp.ru>
// SPDX-License-Identifier: BSD-3-Clause
import QtQuick 2.0
import Sailfish.Silica 1.0
......
// SPDX-FileCopyrightText: 2024 Open Mobile Platform LLC <community@omp.ru>
// SPDX-License-Identifier: BSD-3-Clause
import QtQuick 2.0
import Sailfish.Silica 1.0
Page {
objectName: "errorPage"
property alias errorMessage: errorMessageLabel.text
PageHeader {
id: pageHeader
objectName: "pageHeader"
title: qsTr("Error page")
}
Column {
objectName: "infoColumn"
anchors {
top: pageHeader.bottom
left: parent.left
right: parent.right
margins: Theme.horizontalPageMargin
}
spacing: Theme.paddingMedium
Label {
anchors {
left: parent.left
right: parent.right
}
text: qsTr("An error has occurred")
}
Label {
id: errorMessageLabel
anchors {
left: parent.left
right: parent.right
}
wrapMode: Text.Wrap
}
}
}
// SPDX-FileCopyrightText: 2024 Open Mobile Platform LLC <community@omp.ru>
// SPDX-License-Identifier: BSD-3-Clause
import QtQuick 2.0
import Sailfish.Silica 1.0
import ru.auroraos.CallApiOverall 1.0
Page {
id: root
objectName: "mainPage"
allowedOrientations: Orientation.All
onStatusChanged: {
if (status === PageStatus.Active)
controller.registerCallManager();
}
MainPageController {
id: controller
callManager: appCallManager
onCallManagerErrorReceived: pageStack.push(Qt.resolvedUrl("ErrorPage.qml"), {
"errorMessage": errorMessage
})
}
PageHeader {
id: pageHeader
objectName: "pageHeader"
title: qsTr("CallApiOverall")
title: qsTr("Call API")
extraContent.children: [
IconButton {
objectName: "aboutButton"
icon.source: "image://theme/icon-m-about"
anchors.verticalCenter: parent.verticalCenter
onClicked: pageStack.push(Qt.resolvedUrl("AboutPage.qml"))
}
]
}
Column {
id: column
objectName: "buttonsColumn"
anchors {
left: parent.left
right: parent.right
leftMargin: Theme.horizontalPageMargin
rightMargin: Theme.horizontalPageMargin
verticalCenter: parent.verticalCenter
}
spacing: Theme.paddingLarge
Timer {
id: incomingTimer
property int secsLeft: 5
interval: 1000
repeat: true
onTriggered: {
secsLeft -= 1;
if (secsLeft === 0) {
controller.startIncomingCall();
incomingTimer.stop();
secsLeft = 5;
}
}
}
Button {
objectName: "outgoingCallButton"
width: parent.width
enabled: !incomingTimer.running
text: qsTr("Outgoing call")
onClicked: controller.startOutgoingCall()
}
Button {
objectName: "incomingCallButton"
width: parent.width
enabled: !incomingTimer.running
text: qsTr("Incoming call") + (incomingTimer.running ? " (%1)".arg(incomingTimer.secsLeft) : "")
onClicked: incomingTimer.start()
}
}
}
Поддерживает Markdown
0% или .
You are about to add 0 people to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Пожалуйста, зарегистрируйтесь или чтобы прокомментировать