From 3fad8ee49eb4a17b3cd3c9f31066c6b5df26f079 Mon Sep 17 00:00:00 2001 From: Gaelle Braud Date: Fri, 10 Nov 2023 17:14:24 +0100 Subject: [PATCH] Overview : call page (with no call history) New items : Vertical tab bar, search bar, numeric pad --- Linphone/data/CMakeLists.txt | 28 ++ Linphone/data/image/address-book-selected.svg | 17 ++ .../image/chat-teardrop-text-selected.svg | 17 ++ Linphone/data/image/dialer-selected.svg | 3 + Linphone/data/image/dialer.svg | 3 + Linphone/data/image/group-call.svg | 11 + Linphone/data/image/noItemImage.svg | 65 +++++ Linphone/data/image/phone-selected.svg | 17 ++ Linphone/data/image/users-three-selected.svg | 17 ++ Linphone/model/account/AccountManager.cpp | 1 - Linphone/tool/providers/ImageProvider.cpp | 2 +- Linphone/view/App/Layout/LoginLayout.qml | 2 - Linphone/view/App/Layout/MainLayout.qml | 78 ++++++ Linphone/view/App/Layout/OverviewLayout.qml | 35 --- Linphone/view/App/Main.qml | 17 +- Linphone/view/CMakeLists.txt | 16 +- Linphone/view/Item/Button.qml | 45 +-- Linphone/view/Item/EffectImage.qml | 29 ++ Linphone/view/Item/Form/LoginForm.qml | 8 +- Linphone/view/Item/NumericPad.qml | 163 +++++++++++ Linphone/view/Item/PhoneNumberComboBox.qml | 6 +- Linphone/view/Item/PhoneNumberInput.qml | 7 +- Linphone/view/Item/RectangleTest.qml | 3 +- Linphone/view/Item/SearchBar.qml | 85 ++++++ Linphone/view/Item/TextInput.qml | 12 +- Linphone/view/Item/VerticalTabBar.qml | 105 ++++--- Linphone/view/Page/Login/ChooseModePage.qml | 70 ----- Linphone/view/Page/Login/LoginPage.qml | 1 - Linphone/view/Page/Login/RegisterPage.qml | 8 +- Linphone/view/Page/Login/SIPLoginPage.qml | 2 +- Linphone/view/Page/Main/AbstractMainPage.qml | 105 +++++++ Linphone/view/Page/Main/CallPage.qml | 256 ++++++++++++++++++ Linphone/view/Page/Overview/CallPage.qml | 9 - Linphone/view/Style/AppIcons.qml | 27 ++ Linphone/view/Style/DefaultStyle.qml | 21 ++ docker-files/bc-dev-ubuntu-22-04-lts | 112 -------- 36 files changed, 1096 insertions(+), 307 deletions(-) create mode 100644 Linphone/data/image/address-book-selected.svg create mode 100644 Linphone/data/image/chat-teardrop-text-selected.svg create mode 100644 Linphone/data/image/dialer-selected.svg create mode 100644 Linphone/data/image/dialer.svg create mode 100644 Linphone/data/image/group-call.svg create mode 100644 Linphone/data/image/noItemImage.svg create mode 100644 Linphone/data/image/phone-selected.svg create mode 100644 Linphone/data/image/users-three-selected.svg create mode 100644 Linphone/view/App/Layout/MainLayout.qml delete mode 100644 Linphone/view/App/Layout/OverviewLayout.qml create mode 100644 Linphone/view/Item/EffectImage.qml create mode 100644 Linphone/view/Item/NumericPad.qml create mode 100644 Linphone/view/Item/SearchBar.qml delete mode 100644 Linphone/view/Page/Login/ChooseModePage.qml create mode 100644 Linphone/view/Page/Main/AbstractMainPage.qml create mode 100644 Linphone/view/Page/Main/CallPage.qml delete mode 100644 Linphone/view/Page/Overview/CallPage.qml delete mode 100644 docker-files/bc-dev-ubuntu-22-04-lts diff --git a/Linphone/data/CMakeLists.txt b/Linphone/data/CMakeLists.txt index f3cdd0be1..e35f06f02 100644 --- a/Linphone/data/CMakeLists.txt +++ b/Linphone/data/CMakeLists.txt @@ -13,10 +13,38 @@ list(APPEND _LINPHONEAPP_RC_FILES data/assistant/use-app-sip-account.rc "data/image/eye.svg" "data/image/caret-down.svg" "data/image/caret-left.svg" + "data/image/caret-right.svg" "data/image/verif_page_image.svg" "data/image/check.svg" + "data/image/dialer.svg" + "data/image/dialer-selected.svg" "data/image/chiffrement.svg" "data/image/interoperable.svg" + "data/image/phone.svg" + "data/image/phone-selected.svg" + "data/image/phone-plus.svg" + "data/image/phone-disconnect.svg" + "data/image/address-book.svg" + "data/image/address-book-selected.svg" + "data/image/chat-teardrop-text.svg" + "data/image/chat-teardrop-text-selected.svg" + "data/image/users-three.svg" + "data/image/users-three-selected.svg" + "data/image/noItemImage.svg" + "data/image/dots-three-vertical.svg" + "data/image/plus-circle.svg" + "data/image/microphone-stage.svg" + "data/image/group-call.svg" + "data/image/magnifying-glass.svg" + "data/image/backspace-fill.svg" + "data/image/x.svg" + "data/image/incoming_call.svg" + "data/image/incoming_call_missed.svg" + "data/image/incoming_call_rejected.svg" + "data/image/outgoing_call.svg" + "data/image/outgoing_call_missed.svg" + "data/image/outgoing_call_rejected.svg" + ) set(_LINPHONEAPP_RC_FILES ${_LINPHONEAPP_RC_FILES} PARENT_SCOPE) diff --git a/Linphone/data/image/address-book-selected.svg b/Linphone/data/image/address-book-selected.svg new file mode 100644 index 000000000..0d781cc2e --- /dev/null +++ b/Linphone/data/image/address-book-selected.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/Linphone/data/image/chat-teardrop-text-selected.svg b/Linphone/data/image/chat-teardrop-text-selected.svg new file mode 100644 index 000000000..335f55979 --- /dev/null +++ b/Linphone/data/image/chat-teardrop-text-selected.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/Linphone/data/image/dialer-selected.svg b/Linphone/data/image/dialer-selected.svg new file mode 100644 index 000000000..a63e133c0 --- /dev/null +++ b/Linphone/data/image/dialer-selected.svg @@ -0,0 +1,3 @@ + + + diff --git a/Linphone/data/image/dialer.svg b/Linphone/data/image/dialer.svg new file mode 100644 index 000000000..af811b613 --- /dev/null +++ b/Linphone/data/image/dialer.svg @@ -0,0 +1,3 @@ + + + diff --git a/Linphone/data/image/group-call.svg b/Linphone/data/image/group-call.svg new file mode 100644 index 000000000..23307e31c --- /dev/null +++ b/Linphone/data/image/group-call.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/Linphone/data/image/noItemImage.svg b/Linphone/data/image/noItemImage.svg new file mode 100644 index 000000000..f5ac91e52 --- /dev/null +++ b/Linphone/data/image/noItemImage.svg @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Linphone/data/image/phone-selected.svg b/Linphone/data/image/phone-selected.svg new file mode 100644 index 000000000..1865bbd77 --- /dev/null +++ b/Linphone/data/image/phone-selected.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/Linphone/data/image/users-three-selected.svg b/Linphone/data/image/users-three-selected.svg new file mode 100644 index 000000000..481fb3fa9 --- /dev/null +++ b/Linphone/data/image/users-three-selected.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/Linphone/model/account/AccountManager.cpp b/Linphone/model/account/AccountManager.cpp index a520bb2cc..06c5d8d42 100644 --- a/Linphone/model/account/AccountManager.cpp +++ b/Linphone/model/account/AccountManager.cpp @@ -74,7 +74,6 @@ bool AccountManager::login(QString username, QString password) { "", // Realm. identity->getDomain() // Domain. )); - account->setParams(params); mAccountModel = Utils::makeQObject_ptr(account); mAccountModel->setSelf(mAccountModel); connect(mAccountModel.get(), &AccountModel::registrationStateChanged, this, diff --git a/Linphone/tool/providers/ImageProvider.cpp b/Linphone/tool/providers/ImageProvider.cpp index 4fcba6668..f49c61264 100644 --- a/Linphone/tool/providers/ImageProvider.cpp +++ b/Linphone/tool/providers/ImageProvider.cpp @@ -61,7 +61,7 @@ ImageAsyncImageResponse::ImageAsyncImageResponse(const QString &id, const QSize QFile file(mPath); if (!file.exists()) { - qDebug() << QStringLiteral("[ImageProvider] File doesn't exist: `%1`.").arg(mPath); + qDebug() << QStringLiteral("[ImageProvider] File doesn't exist: `%1`.").arg(path + id); return; } QImage originalImage(mPath); diff --git a/Linphone/view/App/Layout/LoginLayout.qml b/Linphone/view/App/Layout/LoginLayout.qml index 500dfc33b..fec8700bf 100644 --- a/Linphone/view/App/Layout/LoginLayout.qml +++ b/Linphone/view/App/Layout/LoginLayout.qml @@ -62,8 +62,6 @@ Item { RowLayout { id: bottomMountains - // RectangleTest{color: "blue"} - // Layout.alignment: Qt.AlignBottom anchors.bottom: parent.bottom anchors.left: parent.left anchors.right: parent.right diff --git a/Linphone/view/App/Layout/MainLayout.qml b/Linphone/view/App/Layout/MainLayout.qml new file mode 100644 index 000000000..3757ebc98 --- /dev/null +++ b/Linphone/view/App/Layout/MainLayout.qml @@ -0,0 +1,78 @@ +/** +* Qml template used for welcome and login/register pages +**/ + +import QtQuick 2.15 +import QtQuick.Layouts 1.3 +import QtQuick.Controls 2.2 as Control + +import Linphone + +Item { + id: mainItem + + RowLayout { + anchors.fill: parent + // spacing: 30 + anchors.topMargin: 18 + VerticalTabBar { + id: tabbar + Layout.fillHeight: true + Layout.preferredWidth: width + model: [ + {icon: AppIcons.phone, selectedIcon: AppIcons.phoneSelected, label: qsTr("Appels")}, + {icon: AppIcons.adressBook, selectedIcon: AppIcons.adressBookSelected, label: qsTr("Contacts")}, + {icon: AppIcons.chatTeardropText, selectedIcon: AppIcons.chatTeardropTextSelected, label: qsTr("Conversations")}, + {icon: AppIcons.usersThree, selectedIcon: AppIcons.usersThreeSelected, label: qsTr("Réunions")} + ] + } + ColumnLayout { + Layout.fillWidth: true + Layout.fillHeight: true + RowLayout { + Layout.leftMargin: 25 + TextInput { + fillWidth: true + placeholderText: qsTr("Rechercher un contact, appeler ou envoyer un message...") + } + Control.Button { + Layout.preferredWidth: 30 + Layout.preferredHeight: 30 + background: Item { + visible: false + } + contentItem: Image { + //avatar + source: AppIcons.welcomeLinphoneLogo + // width: 30 + // height: 30 + fillMode: Image.PreserveAspectFit + } + } + Control.Button { + enabled: false + Layout.preferredWidth: 30 + Layout.preferredHeight: 30 + background: Item { + } + contentItem: Image { + source: AppIcons.verticalDots + } + } + } + StackLayout { + // width: parent.width + // height: parent.height + + currentIndex: tabbar.currentIndex + + CallPage { + } + //ContactPage{} + //ConversationPage{} + //MeetingPage{} + } + } + } +} + diff --git a/Linphone/view/App/Layout/OverviewLayout.qml b/Linphone/view/App/Layout/OverviewLayout.qml deleted file mode 100644 index 4d4e0f919..000000000 --- a/Linphone/view/App/Layout/OverviewLayout.qml +++ /dev/null @@ -1,35 +0,0 @@ -/** -* Qml template used for welcome and login/register pages -**/ - -import QtQuick 2.15 -import QtQuick.Layouts 1.3 -import QtQuick.Controls 2.2 as Control - -import Linphone - -Item { - id: mainItem - - RowLayout { - spacing: 10 - Layout.fillHeight: true - VerticalTabBar { - Layout.fillHeight: true - } - ColumnLayout { - Layout.fillHeight: true - TextInput { - fillWidth: true - placeholderText: qsTr("Rechercher un contact, appeler ou envoyer un message...") - } - Image { - //avatar - } - Button { - // color: DefaultStyle.moreButtonBackground - } - } - } -} - diff --git a/Linphone/view/App/Main.qml b/Linphone/view/App/Main.qml index 9d42684e9..d32ed1c9c 100644 --- a/Linphone/view/App/Main.qml +++ b/Linphone/view/App/Main.qml @@ -34,7 +34,7 @@ Window { if (mainWindow.firstConnection) { mainWindowStackView.replace(securityModePage) } else { - mainWindowStackView.replace(callPage) + mainWindowStackView.replace(mainPage) } } } @@ -49,7 +49,7 @@ Window { if (mainWindow.firstConnection) { mainWindowStackView.replace(securityModePage) } else { - mainWindowStackView.replace(callPage) + mainWindowStackView.replace(mainPage) } } } @@ -75,14 +75,21 @@ Window { onModeSelected: (index) => { var selectedMode = index == 0 ? "chiffrement" : "interoperable" console.debug("[SelectMode]User: User selected mode " + selectedMode) - mainWindowStackView.replace(callPage) + mainWindowStackView.replace(mainPage) } } } Component { - id: callPage - CallPage { + id: mainPage + MainLayout { } } + + Component { + id: ongoingCallPage + OngoingCallPage { + } + } + } diff --git a/Linphone/view/CMakeLists.txt b/Linphone/view/CMakeLists.txt index 1f5c1121f..ecf0abcf9 100644 --- a/Linphone/view/CMakeLists.txt +++ b/Linphone/view/CMakeLists.txt @@ -2,7 +2,7 @@ list(APPEND _LINPHONEAPP_QML_FILES view/App/Main.qml view/App/Layout/LoginLayout.qml - view/App/Layout/OverviewLayout.qml + view/App/Layout/MainLayout.qml view/Item/Button.qml view/Item/Carousel.qml @@ -14,10 +14,13 @@ list(APPEND _LINPHONEAPP_QML_FILES view/Item/Notification/Notification.qml view/Item/Notification/NotificationReceivedCall.qml + view/Item/EffectImage.qml + view/Item/NumericPad.qml view/Item/PhoneNumberComboBox.qml view/Item/PhoneNumberInput.qml view/Item/RadioButton.qml view/Item/RectangleTest.qml + view/Item/SearchBar.qml view/Item/TabBar.qml view/Item/Text.qml view/Item/TextInput.qml @@ -25,18 +28,19 @@ list(APPEND _LINPHONEAPP_QML_FILES view/Item/VerticalTabBar.qml view/Item/Form/LoginForm.qml - + view/Item/Test/ItemsTest.qml - - view/Page/Login/ChooseModePage.qml + view/Page/Login/LoginPage.qml view/Page/Login/RegisterPage.qml view/Page/Login/RegisterCheckingPage.qml view/Page/Login/SIPLoginPage.qml view/Page/Login/SecurityModePage.qml view/Page/Login/WelcomePage.qml - - view/Page/Overview/CallPage.qml + + view/Page/Main/AbstractMainPage.qml + view/Page/Main/CallPage.qml + # view/Page/Main/OngoingCallPage.qml # Prototypes view/Prototype/PhoneNumberPrototype.qml diff --git a/Linphone/view/Item/Button.qml b/Linphone/view/Item/Button.qml index c7520f08c..43c84482a 100644 --- a/Linphone/view/Item/Button.qml +++ b/Linphone/view/Item/Button.qml @@ -1,5 +1,6 @@ import QtQuick 2.7 import QtQuick.Controls 2.2 as Control +import QtQuick.Effects import Linphone Control.Button { @@ -8,22 +9,36 @@ Control.Button { property bool inversedColors: false property int textSize: DefaultStyle.buttonTextSize property bool boldText: true + property bool shadowEnabled: false + hoverEnabled: true - background: Rectangle { - color: inversedColors - ? mainItem.pressed - ? DefaultStyle.buttonPressedInversedBackground - : DefaultStyle.buttonInversedBackground - : mainItem.pressed - ? DefaultStyle.buttonPressedBackground - : DefaultStyle.buttonBackground - radius: 24 - border.color: inversedColors ? DefaultStyle.buttonBackground : DefaultStyle.buttonInversedBackground - - MouseArea { + background: Item { + Rectangle { anchors.fill: parent - hoverEnabled: true - cursorShape: hovered ? Qt.PointingHandCursor : Qt.ArrowCursor + id: buttonBackground + color: inversedColors + ? mainItem.pressed + ? DefaultStyle.buttonPressedInversedBackground + : DefaultStyle.buttonInversedBackground + : mainItem.pressed + ? DefaultStyle.buttonPressedBackground + : DefaultStyle.buttonBackground + radius: 24 + border.color: inversedColors ? DefaultStyle.buttonBackground : DefaultStyle.buttonInversedBackground + + MouseArea { + anchors.fill: parent + hoverEnabled: true + cursorShape: hovered ? Qt.PointingHandCursor : Qt.ArrowCursor + } + } + MultiEffect { + enabled: mainItem.shadowEnabled + anchors.fill: buttonBackground + source: buttonBackground + shadowEnabled: mainItem.shadowEnabled + shadowColor: "black"//DefaultStyle.numericPadShadowColor + shadowHorizontalOffset: 1.0 } } @@ -45,6 +60,4 @@ Control.Button { capitalization: mainItem.capitalization } } - - hoverEnabled: true } diff --git a/Linphone/view/Item/EffectImage.qml b/Linphone/view/Item/EffectImage.qml new file mode 100644 index 000000000..dd3ddac6c --- /dev/null +++ b/Linphone/view/Item/EffectImage.qml @@ -0,0 +1,29 @@ +import QtQuick 2.7 +import QtQuick.Layouts 1.3 +import QtQuick.Controls 2.2 as Control +import QtQuick.Effects + +import Linphone + +Item { + id: mainItem + property alias image: image + property alias effect: effect + width: image.width + height: image.height + + Image { + id: image + width: 20 + height: 20 + sourceSize.width: 20 + fillMode: Image.PreserveAspectFit + anchors.centerIn: parent + } + MultiEffect { + id: effect + anchors.fill: image + source: image + maskSource: image + } +} \ No newline at end of file diff --git a/Linphone/view/Item/Form/LoginForm.qml b/Linphone/view/Item/Form/LoginForm.qml index 17ab8e7f1..39ee319cd 100644 --- a/Linphone/view/Item/Form/LoginForm.qml +++ b/Linphone/view/Item/Form/LoginForm.qml @@ -75,14 +75,14 @@ ColumnLayout { username.errorMessage = "" password.errorMessage = "" - if (username.inputText.length == 0 || password.inputText.length == 0) { - if (username.inputText.length == 0) + if (username.text.length == 0 || password.text.length == 0) { + if (username.text.length == 0) username.errorMessage = qsTr("You must enter a username") - if (password.inputText.length == 0) + if (password.text.length == 0) password.errorMessage = qsTr("You must enter a password") return } - LoginPageCpp.login(username.inputText, password.inputText) + LoginPageCpp.login(username.text, password.text) } } Button { diff --git a/Linphone/view/Item/NumericPad.qml b/Linphone/view/Item/NumericPad.qml new file mode 100644 index 000000000..efdbdf25e --- /dev/null +++ b/Linphone/view/Item/NumericPad.qml @@ -0,0 +1,163 @@ +import QtQuick 2.7 +import QtQuick.Controls 2.2 as Control +import QtQuick.Layouts +import QtQuick.Effects +import Linphone + +Control.Popup { + clip: true + id: mainItem + signal buttonPressed(string text) + signal wipe() + closePolicy: Control.Popup.CloseOnEscape + leftPadding: closeButton.width + rightPadding: closeButton.width + rightInset: closeButton.width + topPadding: closeButton.height + background: Item { + anchors.fill: parent + Rectangle { + id: numPadBackground + anchors.fill: parent + color: DefaultStyle.numericPadBackgroundColor + radius: 10 + } + MultiEffect { + id: effect + anchors.fill: parent + source: numPadBackground + shadowEnabled: true + shadowColor: DefaultStyle.numericPadShadowColor + } + Button { + id: closeButton + anchors.right: parent.right + anchors.top: parent.top + background: Item { + anchors.fill: parent + visible: false + } + contentItem: Image { + anchors.centerIn: parent + source: AppIcons.closeX + width: 10 + sourceSize.width: 10 + fillMode: Image.PreserveAspectFit + } + onClicked: mainItem.close() + } + } + contentItem: GridLayout { + columns: 3 + columnSpacing: 3 + Layout.fillWidth: true + Layout.fillHeight: true + Repeater { + model: 9 + Button { + id: numPadButton + required property int index + implicitWidth: 40 + implicitHeight: 40 + background: Rectangle { + anchors.fill: parent + color: numPadButton.down ? DefaultStyle.numericPadPressedButtonColor : DefaultStyle.numericPadButtonColor + radius: 20 + } + contentItem: Text { + id: innerText + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + anchors.fill: parent + anchors.centerIn: parent + text: index + 1 + font.pointSize: DefaultStyle.numericPadButtonTextSize + } + onClicked: { + mainItem.buttonPressed(innerText.text) + } + } + } + Repeater { + model: [ + {pressText: "*"}, + {pressText: "0", longPressText: "+"}, + {pressText: "#"} + ] + Button { + id: digitButton + shadowEnabled: true + implicitWidth: 40 + implicitHeight: 40 + background: Rectangle { + anchors.fill: parent + color: digitButton.down ? DefaultStyle.numericPadPressedButtonColor : DefaultStyle.numericPadButtonColor + radius: 20 + } + contentItem: Item { + anchors.fill: parent + anchors.centerIn: parent + Text { + id: pressText + anchors.left: parent.left + anchors.right: parent.right + horizontalAlignment: Text.AlignHCenter + width: parent.width + text: modelData.pressText + font.pointSize: DefaultStyle.numericPadButtonTextSize + } + Text { + id: longPressText + anchors.left: parent.left + anchors.right: parent.right + anchors.top: pressText.bottom + horizontalAlignment: Text.AlignHCenter + visible: modelData.longPressText ? modelData.longPressText.length > 0 : false + text: modelData.longPressText ? modelData.longPressText : "" + font.pointSize: DefaultStyle.numericPadButtonSubtextSize + } + } + onClicked: mainItem.buttonPressed(pressText.text) + onPressAndHold: mainItem.buttonPressed(longPressText.text) + } + } + Item { + // Invisible item to move the last two buttons to the right + } + Button { + leftPadding: 20 + rightPadding: 20 + topPadding: 15 + bottomPadding: 15 + background: Rectangle { + anchors.fill: parent + color: DefaultStyle.numericPadLaunchCallButtonColor + radius: 15 + } + contentItem: EffectImage { + id: buttonIcon + image.source: AppIcons.phone + anchors.fill: parent + anchors.centerIn: parent + width: 20 + height: 20 + image.fillMode: Image.PreserveAspectFit + effect.brightness: 1.0 + } + } + Button { + leftPadding: 5 + rightPadding: 5 + topPadding: 5 + bottomPadding: 5 + background: Item { + visible: false + } + contentItem: Image { + source: AppIcons.backspaceFill + anchors.centerIn: parent + } + onClicked: mainItem.wipe() + } + } +} \ No newline at end of file diff --git a/Linphone/view/Item/PhoneNumberComboBox.qml b/Linphone/view/Item/PhoneNumberComboBox.qml index 7ca586772..474adc56a 100644 --- a/Linphone/view/Item/PhoneNumberComboBox.qml +++ b/Linphone/view/Item/PhoneNumberComboBox.qml @@ -97,11 +97,11 @@ ColumnLayout { } delegate: Item { - width:combobox.width; - height: combobox.height; + width:combobox.width + height: combobox.height Text { - id: delegateImg; + id: delegateImg visible: text.length > 0 text: $modelData.flag font.family: DefaultStyle.emojiFont diff --git a/Linphone/view/Item/PhoneNumberInput.qml b/Linphone/view/Item/PhoneNumberInput.qml index e34790843..bc4391dc6 100644 --- a/Linphone/view/Item/PhoneNumberInput.qml +++ b/Linphone/view/Item/PhoneNumberInput.qml @@ -1,4 +1,4 @@ -import QtQuick +import QtQuick 2.15 import QtQuick.Controls import QtQuick.Layouts 1.0 import Linphone @@ -11,7 +11,8 @@ ColumnLayout { property string placeholderText : "" property bool mandatory: false property int textInputWidth: 200 - readonly property string phoneNumber: textField.inputText + property string initialPhoneNumber + readonly property string phoneNumber: textField.text readonly property string countryCode: combobox.currentText Text { @@ -54,6 +55,7 @@ ColumnLayout { placeholderText: mainItem.placeholderText enableBackgroundColors: false fillWidth: true + initialText: initialPhoneNumber validator: IntValidator{} } } @@ -66,7 +68,6 @@ ColumnLayout { color: DefaultStyle.errorMessageColor elide: Text.ElideRight wrapMode: Text.Wrap - // maximumLineCount: 1 font { pointSize: DefaultStyle.defaultTextSize family: DefaultStyle.defaultFont diff --git a/Linphone/view/Item/RectangleTest.qml b/Linphone/view/Item/RectangleTest.qml index 946f7d81e..690af1172 100644 --- a/Linphone/view/Item/RectangleTest.qml +++ b/Linphone/view/Item/RectangleTest.qml @@ -2,7 +2,8 @@ import QtQuick 2.7 Rectangle { anchors.fill: parent - color: "red" + color: "blue" opacity: 0.2 border.color: "green" + border.width: 2 } diff --git a/Linphone/view/Item/SearchBar.qml b/Linphone/view/Item/SearchBar.qml new file mode 100644 index 000000000..916d5b10f --- /dev/null +++ b/Linphone/view/Item/SearchBar.qml @@ -0,0 +1,85 @@ +import QtQuick +import QtQuick.Controls as Control +import QtQuick.Layouts 1.0 +import Linphone + + +Rectangle { + id: mainItem + property string placeholderText: "" + property int textInputWidth: 350 + property var validator: RegularExpressionValidator{} + property string text: textField.text + property alias numericPadButton: dialerButton + readonly property bool hasActiveFocus: textField.activeFocus + property var numericPad + signal numericPadButtonPressed(bool checked) + + onVisibleChanged: if (!visible && numericPad) numericPad.close() + + Connections { + enabled: numericPad != undefined + target: numericPad ? numericPad : null + onAboutToHide: { searchBar.numericPadButton.checked = false } + onAboutToShow: { searchBar.numericPadButton.checked = true } + onButtonPressed: (text) => { + textField.text += text + } + onWipe: textField.text = textField.text.slice(0, -1) + } + + implicitWidth: mainItem.textInputWidth + implicitHeight: 30 + radius: 20 + color: DefaultStyle.formItemBackgroundColor + border.color: textField.activeFocus ? DefaultStyle.searchBarFocusBorderColor : "transparent" + Image { + id: magnifier + anchors.left: parent.left + anchors.verticalCenter: parent.verticalCenter + anchors.leftMargin: 10 + source: AppIcons.magnifier + } + Control.TextField { + id: textField + anchors.left: magnifier.right + anchors.right: dialerButton.visible ? dialerButton.left : parent.right + anchors.verticalCenter: parent.verticalCenter + placeholderText: mainItem.placeholderText + echoMode: (mainItem.hidden && !dialerButton.checked) ? TextInput.Password : TextInput.Normal + font.family: DefaultStyle.defaultFont + font.pointSize: DefaultStyle.defaultFontPointSize + color: DefaultStyle.formItemLabelColor + selectByMouse: true + validator: mainItem.validator + background: Item { + opacity: 0. + } + cursorDelegate: Rectangle { + visible: textField.activeFocus + color: DefaultStyle.formItemFocusBorderColor + width: 2 + } + } + Control.Button { + id: dialerButton + visible: numericPad != undefined + checkable: true + checked: false + background: Rectangle { + color: "transparent" + } + contentItem: Image { + fillMode: Image.PreserveAspectFit + source: dialerButton.checked ? AppIcons.dialerSelected : AppIcons.dialer + } + anchors.top: parent.top + anchors.bottom: parent.bottom + anchors.right: parent.right + anchors.rightMargin: 10 + onCheckedChanged: { + if (checked) mainItem.numericPad.open() + else mainItem.numericPad.close() + } + } +} diff --git a/Linphone/view/Item/TextInput.qml b/Linphone/view/Item/TextInput.qml index 83ef20b5d..c57c69c9c 100644 --- a/Linphone/view/Item/TextInput.qml +++ b/Linphone/view/Item/TextInput.qml @@ -15,9 +15,19 @@ ColumnLayout { property var validator: RegularExpressionValidator{} property bool fillWidth: false property bool enableBackgroundColors: true - property string inputText: textField.text + property string initialText + readonly property string text: textField.text readonly property bool hasActiveFocus: textField.activeFocus + Component.onCompleted: setText(initialText) + + function setText(text) { + textField.text = text + } + function resetText() { + setText(initialText) + } + Text { visible: mainItem.label.length > 0 verticalAlignment: Text.AlignVCenter diff --git a/Linphone/view/Item/VerticalTabBar.qml b/Linphone/view/Item/VerticalTabBar.qml index 5d69aac95..05d3afebe 100644 --- a/Linphone/view/Item/VerticalTabBar.qml +++ b/Linphone/view/Item/VerticalTabBar.qml @@ -1,59 +1,100 @@ import QtQuick 2.7 import QtQuick.Layouts 1.3 import QtQuick.Controls 2.2 as Control +import QtQuick.Effects + import Linphone - + Control.TabBar { id: mainItem - spacing: 40 - property color tabBarColor: DefaultStyle.verticalTabBarColor + spacing: 15 + topPadding: 20 + // leftPadding: 15 + // rightPadding: 15 - function appendTab(label) { - var newTab = tab.createObject(mainItem, {title: label, index: mainItem.count}) - } + property var model contentItem: ListView { + model: mainItem.contentModel + currentIndex: mainItem.currentIndex + + spacing: mainItem.spacing orientation: ListView.Vertical - model: mainItem.model + // boundsBehavior: Flickable.StopAtBounds + flickableDirection: Flickable.AutoFlickIfNeeded + // snapMode: ListView.SnapToItem + + // highlightMoveDuration: 0 + // highlightRangeMode: ListView.ApplyRange + // preferredHighlightBegin: 40 + // preferredHighlightEnd: width - 40 } background: Item { + id: background anchors.fill: parent - Rectangle { - id: barBG - height: 4 - color: mainItem.tabBarColor - anchors.bottom: parent.bottom - width: parent.width + anchors.fill: parent + color: DefaultStyle.verticalTabBarColor + radius: 25 + } + Rectangle { + color: DefaultStyle.verticalTabBarColor + anchors.left: parent.left + anchors.top: parent.top + width: parent.width/2 + height: parent.height/2 + } + Rectangle { + color: DefaultStyle.verticalTabBarColor + x: parent.x + parent.width/2 + y: parent.y + parent.height/2 + width: parent.width/2 + height: parent.height/2 } } - Component { - id: tab + Repeater { + model: mainItem.model Control.TabButton { - property string title - property int index - width: txtMeter. advanceWidth + id: tabButton + anchors.left: parent.left + anchors.right: parent.right - background: Item { - visible: false - } - - contentItem: Text { - id: tabText + contentItem: ColumnLayout { anchors.fill: parent - font.bold: true - font.pointSize: DefaultStyle.tabButtonTextSize - text: txtMeter.text - bottomPadding: 5 - width: txtMeter.advanceWidth + EffectImage { + id: buttonIcon + image.source: mainItem.currentIndex === index ? modelData.selectedIcon : modelData.icon + Layout.preferredWidth: 20 + Layout.preferredHeight: 20 + Layout.alignment: Qt.AlignHCenter + image.sourceSize.width: 20 + image.fillMode: Image.PreserveAspectFit + effect.brightness: 1.0 + } + Text { + id: buttonText + text: modelData.label + font.bold: mainItem.currentIndex === index + font.pointSize: DefaultStyle.verticalTabButtonTextSize + color: DefaultStyle.verticalTabBarTextColor + Layout.preferredWidth: txtMeter.width + Layout.preferredHeight: txtMeter.height + Layout.alignment: Qt.AlignHCenter + horizontalAlignment: Text.AlignHCenter + leftPadding: 3 + rightPadding: 3 + } } - TextMetrics { id: txtMeter - font: tabText.font - text: title + text: modelData.label + font: buttonText.font + Component.onCompleted: mainItem.width = Math.max(mainItem.width, advanceWidth) + } + + background: Item { } } } diff --git a/Linphone/view/Page/Login/ChooseModePage.qml b/Linphone/view/Page/Login/ChooseModePage.qml deleted file mode 100644 index fae66de0e..000000000 --- a/Linphone/view/Page/Login/ChooseModePage.qml +++ /dev/null @@ -1,70 +0,0 @@ -import QtQuick 2.15 -import QtQuick.Layouts 1.0 -import QtQuick.Controls as Control -import Linphone - -LoginLayout { - id: mainItem - signal modeChosen(int index) - - titleContent: RowLayout { - Image { - fillMode: Image.PreserveAspectFit - source: AppIcons.profile - } - ColumnLayout { - Text { - text: qsTr("Choisir votre mode") - font.pointSize: DefaultStyle.title2FontPointSize - font.bold: true - scaleLettersFactor: 1.1 - } - Text { - text: qsTr("Vous pourrez changer de mode plus tard.") - font.bold: true - scaleLettersFactor: 1.1 - } - } - } - - centerContent: ColumnLayout { - spacing: 80 - Layout.topMargin: 70 - Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter - RowLayout { - id: radioButtonsLayout - Layout.fillWidth: true - Layout.alignment: Qt.AlignHCenter - spacing: 70 - Repeater { - model: [ - {checked: true, title: qsTr("Chiffrement de bout en bout"), text: qsTr("Ce mode vous garanti la confidentialité de tous vos échanges. Notre technologie de chiffrement de bout en bout assure un niveau de sécurité maximal pour tous vos échanges."), imgUrl: AppIcons.chiffrement}, - {checked: false, title: qsTr("Interoperable"), text: qsTr("Ce mode vous permet de profiter de toute les fonctionnalités de Linphone, toute en restant interopérable avec n’importe qu’elle autre service SIP."), imgUrl: AppIcons.interoperable} - ] - RadioButton { - title: modelData.title - contentText: modelData.text - imgUrl: modelData.imgUrl - checked: modelData.checked - onCheckedChanged: { - if (checked) continueButton.chosenIndex = index - } - } - } - } - Button { - id: continueButton - property int chosenIndex: 0 - Layout.alignment: Qt.AlignHCenter - leftPadding: 100 - rightPadding: 100 - text: qsTr("Continuer") - onClicked: mainItem.modeChosen(chosenIndex) - } - Item { - Layout.fillWidth: true - Layout.fillHeight: true - } - } -} - diff --git a/Linphone/view/Page/Login/LoginPage.qml b/Linphone/view/Page/Login/LoginPage.qml index e2b5e3710..3a79e9546 100644 --- a/Linphone/view/Page/Login/LoginPage.qml +++ b/Linphone/view/Page/Login/LoginPage.qml @@ -39,7 +39,6 @@ LoginLayout { } } centerContent: ColumnLayout { - Layout.alignment: Qt.AlignBottom RowLayout { diff --git a/Linphone/view/Page/Login/RegisterPage.qml b/Linphone/view/Page/Login/RegisterPage.qml index da463950d..5c6705233 100644 --- a/Linphone/view/Page/Login/RegisterPage.qml +++ b/Linphone/view/Page/Login/RegisterPage.qml @@ -9,7 +9,7 @@ LoginLayout { signal registerCalled(countryCode: string, phoneNumber: string, email: string) readonly property string countryCode: phoneNumberInput.countryCode readonly property string phoneNumber: phoneNumberInput.phoneNumber - readonly property string email: emailInput.inputText + readonly property string email: emailInput.text titleContent: RowLayout { Image { @@ -214,12 +214,12 @@ LoginLayout { Button { text: "Register" onClicked:{ - console.log("[RegisterPage] User: Call register with email", emailInput.inputText) - if (emailInput.inputText.length == 0) { + console.log("[RegisterPage] User: Call register with email", emailInput.text) + if (emailInput.text.length == 0) { emailInput.errorMessage = "You must enter an email" return } - mainItem.registerCalled("", "", emailInput.inputText) + mainItem.registerCalled("", "", emailInput.text) } } } diff --git a/Linphone/view/Page/Login/SIPLoginPage.qml b/Linphone/view/Page/Login/SIPLoginPage.qml index 25619302e..aeebc974a 100644 --- a/Linphone/view/Page/Login/SIPLoginPage.qml +++ b/Linphone/view/Page/Login/SIPLoginPage.qml @@ -226,4 +226,4 @@ LoginLayout { Layout.fillHeight: true } } -} \ No newline at end of file +} diff --git a/Linphone/view/Page/Main/AbstractMainPage.qml b/Linphone/view/Page/Main/AbstractMainPage.qml new file mode 100644 index 000000000..302163424 --- /dev/null +++ b/Linphone/view/Page/Main/AbstractMainPage.qml @@ -0,0 +1,105 @@ +/** +* Qml template used for overview pages : Calls, Contacts, Conversations, Meetings +**/ + +import QtQuick 2.15 +import QtQuick.Layouts 1.3 +import QtQuick.Controls as Control + +import Linphone + + +Item { + id: mainItem + property string noItemButtonText + property string newItemIconSource + property string emptyListText + property alias leftPanelContent: leftPanel.children + property Component rightPanelContent + property bool showDefaultItem: true + onShowDefaultItemChanged: stackView.replace(showDefaultItem ? defaultItem : rightPanel) + signal noItemButtonPressed() + + Control.SplitView { + id: splitView + anchors.fill: parent + + handle: Rectangle { + implicitWidth: 8 + color: Control.SplitHandle.hovered ? DefaultStyle.splitViewHoveredHandleColor : DefaultStyle.splitViewHandleColor + } + + Component.onCompleted: { + leftPanel.implicitWidth = 280 + } + ColumnLayout { + id: leftPanel + } + Rectangle { + id: rightPanel + clip: true + color: DefaultStyle.mainPageRightPanelBackgroundColor + Control.StackView { + id: stackView + initialItem: defaultItem + anchors.fill: parent + Layout.alignment: Qt.AlignCenter + } + Component { + id: defaultItem + ColumnLayout { + Item { + Layout.fillHeight: true + } + ColumnLayout { + Layout.fillHeight: true + Layout.fillWidth: true + visible: mainItem.showDefaultItem + // anchors.centerIn: parent + Layout.alignment: Qt.AlignHCenter + spacing: 25 + Image { + Layout.alignment: Qt.AlignHCenter + source: AppIcons.noItemImage + Layout.preferredWidth: 250 + Layout.preferredHeight: 250 + fillMode: Image.PreserveAspectFit + } + Text { + text: mainItem.emptyListText + Layout.alignment: Qt.AlignHCenter + font.bold: true + } + Button { + Layout.alignment: Qt.AlignHCenter + contentItem: RowLayout { + Layout.alignment: Qt.AlignVCenter + EffectImage { + effect.brightness: 1 + image.source: mainItem.newItemIconSource + image.width: 20 + image.fillMode: Image.PreserveAspectFit + } + Text { + text: mainItem.noItemButtonText + wrapMode: Text.WordWrap + color: DefaultStyle.buttonTextColor + font { + bold: true + pointSize: DefaultStyle.buttonTextSize + family: DefaultStyle.defaultFont + } + } + } + onPressed: mainItem.noItemButtonPressed() + } + } + Item { + Layout.fillHeight: true + } + } + } + } + } +} + diff --git a/Linphone/view/Page/Main/CallPage.qml b/Linphone/view/Page/Main/CallPage.qml new file mode 100644 index 000000000..4fef92f0e --- /dev/null +++ b/Linphone/view/Page/Main/CallPage.qml @@ -0,0 +1,256 @@ +import QtQuick 2.15 +import QtQuick.Layouts +import QtQuick.Controls as Control +import Linphone + +AbstractMainPage { + id: mainItem + noItemButtonText: qsTr("Nouvel appel") + emptyListText: qsTr("Historique d'appel vide") + newItemIconSource: AppIcons.newCall + + onNoItemButtonPressed: listStackView.push(newCallItem) + + leftPanelContent: Item { + Layout.fillWidth: true + Layout.fillHeight: true + Control.StackView { + id: listStackView + initialItem: listItem + anchors.fill: parent + anchors.leftMargin: 25 + anchors.rightMargin: 25 + } + Component { + id: listItem + + ColumnLayout { + RowLayout { + Layout.fillWidth: true + Text { + text: qsTr("Appels") + color: DefaultStyle.mainPageTitleColor + font.pointSize: DefaultStyle.mainPageTitleSize + font.bold: true + } + Item { + Layout.fillWidth: true + } + Control.Button { + enabled: false + background: Item { + } + contentItem: Image { + source: AppIcons.verticalDots + } + } + Control.Button { + + background: Item { + visible: false + } + contentItem: Image { + source: AppIcons.newCall + width: 30 + sourceSize.width: 30 + fillMode: Image.PreserveAspectFit + } + onClicked: { + console.log("[CallPage]User: create new call") + listStackView.push(newCallItem) + } + } + } + Control.Control { + id: listLayout + Layout.fillWidth: true + Layout.fillHeight: true + + background: Rectangle { + anchors.fill: parent + } + ColumnLayout { + anchors.fill: parent + SearchBar { + id: searchBar + Layout.alignment: Qt.AlignTop + Layout.fillWidth: true + placeholderText: qsTr("Rechercher un appel") + } + ColumnLayout { + Text { + text: qsTr("Aucun appel") + font.bold: true + visible: listView.count === 0 + Layout.alignment: Qt.AlignHCenter + Layout.topMargin: 30 + } + ListView { + id: listView + clip: true + Layout.fillWidth: true + Layout.fillHeight: true + model: 0 + currentIndex: 0 + + delegate: Item { + required property int index + width:listView.width + height: 30 + // RectangleTest{} + RowLayout { + anchors.fill: parent + Image { + source: AppIcons.info + } + ColumnLayout { + Text { + text: "John Doe" + } + // RowLayout { + // Image { + // source: AppIcons.incomingCall + // } + // Text { + // text: "info sur l'appel" + // } + // } + } + Item { + Layout.fillWidth: true + } + Control.Button { + implicitWidth: 30 + implicitHeight: 30 + background: Item { + visible: false + } + contentItem: Image { + source: AppIcons.phone + width: 20 + sourceSize.width: 20 + fillMode: Image.PreserveAspectFit + } + } + } + MouseArea { + hoverEnabled: true + Rectangle { + anchors.fill: parent + opacity: 0.1 + radius: 15 + color: DefaultStyle.comboBoxHoverColor + visible: parent.containsMouse + } + onPressed: listView.currentIndex = parent.index + } + } + + onCountChanged: mainItem.showDefaultItem = listView.count === 0 + + Control.ScrollIndicator.vertical: Control.ScrollIndicator { } + } + } + } + } + } + } + Component { + id: newCallItem + ColumnLayout { + RowLayout { + Control.Button { + background: Item { + } + contentItem: Image { + source: AppIcons.returnArrow + } + onClicked: { + console.debug("[CallPage]User: return to call history") + listStackView.pop() + } + } + Text { + text: qsTr("Nouvel appel") + color: DefaultStyle.mainPageTitleColor + font.pointSize: DefaultStyle.mainPageTitleSize + font.bold: true + } + Item { + Layout.fillWidth: true + } + } + Control.Control { + id: listLayout + Layout.fillWidth: true + Layout.fillHeight: true + background: Rectangle { + anchors.fill: parent + } + ColumnLayout { + anchors.fill: parent + SearchBar { + id: searchBar + Layout.alignment: Qt.AlignTop + Layout.fillWidth: true + placeholderText: qsTr("Rechercher un appel") + numericPad: numPad + } + Button { + Layout.fillWidth: true + leftPadding: 0 + topPadding: 0 + rightPadding: 0 + bottomPadding: 0 + background: Rectangle { + color: DefaultStyle.groupCallButtonColor + anchors.fill: parent + radius: 50 + } + contentItem: RowLayout { + Image { + source: AppIcons.groupCall + Layout.preferredWidth: 35 + sourceSize.width: 35 + fillMode: Image.PreserveAspectFit + } + Text { + text: "Appel de groupe" + font.bold: true + } + Item { + Layout.fillWidth: true + } + Image { + source: AppIcons.rightArrow + } + } + } + ColumnLayout { + ListView { + Layout.fillHeight: true + // call history + } + } + } + } + } + } + + Item { + anchors.bottom: parent.bottom + anchors.left: parent.left + anchors.right: parent.right + height: numPad.height + NumericPad { + id: numPad + // anchors.centerIn: parent + width: parent.width + } + } + } + + rightPanelContent: ColumnLayout { + + } +} \ No newline at end of file diff --git a/Linphone/view/Page/Overview/CallPage.qml b/Linphone/view/Page/Overview/CallPage.qml deleted file mode 100644 index 62a1a469b..000000000 --- a/Linphone/view/Page/Overview/CallPage.qml +++ /dev/null @@ -1,9 +0,0 @@ -import QtQuick 2.15 -import QtQuick.Layouts 1.0 -import QtQuick.Controls as Control -import Linphone - -OverviewLayout { - id: mainItem -} - diff --git a/Linphone/view/Style/AppIcons.qml b/Linphone/view/Style/AppIcons.qml index 6fa163403..8fb67ea23 100644 --- a/Linphone/view/Style/AppIcons.qml +++ b/Linphone/view/Style/AppIcons.qml @@ -9,12 +9,39 @@ QtObject { property string eyeShow: "image://internal/eye-slash.svg" property string downArrow: "image://internal/caret-down.svg" property string returnArrow: "image://internal/caret-left.svg" + property string rightArrow: "image://internal/caret-right.svg" property string info: "image://internal/info.svg" property string loginImage: "image://internal/login_image.svg" property string belledonne: "image://internal/belledonne.svg" property string profile: "image://internal/user-circle.svg" property string verif_page_image: "image://internal/verif_page_image.svg" property string check: "image://internal/check.svg" + property string dialer: "image://internal/dialer.svg" + property string dialerSelected: "image://internal/dialer-selected.svg" property string chiffrement: "image://internal/chiffrement.svg" property string interoperable: "image://internal/interoperable.svg" + property string phone: "image://internal/phone.svg" + property string phoneSelected: "image://internal/phone-selected.svg" + property string newCall: "image://internal/phone-plus.svg" + property string endCall: "image://internal/phone-disconnect.svg" + property string adressBook: "image://internal/address-book.svg" + property string adressBookSelected: "image://internal/address-book-selected.svg" + property string chatTeardropText: "image://internal/chat-teardrop-text.svg" + property string chatTeardropTextSelected: "image://internal/chat-teardrop-text-selected.svg" + property string usersThree: "image://internal/users-three.svg" + property string usersThreeSelected: "image://internal/users-three-selected.svg" + property string noItemImage: "image://internal/noItemImage.svg" + property string verticalDots: "image://internal/dots-three-vertical.svg" + property string plusCircle: "image://internal/plus-circle.svg" + property string micro: "image://internal/microphone-stage.svg" + property string groupCall: "image://internal/group-call.svg" + property string magnifier: "image://internal/magnifying-glass.svg" + property string backspaceFill: "image://internal/backspace-fill.svg" + property string closeX: "image://internal/x.svg" + property string incomingCall: "image://internal/incoming_call.svg" + property string incomingCallMissed: "image://internal/incoming_call_missed.svg" + property string incomingCallRejected: "image://internal/incoming_call_rejected.svg" + property string outgoingCall: "image://internal/outgoing_call.svg" + property string outgoingCallMissed: "image://internal/outgoing_call_missed.svg" + property string outgoingCallRejected: "image://internal/outgoing_call_rejected.svg" } diff --git a/Linphone/view/Style/DefaultStyle.qml b/Linphone/view/Style/DefaultStyle.qml index 7059639e5..f0ac7d59f 100644 --- a/Linphone/view/Style/DefaultStyle.qml +++ b/Linphone/view/Style/DefaultStyle.qml @@ -30,6 +30,8 @@ QtObject { property int tabButtonTextSize: 11 property color verticalTabBarColor: "#FE5E00" + property color verticalTabBarTextColor: "white" + property int verticalTabButtonTextSize: 6 property color comboBoxHighlightColor: "#C0D1D9" property color comboBoxHoverColor: "#6C7A87" @@ -57,4 +59,23 @@ QtObject { property int title1FontPointSize: 50 property int title2FontPointSize: 20 property color titleColor: "#22334D" + + property color mainPageRightPanelBackgroundColor: "#F9F9F9" + property color mainPageTitleColor: "#364860" + property int mainPageTitleSize: 15 + + property color searchBarFocusBorderColor: "#6C7A87" + + property color numericPadBackgroundColor: "#F9F9F9" + property color numericPadShadowColor: Qt.rgba(0.0, 0.0, 0.0, 0.1) + property color numericPadButtonColor: "#FFFFFF" + property int numericPadButtonTextSize: 15 + property int numericPadButtonSubtextSize: 6 + property color numericPadPressedButtonColor: "#EEF7F8" + property color numericPadLaunchCallButtonColor: "#4FAE80" + + property color groupCallButtonColor: "#EEF7F8" + + property color splitViewHandleColor: "#F9F9F9" + property color splitViewHoveredHandleColor: "#EDEDED" } diff --git a/docker-files/bc-dev-ubuntu-22-04-lts b/docker-files/bc-dev-ubuntu-22-04-lts deleted file mode 100644 index deb107a5f..000000000 --- a/docker-files/bc-dev-ubuntu-22-04-lts +++ /dev/null @@ -1,112 +0,0 @@ -############################################################################### -# Dockerfile used to make gitlab.linphone.org:4567/bc/public/linphone-desktop/bc-dev-ubuntu-22-04-lts:20231108_new -############################################################################### - -FROM ubuntu:22.04 - -ARG QT_VERSION=5.15.2 -ARG QT6_VERSION=6.5.3 -#Do not use it. It seems that it cannot be used from python command. -#ARG QT_MODULES=qtnetworkauth qtquick3d qtmultimedia - -MAINTAINER Julien Wadel - -# Use a Swiss mirror -RUN sed -i -E 's/(archive|security)\.ubuntu\.com/ch.archive.ubuntu.com/' /etc/apt/sources.list - -# add fallbacks for timeout connections. - -#France -RUN echo "deb http://fr.archive.ubuntu.com/ubuntu/ jammy main restricted" >> /etc/apt/sources.list -RUN echo "deb http://security.ubuntu.com/ubuntu jammy-security main restricted" >> /etc/apt/sources.list -RUN echo "deb http://ch.archive.ubuntu.com/ubuntu/ jammy-updates main restricted" >> /etc/apt/sources.list -#Belgium -RUN echo "deb http://be.archive.ubuntu.com/ubuntu/ jammy main restricted" >> /etc/apt/sources.list -RUN echo "deb http://security.ubuntu.com/ubuntu jammy-security main restricted" >> /etc/apt/sources.list -RUN echo "deb http://be.archive.ubuntu.com/ubuntu/ jammy-updates main restricted" >> /etc/apt/sources.list -#International -RUN echo "deb http://archive.ubuntu.com/ubuntu/ jammy main restricted" >> /etc/apt/sources.list -RUN echo "deb http://security.ubuntu.com/ubuntu jammy-security main restricted" >> /etc/apt/sources.list -RUN echo "deb http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted" >> /etc/apt/sources.list - -# Configure locale -RUN apt-get update && \ - apt-get install -y locales && \ - apt-get clean && \ - echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \ - locale-gen -ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' -ENV TZ=Europe/Paris -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone -ARG DEBIAN_FRONTEND=noninteractive - -ENV SHELL=/bin/bash -#ENV PS1='\[\e[33m\]\u@bc-dev-ubuntu-20-04>\[\e[0m\] ' - -# Install common general tools -RUN apt-get update && \ - apt-get install -y nano sudo vim && \ - apt-get clean - -# Install development tools -RUN apt-get update && \ - apt-get install -y alien at autoconf bison ccache clang doxygen elfutils g++ gdb git graphviz intltool libtool lsb-release make ninja-build openssh-client patch perl python3-pip python3-pystache python-six python3-jsonschema python3-jinja2 meson yasm && \ - apt-get clean - -# Install linphone & flexisip dependencies development packages -RUN apt-get update && \ - apt-get install -y libasound2-dev libavcodec-dev libavutil-dev libbsd-dev libegl1-mesa-dev libglew-dev libgsm1-dev libjansson-dev libmariadb-dev-compat libmbedtls-dev libopus-dev libpq-dev libprotobuf-dev libpulse-dev libqt5svg5-dev libsnmp-dev libspeex-dev libspeexdsp-dev libsqlite3-dev libsrtp2-dev libssl-dev libswscale-dev libturbojpeg0-dev libv4l-dev libvpx-dev libxerces-c-dev libxml2-dev libxv-dev protobuf-compiler qttools5-dev qttools5-dev-tools xsdcxx && \ - apt-get clean - -# Install signing tools -RUN sudo apt-get install -y gnupg2 - -# Install configuration tools -RUN sudo apt-get install -y wget - -# Configure user bc -RUN useradd -ms /bin/bash bc && \ - echo 'bc:cotcot' | chpasswd && \ - echo 'bc ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers - -# Install newest cmake. Documented at https://gist.github.com/bmegli/4049b7394f9cfa016c24ed67e5041930 -RUN wget https://github.com/Kitware/CMake/releases/download/v3.25.3/cmake-3.25.3.tar.gz && \ - tar -zvxf cmake-3.25.3.tar.gz && \ - cd cmake-3.25.3 && ./bootstrap && make -j8 && \ - sudo apt-get install checkinstall && sudo checkinstall --pkgname=cmake --pkgversion="3.25-custom" --default && hash -r && \ - cd .. && sudo rm -rf cmake-3.25.3 && rm -rf cmake-3.25.3.tar.gz - -# Install nasm from source as we need a newer version than the one being packaged -RUN curl --fail --silent --show-error --location https://www.nasm.us/pub/nasm/releasebuilds/2.16.01/nasm-2.16.01.tar.gz | \ - tar --extract --gzip --file - && cd nasm-2.16.01 && \ - ./configure --prefix=/usr/local && make && make install && \ - cd .. && rm -rf nasm-2.16.01 - -########### QT - -RUN sudo apt-get update && sudo apt-get install -y libxkbcommon* flite1-dev libspeechd-dev speech-dispatcher libfontconfig1-dev libfreetype6-dev libx11-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libx11-xcb* libxcb* qdbus-qt5 libqt5dbus5 libdbus-1-dev libdbus-glib-1-dev libatspi2.0-0 libatspi2.0-dev -RUN sudo apt-get update && sudo apt-get install -y libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync0-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev - -USER bc -WORKDIR /home/bc - -RUN sudo pip3 install --upgrade setuptools -RUN sudo pip3 install ez_setup - -## Install Qt download tool -# installation is split because there is a way where some modules are not downloaded in the first attempt. -RUN sudo pip3 install py7zr aqtinstall -RUN sudo python3 -m aqt install-qt linux desktop $QT_VERSION -O /opt/Qt -RUN sudo python3 -m aqt install-qt linux desktop $QT_VERSION -O /opt/Qt --noarchives -m qtnetworkauth qtquick3d -RUN sudo python3 -m aqt install-qt linux desktop $QT6_VERSION -O /opt/Qt -RUN sudo python3 -m aqt install-qt linux desktop $QT6_VERSION -O /opt/Qt --noarchives -m qtnetworkauth qtquick3d qtmultimedia - -RUN sudo chown -R bc:bc /opt/Qt/ - -RUN qtchooser -install $QT_VERSION /opt/Qt/$QT_VERSION/gcc_64/bin/qmake -RUN qtchooser -install $QT6_VERSION /opt/Qt/$QT6_VERSION/gcc_64/bin/qmake - -# To choose the version to use, run (for Qt6.5.3): eval "$(qtchooser -qt=6.5.3 -print-env)"; export PATH=${QTTOOLDIR}:$PATH;export Qt6_DIR=${QTLIBDIR}/cmake/Qt6; - - -CMD bash