From 86d776a62b2ced984bb1fd8ca7022e8c965a784f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABlle=20Braud?= Date: Mon, 23 Oct 2023 11:12:27 +0000 Subject: [PATCH] Welcome / Login pages ui --- .gitignore | 5 +- CMakeLists.txt | 2 +- Linphone/CMakeLists.txt | 21 +- Linphone/core/App.cpp | 9 +- Linphone/core/App.hpp | 36 +-- .../SingleApplicationDBus.cpp | 2 +- .../SingleApplicationDBusPrivate.hpp | 2 +- Linphone/core/utils/LinphoneEnums.cpp | 171 ++++++++++++ Linphone/core/utils/LinphoneEnums.hpp | 244 ++++++++++++++++++ Linphone/data/CMakeLists.txt | 14 +- Linphone/data/image/belledonne.svg | 5 + Linphone/data/image/down-arrow.svg | 3 + Linphone/data/image/hide.svg | 3 + Linphone/data/image/info-logo.svg | 3 + Linphone/data/image/login-image.svg | 68 +++++ Linphone/data/image/profil.svg | 3 + Linphone/data/image/return-arrow.svg | 3 + Linphone/data/image/show.svg | 3 + Linphone/data/image/welcome-linphone-logo.svg | 4 + Linphone/data/image/welcome-lock.svg | 6 + Linphone/data/image/welcome-opensource.svg | 3 + Linphone/tool/CMakeLists.txt | 2 + Linphone/tool/Constants.hpp | 2 + Linphone/tool/providers/AvatarProvider.cpp | 42 +++ Linphone/tool/providers/AvatarProvider.hpp | 40 +++ Linphone/tool/providers/ImageProvider.cpp | 85 ++++++ Linphone/tool/providers/ImageProvider.hpp | 48 ++++ Linphone/view/App/Layout/LoginLayout.qml | 70 +++++ Linphone/view/App/Main.qml | 38 ++- Linphone/view/CMakeLists.txt | 21 +- Linphone/view/Item/Button.qml | 36 +-- Linphone/view/Item/Carousel.qml | 105 ++++++++ Linphone/view/Item/ComboBox.qml | 77 ++++++ Linphone/view/Item/Form/LoginForm.qml | 56 ++++ Linphone/view/Item/RectangleTest.qml | 8 + Linphone/view/Item/Text.qml | 10 + Linphone/view/Item/TextInput.qml | 62 +++++ Linphone/view/Page/Login/LoginPage.qml | 40 +++ Linphone/view/Page/Login/SIPLoginPage.qml | 172 ++++++++++++ Linphone/view/Page/Login/WelcomePage.qml | 150 +++++++++++ Linphone/view/Page/LoginPage.qml | 25 -- Linphone/view/Style/AppIcons.qml | 16 ++ Linphone/view/Style/DefaultStyle.qml | 28 ++ cmake/TasksMacos.cmake | 2 +- 44 files changed, 1657 insertions(+), 88 deletions(-) create mode 100644 Linphone/core/utils/LinphoneEnums.cpp create mode 100644 Linphone/core/utils/LinphoneEnums.hpp create mode 100644 Linphone/data/image/belledonne.svg create mode 100644 Linphone/data/image/down-arrow.svg create mode 100644 Linphone/data/image/hide.svg create mode 100644 Linphone/data/image/info-logo.svg create mode 100644 Linphone/data/image/login-image.svg create mode 100644 Linphone/data/image/profil.svg create mode 100644 Linphone/data/image/return-arrow.svg create mode 100644 Linphone/data/image/show.svg create mode 100644 Linphone/data/image/welcome-linphone-logo.svg create mode 100644 Linphone/data/image/welcome-lock.svg create mode 100644 Linphone/data/image/welcome-opensource.svg create mode 100644 Linphone/tool/providers/AvatarProvider.cpp create mode 100644 Linphone/tool/providers/AvatarProvider.hpp create mode 100644 Linphone/tool/providers/ImageProvider.cpp create mode 100644 Linphone/tool/providers/ImageProvider.hpp create mode 100644 Linphone/view/App/Layout/LoginLayout.qml create mode 100644 Linphone/view/Item/Carousel.qml create mode 100644 Linphone/view/Item/ComboBox.qml create mode 100644 Linphone/view/Item/Form/LoginForm.qml create mode 100644 Linphone/view/Item/RectangleTest.qml create mode 100644 Linphone/view/Item/Text.qml create mode 100644 Linphone/view/Item/TextInput.qml create mode 100644 Linphone/view/Page/Login/LoginPage.qml create mode 100644 Linphone/view/Page/Login/SIPLoginPage.qml create mode 100644 Linphone/view/Page/Login/WelcomePage.qml delete mode 100644 Linphone/view/Page/LoginPage.qml create mode 100644 Linphone/view/Style/AppIcons.qml create mode 100644 Linphone/view/Style/DefaultStyle.qml diff --git a/.gitignore b/.gitignore index a4251bc93..ae379515f 100644 --- a/.gitignore +++ b/.gitignore @@ -47,4 +47,7 @@ linphone.spec !.clang-format !.gitignore !.gitlab-ci* -!.gitmodules \ No newline at end of file +!.gitmodules + +# VSCode +linphone60*.log diff --git a/CMakeLists.txt b/CMakeLists.txt index af6683ba8..d5db99cf5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ ################################################################################ # -# Copyright (c) 2010-2023 Belledonne Communications SARL. +# Copyright (c) 2010-2024 Belledonne Communications SARL. # # This file is part of linphone-desktop # (see https://www.linphone.org). diff --git a/Linphone/CMakeLists.txt b/Linphone/CMakeLists.txt index 6029f257c..cbbe54884 100644 --- a/Linphone/CMakeLists.txt +++ b/Linphone/CMakeLists.txt @@ -21,7 +21,7 @@ set(APP_TARGETS ${LinphoneCxx_TARGET}) set(QT_DEFAULT_MAJOR_VERSION 6) -set(QT_PACKAGES Core Quick Qml Widgets)# Search Core at first for initialize Qt scripts for next find_packages. +set(QT_PACKAGES Core Quick Qml Widgets Svg Multimedia)# Search Core at first for initialize Qt scripts for next find_packages. if (UNIX AND NOT APPLE) list(APPEND QT_PACKAGES DBus) endif() @@ -68,6 +68,7 @@ endif() set(_LINPHONEAPP_SOURCES main.cpp) set(_LINPHONEAPP_QML_FILES) set(_LINPHONEAPP_RC_FILES) +set(_LINPHONEAPP_QML_SINGLETONS) add_subdirectory(data) add_subdirectory(tool) @@ -79,17 +80,17 @@ qt6_add_executable(Linphone ${_LINPHONEAPP_SOURCES} ) +set_source_files_properties(${_LINPHONEAPP_QML_SINGLETONS} PROPERTIES QT_QML_SINGLETON_TYPE TRUE) + qt6_add_qml_module(Linphone URI Linphone RESOURCE_PREFIX "" VERSION 1.0 - QML_FILES ${_LINPHONEAPP_QML_FILES} + QML_FILES ${_LINPHONEAPP_QML_FILES} ${_LINPHONEAPP_QML_SINGLETONS} ) -qt_add_resources(Linphone - PREFIX "/" - FILES ${_LINPHONEAPP_RC_FILES} -) +qt6_add_resources(Linphone "resources" PREFIX "/" FILES ${_LINPHONEAPP_RC_FILES}) + ################################################################ # TARGETS LINKS ################################################################ @@ -101,10 +102,10 @@ set_target_properties(${TARGET_NAME} PROPERTIES MACOSX_BUNDLE TRUE WIN32_EXECUTABLE TRUE OUTPUT_NAME "${EXECUTABLE_NAME}" - ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR} - LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR} - RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR} - +# Added for Qt to set the correct path on run configurations. + ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}" + LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}" + RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}" ) if(MSVC) set_target_properties(${TARGET_NAME} PROPERTIES PDB_NAME "${EXECUTABLE_NAME}_app") diff --git a/Linphone/core/App.cpp b/Linphone/core/App.cpp index 15ea2f471..12f6168c4 100644 --- a/Linphone/core/App.cpp +++ b/Linphone/core/App.cpp @@ -21,11 +21,14 @@ #include "App.hpp" #include +#include +#include #include "core/logger/QtLogger.hpp" #include "core/login/LoginPage.hpp" #include "core/singleapplication/singleapplication.h" #include "tool/Constants.hpp" +#include "tool/providers/ImageProvider.hpp" App::App(int &argc, char *argv[]) : SingleApplication(argc, argv, true, Mode::User | Mode::ExcludeAppPath | Mode::ExcludeAppVersion) { @@ -64,8 +67,9 @@ void App::init() { // QML mEngine = new QQmlApplicationEngine(this); mEngine->addImportPath(":/"); - + mEngine->rootContext()->setContextProperty("applicationDirPath", QGuiApplication::applicationDirPath()); initCppInterfaces(); + mEngine->addImageProvider(ImageProvider::ProviderId, new ImageProvider()); const QUrl url(u"qrc:/Linphone/view/App/Main.qml"_qs); QObject::connect( @@ -84,6 +88,9 @@ void App::initCppInterfaces() { qmlRegisterSingletonType( Constants::MainQmlUri, 1, 0, "LoginPageCpp", [](QQmlEngine *engine, QJSEngine *) -> QObject * { return new LoginPage(engine); }); + qmlRegisterSingletonType( + "ConstantsCpp", 1, 0, "ConstantsCpp", + [](QQmlEngine *engine, QJSEngine *) -> QObject * { return new Constants(engine); }); } //------------------------------------------------------------ diff --git a/Linphone/core/App.hpp b/Linphone/core/App.hpp index 63f6c26d6..aca4f5037 100644 --- a/Linphone/core/App.hpp +++ b/Linphone/core/App.hpp @@ -18,33 +18,35 @@ * along with this program. If not, see . */ -#include #include +#include #include -#include "core/thread/Thread.hpp" #include "core/singleapplication/singleapplication.h" +#include "core/thread/Thread.hpp" #include "model/core/CoreModel.hpp" class App : public SingleApplication { public: App(int &argc, char *argv[]); - static App* getInstance(); - -// App::postModelAsync() => run lambda in model thread and continue. -// App::postModelSync() => run lambda in current thread and block connection. - template - static auto postModelAsync(Func&& callable, Args&& ...args) { + static App *getInstance(); + + // App::postModelAsync() => run lambda in model thread and continue. + // App::postModelSync() => run lambda in current thread and block connection. + template + static auto postModelAsync(Func &&callable, Args &&...args) { QMetaObject::invokeMethod(CoreModel::getInstance().get(), callable, args...); } - template - static auto postModelAsync(Func&& callable) { + template + static auto postModelAsync(Func &&callable) { QMetaObject::invokeMethod(CoreModel::getInstance().get(), callable); } - template - static auto postModelSync(Func&& callable) { - QMetaObject::invokeMethod(CoreModel::getInstance().get(), callable - , QThread::currentThread() != CoreModel::getInstance()->thread() ? Qt::BlockingQueuedConnection : Qt::DirectConnection); + template + static auto postModelSync(Func &&callable) { + QMetaObject::invokeMethod(CoreModel::getInstance().get(), callable, + QThread::currentThread() != CoreModel::getInstance()->thread() + ? Qt::BlockingQueuedConnection + : Qt::DirectConnection); } void clean(); @@ -54,10 +56,10 @@ public: void onLoggerInitialized(); QQmlApplicationEngine *mEngine = nullptr; - -private: + +private: void createCommandParser(); - + QCommandLineParser *mParser = nullptr; Thread *mLinphoneThread = nullptr; }; diff --git a/Linphone/core/singleapplication/SingleApplicationDBus.cpp b/Linphone/core/singleapplication/SingleApplicationDBus.cpp index a99095b36..9ac1dd473 100644 --- a/Linphone/core/singleapplication/SingleApplicationDBus.cpp +++ b/Linphone/core/singleapplication/SingleApplicationDBus.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2020 Belledonne Communications SARL. + * Copyright (c) 2010-2024 Belledonne Communications SARL. * * This file is part of linphone-desktop * (see https://www.linphone.org). diff --git a/Linphone/core/singleapplication/SingleApplicationDBusPrivate.hpp b/Linphone/core/singleapplication/SingleApplicationDBusPrivate.hpp index b3708afed..a1a73113b 100644 --- a/Linphone/core/singleapplication/SingleApplicationDBusPrivate.hpp +++ b/Linphone/core/singleapplication/SingleApplicationDBusPrivate.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2020 Belledonne Communications SARL. + * Copyright (c) 2010-2024 Belledonne Communications SARL. * * This file is part of linphone-desktop * (see https://www.linphone.org). diff --git a/Linphone/core/utils/LinphoneEnums.cpp b/Linphone/core/utils/LinphoneEnums.cpp new file mode 100644 index 000000000..1cb4d741d --- /dev/null +++ b/Linphone/core/utils/LinphoneEnums.cpp @@ -0,0 +1,171 @@ +/* + * Copyright (c) 2024 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 . + */ + +#include + +#include "LinphoneEnums.hpp" + +// ============================================================================= + +void LinphoneEnums::registerMetaTypes() { + qRegisterMetaType(); + qRegisterMetaType(); + qRegisterMetaType(); + qRegisterMetaType(); + qRegisterMetaType(); + qRegisterMetaType(); + qRegisterMetaType(); + qRegisterMetaType(); + qRegisterMetaType(); + qRegisterMetaType(); + qRegisterMetaType(); + qRegisterMetaType(); + qRegisterMetaType(); + + qRegisterMetaType>(); + qRegisterMetaType(); + qRegisterMetaType>(); + qRegisterMetaType(); + qRegisterMetaType(); + qRegisterMetaType(); + qRegisterMetaType>(); + qRegisterMetaType(); + qRegisterMetaType(); + qRegisterMetaType(); + qRegisterMetaType>(); + qRegisterMetaType>(); + qRegisterMetaType>(); + qRegisterMetaType>(); +} + +linphone::MediaEncryption LinphoneEnums::toLinphone(const LinphoneEnums::MediaEncryption &data) { + return static_cast(data); +} +LinphoneEnums::MediaEncryption LinphoneEnums::fromLinphone(const linphone::MediaEncryption &data) { + return static_cast(data); +} + +linphone::Friend::Capability LinphoneEnums::toLinphone(const LinphoneEnums::FriendCapability &data) { + return static_cast(data); +} +LinphoneEnums::FriendCapability LinphoneEnums::fromLinphone(const linphone::Friend::Capability &data) { + return static_cast(data); +} + +linphone::EventLog::Type LinphoneEnums::toLinphone(const LinphoneEnums::EventLogType &data) { + return static_cast(data); +} +LinphoneEnums::EventLogType LinphoneEnums::fromLinphone(const linphone::EventLog::Type &data) { + return static_cast(data); +} + +linphone::ChatMessage::State LinphoneEnums::toLinphone(const LinphoneEnums::ChatMessageState &data) { + return static_cast(data); +} +LinphoneEnums::ChatMessageState LinphoneEnums::fromLinphone(const linphone::ChatMessage::State &data) { + return static_cast(data); +} + +linphone::ChatRoom::State LinphoneEnums::toLinphone(const LinphoneEnums::ChatRoomState &data) { + return static_cast(data); +} + +LinphoneEnums::ChatRoomState LinphoneEnums::fromLinphone(const linphone::ChatRoom::State &data) { + return static_cast(data); +} + +linphone::Call::Status LinphoneEnums::toLinphone(const LinphoneEnums::CallStatus &data) { + return static_cast(data); +} +LinphoneEnums::CallStatus LinphoneEnums::fromLinphone(const linphone::Call::Status &data) { + return static_cast(data); +} + +linphone::Conference::Layout LinphoneEnums::toLinphone(const LinphoneEnums::ConferenceLayout &layout) { + if (layout != LinphoneEnums::ConferenceLayoutAudioOnly) return static_cast(layout); + else return linphone::Conference::Layout::Grid; // Audio Only mode +} + +LinphoneEnums::ConferenceLayout LinphoneEnums::fromLinphone(const linphone::Conference::Layout &layout) { + return static_cast(layout); +} + +linphone::ConferenceInfo::State LinphoneEnums::toLinphone(const LinphoneEnums::ConferenceInfoState &state) { + return static_cast(state); +} + +LinphoneEnums::ConferenceInfoState LinphoneEnums::fromLinphone(const linphone::ConferenceInfo::State &state) { + return static_cast(state); +} + +linphone::ConferenceScheduler::State LinphoneEnums::toLinphone(const LinphoneEnums::ConferenceSchedulerState &state) { + return static_cast(state); +} + +LinphoneEnums::ConferenceSchedulerState LinphoneEnums::fromLinphone(const linphone::ConferenceScheduler::State &state) { + return static_cast(state); +} + +linphone::ParticipantDevice::State LinphoneEnums::toLinphone(const LinphoneEnums::ParticipantDeviceState &state) { + return static_cast(state); +} + +LinphoneEnums::ParticipantDeviceState LinphoneEnums::fromLinphone(const linphone::ParticipantDevice::State &state) { + return static_cast(state); +} + +linphone::Tunnel::Mode LinphoneEnums::toLinphone(const LinphoneEnums::TunnelMode &data) { + return static_cast(data); +} +LinphoneEnums::TunnelMode LinphoneEnums::fromLinphone(const linphone::Tunnel::Mode &data) { + return static_cast(data); +} + +linphone::Recorder::State LinphoneEnums::toLinphone(const LinphoneEnums::RecorderState &data) { + return static_cast(data); +} +LinphoneEnums::RecorderState LinphoneEnums::fromLinphone(const linphone::Recorder::State &data) { + return static_cast(data); +} + +linphone::TransportType LinphoneEnums::toLinphone(const LinphoneEnums::TransportType &type) { + return static_cast(type); +} +LinphoneEnums::TransportType LinphoneEnums::fromLinphone(const linphone::TransportType &type) { + return static_cast(type); +} +QString LinphoneEnums::toString(const LinphoneEnums::TransportType &type) { + switch (type) { + case TransportTypeTcp: + return "TCP"; + case TransportTypeUdp: + return "UDP"; + case TransportTypeTls: + return "TLS"; + case TransportTypeDtls: + return "DTLS"; + } +} +void LinphoneEnums::fromString(const QString &transportType, LinphoneEnums::TransportType *transport) { + if (transportType.toUpper() == QLatin1String("TCP")) *transport = TransportTypeTcp; + else if (transportType.toUpper() == QLatin1String("UDP")) *transport = TransportTypeUdp; + else if (transportType.toUpper() == QLatin1String("TLS")) *transport = TransportTypeTls; + else *transport = TransportTypeDtls; +} diff --git a/Linphone/core/utils/LinphoneEnums.hpp b/Linphone/core/utils/LinphoneEnums.hpp new file mode 100644 index 000000000..5d5fd2ca6 --- /dev/null +++ b/Linphone/core/utils/LinphoneEnums.hpp @@ -0,0 +1,244 @@ +/* + * Copyright (c) 2021 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 . + */ + +#ifndef LINPHONE_ENUMS_H_ +#define LINPHONE_ENUMS_H_ + +#include +#include + +// This namespace is used to pass Linphone enumerators to QML + +// ============================================================================= + +namespace LinphoneEnums { +Q_NAMESPACE + +void registerMetaTypes(); + +enum MediaEncryption { + MediaEncryptionNone = int(linphone::MediaEncryption::None), + MediaEncryptionDtls = int(linphone::MediaEncryption::DTLS), + MediaEncryptionSrtp = int(linphone::MediaEncryption::SRTP), + MediaEncryptionZrtp = int(linphone::MediaEncryption::ZRTP) +}; +Q_ENUM_NS(MediaEncryption) + +linphone::MediaEncryption toLinphone(const LinphoneEnums::MediaEncryption &encryption); +LinphoneEnums::MediaEncryption fromLinphone(const linphone::MediaEncryption &encryption); + +enum FriendCapability { + FriendCapabilityNone = int(linphone::Friend::Capability::None), + FriendCapabilityGroupChat = int(linphone::Friend::Capability::GroupChat), + FriendCapabilityLimeX3Dh = int(linphone::Friend::Capability::LimeX3Dh), + FriendCapabilityEphemeralMessages = int(linphone::Friend::Capability::EphemeralMessages) +}; +Q_ENUM_NS(FriendCapability) + +linphone::Friend::Capability toLinphone(const LinphoneEnums::FriendCapability &capability); +LinphoneEnums::FriendCapability fromLinphone(const linphone::Friend::Capability &capability); + +enum EventLogType { + EventLogTypeNone = int(linphone::EventLog::Type::None), + EventLogTypeConferenceCreated = int(linphone::EventLog::Type::ConferenceCreated), + EventLogTypeConferenceTerminated = int(linphone::EventLog::Type::ConferenceTerminated), + EventLogTypeConferenceCallStarted = int(linphone::EventLog::Type::ConferenceCallStarted), + EventLogTypeConferenceCallEnded = int(linphone::EventLog::Type::ConferenceCallEnded), + EventLogTypeConferenceChatMessage = int(linphone::EventLog::Type::ConferenceChatMessage), + EventLogTypeConferenceParticipantAdded = int(linphone::EventLog::Type::ConferenceParticipantAdded), + EventLogTypeConferenceParticipantRemoved = int(linphone::EventLog::Type::ConferenceParticipantRemoved), + EventLogTypeConferenceParticipantSetAdmin = int(linphone::EventLog::Type::ConferenceParticipantSetAdmin), + EventLogTypeConferenceParticipantUnsetAdmin = int(linphone::EventLog::Type::ConferenceParticipantUnsetAdmin), + EventLogTypeConferenceParticipantDeviceAdded = int(linphone::EventLog::Type::ConferenceParticipantDeviceAdded), + EventLogTypeConferenceParticipantDeviceRemoved = int(linphone::EventLog::Type::ConferenceParticipantDeviceRemoved), + EventLogTypeConferenceParticipantDeviceMediaAvailabilityChanged = + int(linphone::EventLog::Type::ConferenceParticipantDeviceMediaAvailabilityChanged), + EventLogTypeConferenceSubjectChanged = int(linphone::EventLog::Type::ConferenceSubjectChanged), + EventLogTypeConferenceAvailableMediaChanged = int(linphone::EventLog::Type::ConferenceAvailableMediaChanged), + EventLogTypeConferenceSecurityEvent = int(linphone::EventLog::Type::ConferenceSecurityEvent), + EventLogTypeConferenceEphemeralMessageLifetimeChanged = + int(linphone::EventLog::Type::ConferenceEphemeralMessageLifetimeChanged), + EventLogTypeConferenceEphemeralMessageEnabled = int(linphone::EventLog::Type::ConferenceEphemeralMessageEnabled), + EventLogTypeConferenceEphemeralMessageDisabled = int(linphone::EventLog::Type::ConferenceEphemeralMessageDisabled) +}; +Q_ENUM_NS(EventLogType) + +linphone::EventLog::Type toLinphone(const LinphoneEnums::EventLogType &capability); +LinphoneEnums::EventLogType fromLinphone(const linphone::EventLog::Type &data); + +enum ChatMessageState { + ChatMessageStateIdle = int(linphone::ChatMessage::State::Idle), + ChatMessageStateInProgress = int(linphone::ChatMessage::State::InProgress), + ChatMessageStateDelivered = int(linphone::ChatMessage::State::Delivered), + ChatMessageStateNotDelivered = int(linphone::ChatMessage::State::NotDelivered), + ChatMessageStateFileTransferError = int(linphone::ChatMessage::State::FileTransferError), + ChatMessageStateFileTransferDone = int(linphone::ChatMessage::State::FileTransferDone), + ChatMessageStateDeliveredToUser = int(linphone::ChatMessage::State::DeliveredToUser), + ChatMessageStateDisplayed = int(linphone::ChatMessage::State::Displayed), + ChatMessageStateFileTransferInProgress = int(linphone::ChatMessage::State::FileTransferInProgress) +}; +Q_ENUM_NS(ChatMessageState) + +linphone::ChatMessage::State toLinphone(const LinphoneEnums::ChatMessageState &data); +LinphoneEnums::ChatMessageState fromLinphone(const linphone::ChatMessage::State &data); + +enum ChatRoomState { + ChatRoomStateNone = int(linphone::ChatRoom::State::None), + ChatRoomStateInstantiated = int(linphone::ChatRoom::State::Instantiated), + ChatRoomStateCreationPending = int(linphone::ChatRoom::State::CreationPending), + ChatRoomStateCreated = int(linphone::ChatRoom::State::Created), + ChatRoomStateCreationFailed = int(linphone::ChatRoom::State::CreationFailed), + ChatRoomStateTerminationPending = int(linphone::ChatRoom::State::TerminationPending), + ChatRoomStateTerminated = int(linphone::ChatRoom::State::Terminated), + ChatRoomStateTerminationFailed = int(linphone::ChatRoom::State::TerminationFailed), + ChatRoomStateDeleted = int(linphone::ChatRoom::State::Deleted), +}; +Q_ENUM_NS(ChatRoomState) + +linphone::ChatRoom::State toLinphone(const LinphoneEnums::ChatRoomState &data); +LinphoneEnums::ChatRoomState fromLinphone(const linphone::ChatRoom::State &data); + +enum CallStatus { + CallStatusDeclined = int(linphone::Call::Status::Declined), + CallStatusMissed = int(linphone::Call::Status::Missed), + CallStatusSuccess = int(linphone::Call::Status::Success), + CallStatusAborted = int(linphone::Call::Status::Aborted), + CallStatusEarlyAborted = int(linphone::Call::Status::EarlyAborted), + CallStatusAcceptedElsewhere = int(linphone::Call::Status::AcceptedElsewhere), + CallStatusDeclinedElsewhere = int(linphone::Call::Status::DeclinedElsewhere) +}; +Q_ENUM_NS(CallStatus) + +linphone::Call::Status toLinphone(const LinphoneEnums::CallStatus &capability); +LinphoneEnums::CallStatus fromLinphone(const linphone::Call::Status &capability); + +enum ConferenceLayout { + ConferenceLayoutGrid = int(linphone::Conference::Layout::Grid), + ConferenceLayoutActiveSpeaker = int(linphone::Conference::Layout::ActiveSpeaker), + ConferenceLayoutAudioOnly = ConferenceLayoutGrid + ConferenceLayoutActiveSpeaker + 1, +}; +Q_ENUM_NS(ConferenceLayout) + +linphone::Conference::Layout toLinphone(const LinphoneEnums::ConferenceLayout &layout); +LinphoneEnums::ConferenceLayout fromLinphone(const linphone::Conference::Layout &layout); + +enum ConferenceInfoState { + ConferenceInfoStateNew = int(linphone::ConferenceInfo::State::New), + ConferenceInfoStateUpdated = int(linphone::ConferenceInfo::State::Updated), + ConferenceInfoStateCancelled = int(linphone::ConferenceInfo::State::Cancelled) +}; +Q_ENUM_NS(ConferenceInfoState) + +linphone::ConferenceInfo::State toLinphone(const LinphoneEnums::ConferenceInfoState &state); +LinphoneEnums::ConferenceInfoState fromLinphone(const linphone::ConferenceInfo::State &state); + +enum ConferenceSchedulerState { + ConferenceSchedulerStateAllocationPending = int(linphone::ConferenceScheduler::State::AllocationPending), + ConferenceSchedulerStateError = int(linphone::ConferenceScheduler::State::Error), + ConferenceSchedulerStateIdle = int(linphone::ConferenceScheduler::State::Idle), + ConferenceSchedulerStateReady = int(linphone::ConferenceScheduler::State::Ready), + ConferenceSchedulerStateUpdating = int(linphone::ConferenceScheduler::State::Updating) +}; +Q_ENUM_NS(ConferenceSchedulerState) + +linphone::ConferenceScheduler::State toLinphone(const LinphoneEnums::ConferenceSchedulerState &state); +LinphoneEnums::ConferenceSchedulerState fromLinphone(const linphone::ConferenceScheduler::State &state); + +enum ParticipantDeviceState { + ParticipantDeviceStateJoining = int(linphone::ParticipantDevice::State::Joining), + ParticipantDeviceStatePresent = int(linphone::ParticipantDevice::State::Present), + ParticipantDeviceStateLeaving = int(linphone::ParticipantDevice::State::Leaving), + ParticipantDeviceStateLeft = int(linphone::ParticipantDevice::State::Left), + ParticipantDeviceStateScheduledForJoining = int(linphone::ParticipantDevice::State::ScheduledForJoining), + ParticipantDeviceStateScheduledForLeaving = int(linphone::ParticipantDevice::State::ScheduledForLeaving), + ParticipantDeviceStateOnHold = int(linphone::ParticipantDevice::State::OnHold), + ParticipantDeviceStateAlerting = int(linphone::ParticipantDevice::State::Alerting), + ParticipantDeviceStateMutedByFocus = int(linphone::ParticipantDevice::State::MutedByFocus), + +}; +Q_ENUM_NS(ParticipantDeviceState) + +linphone::ParticipantDevice::State toLinphone(const LinphoneEnums::ParticipantDeviceState &state); +LinphoneEnums::ParticipantDeviceState fromLinphone(const linphone::ParticipantDevice::State &state); + +enum TunnelMode { + TunnelModeDisable = int(linphone::Tunnel::Mode::Disable), + TunnelModeEnable = int(linphone::Tunnel::Mode::Enable), + TunnelModeAuto = int(linphone::Tunnel::Mode::Auto) +}; +Q_ENUM_NS(TunnelMode) + +linphone::Tunnel::Mode toLinphone(const LinphoneEnums::TunnelMode &mode); +LinphoneEnums::TunnelMode fromLinphone(const linphone::Tunnel::Mode &mode); + +enum RecorderState { + RecorderStateClosed = int(linphone::Recorder::State::Closed), + RecorderStatePaused = int(linphone::Recorder::State::Paused), + RecorderStateRunning = int(linphone::Recorder::State::Running) +}; +Q_ENUM_NS(RecorderState) + +linphone::Recorder::State toLinphone(const LinphoneEnums::RecorderState &state); +LinphoneEnums::RecorderState fromLinphone(const linphone::Recorder::State &state); + +enum TransportType { + TransportTypeDtls = int(linphone::TransportType::Dtls), + TransportTypeTcp = int(linphone::TransportType::Tcp), + TransportTypeTls = int(linphone::TransportType::Tls), + TransportTypeUdp = int(linphone::TransportType::Udp) +}; +Q_ENUM_NS(TransportType) + +linphone::TransportType toLinphone(const LinphoneEnums::TransportType &type); +LinphoneEnums::TransportType fromLinphone(const linphone::TransportType &type); +QString toString(const LinphoneEnums::TransportType &type); +void fromString(const QString &transportType, LinphoneEnums::TransportType *transport); +} // namespace LinphoneEnums + +Q_DECLARE_METATYPE(LinphoneEnums::CallStatus) +Q_DECLARE_METATYPE(LinphoneEnums::ChatMessageState) +Q_DECLARE_METATYPE(LinphoneEnums::ChatRoomState) +Q_DECLARE_METATYPE(LinphoneEnums::ConferenceLayout) +Q_DECLARE_METATYPE(LinphoneEnums::ConferenceInfoState) +Q_DECLARE_METATYPE(LinphoneEnums::ConferenceSchedulerState) +Q_DECLARE_METATYPE(LinphoneEnums::EventLogType) +Q_DECLARE_METATYPE(LinphoneEnums::FriendCapability) +Q_DECLARE_METATYPE(LinphoneEnums::MediaEncryption) +Q_DECLARE_METATYPE(LinphoneEnums::ParticipantDeviceState) +Q_DECLARE_METATYPE(LinphoneEnums::RecorderState) +Q_DECLARE_METATYPE(LinphoneEnums::TunnelMode) +Q_DECLARE_METATYPE(LinphoneEnums::TransportType) + +Q_DECLARE_METATYPE(std::shared_ptr) +Q_DECLARE_METATYPE(linphone::Call::State) +Q_DECLARE_METATYPE(std::shared_ptr) +Q_DECLARE_METATYPE(linphone::Config::ConfiguringState) +Q_DECLARE_METATYPE(std::string) +Q_DECLARE_METATYPE(linphone::GlobalState) +Q_DECLARE_METATYPE(std::shared_ptr) +Q_DECLARE_METATYPE(linphone::ChatRoom::State) +Q_DECLARE_METATYPE(linphone::RegistrationState) +Q_DECLARE_METATYPE(linphone::VersionUpdateCheckResult) +Q_DECLARE_METATYPE(std::shared_ptr) +Q_DECLARE_METATYPE(std::shared_ptr) +Q_DECLARE_METATYPE(std::shared_ptr) +Q_DECLARE_METATYPE(std::shared_ptr) + +#endif diff --git a/Linphone/data/CMakeLists.txt b/Linphone/data/CMakeLists.txt index 1c8b72138..75f3feb86 100644 --- a/Linphone/data/CMakeLists.txt +++ b/Linphone/data/CMakeLists.txt @@ -1,6 +1,18 @@ list(APPEND _LINPHONEAPP_RC_FILES data/assistant/use-app-sip-account.rc data/assistant/create-app-sip-account.rc data/assistant/use-other-sip-account.rc + "data/image/info-logo.svg" + "data/image/belledonne.svg" + "data/image/profil.svg" + "data/image/logo.svg" + "data/image/login-image.svg" + "data/image/show.svg" + "data/image/welcome-linphone-logo.svg" + "data/image/welcome-lock.svg" + "data/image/welcome-opensource.svg" + "data/image/hide.svg" + "data/image/down-arrow.svg" + "data/image/return-arrow.svg" ) -set(_LINPHONEAPP_RC_FILES ${_LINPHONEAPP_RC_FILES} PARENT_SCOPE) +set(_LINPHONEAPP_RC_FILES ${_LINPHONEAPP_RC_FILES} PARENT_SCOPE) \ No newline at end of file diff --git a/Linphone/data/image/belledonne.svg b/Linphone/data/image/belledonne.svg new file mode 100644 index 000000000..a53f4676e --- /dev/null +++ b/Linphone/data/image/belledonne.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/Linphone/data/image/down-arrow.svg b/Linphone/data/image/down-arrow.svg new file mode 100644 index 000000000..05e85884e --- /dev/null +++ b/Linphone/data/image/down-arrow.svg @@ -0,0 +1,3 @@ + + + diff --git a/Linphone/data/image/hide.svg b/Linphone/data/image/hide.svg new file mode 100644 index 000000000..8c58de050 --- /dev/null +++ b/Linphone/data/image/hide.svg @@ -0,0 +1,3 @@ + + + diff --git a/Linphone/data/image/info-logo.svg b/Linphone/data/image/info-logo.svg new file mode 100644 index 000000000..fa7f3a776 --- /dev/null +++ b/Linphone/data/image/info-logo.svg @@ -0,0 +1,3 @@ + + + diff --git a/Linphone/data/image/login-image.svg b/Linphone/data/image/login-image.svg new file mode 100644 index 000000000..f22b2ed17 --- /dev/null +++ b/Linphone/data/image/login-image.svg @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Linphone/data/image/profil.svg b/Linphone/data/image/profil.svg new file mode 100644 index 000000000..82555575a --- /dev/null +++ b/Linphone/data/image/profil.svg @@ -0,0 +1,3 @@ + + + diff --git a/Linphone/data/image/return-arrow.svg b/Linphone/data/image/return-arrow.svg new file mode 100644 index 000000000..bff67614f --- /dev/null +++ b/Linphone/data/image/return-arrow.svg @@ -0,0 +1,3 @@ + + + diff --git a/Linphone/data/image/show.svg b/Linphone/data/image/show.svg new file mode 100644 index 000000000..d23a9e937 --- /dev/null +++ b/Linphone/data/image/show.svg @@ -0,0 +1,3 @@ + + + diff --git a/Linphone/data/image/welcome-linphone-logo.svg b/Linphone/data/image/welcome-linphone-logo.svg new file mode 100644 index 000000000..6f6b71ba7 --- /dev/null +++ b/Linphone/data/image/welcome-linphone-logo.svg @@ -0,0 +1,4 @@ + + + + diff --git a/Linphone/data/image/welcome-lock.svg b/Linphone/data/image/welcome-lock.svg new file mode 100644 index 000000000..e3eadede9 --- /dev/null +++ b/Linphone/data/image/welcome-lock.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/Linphone/data/image/welcome-opensource.svg b/Linphone/data/image/welcome-opensource.svg new file mode 100644 index 000000000..11a62d80d --- /dev/null +++ b/Linphone/data/image/welcome-opensource.svg @@ -0,0 +1,3 @@ + + + diff --git a/Linphone/tool/CMakeLists.txt b/Linphone/tool/CMakeLists.txt index b1ba1c69b..20a14d8e4 100644 --- a/Linphone/tool/CMakeLists.txt +++ b/Linphone/tool/CMakeLists.txt @@ -1,6 +1,8 @@ list(APPEND _LINPHONEAPP_SOURCES tool/Constants.cpp tool/Utils.cpp + + tool/providers/ImageProvider.cpp ) set(_LINPHONEAPP_SOURCES ${_LINPHONEAPP_SOURCES} PARENT_SCOPE) diff --git a/Linphone/tool/Constants.hpp b/Linphone/tool/Constants.hpp index 47de9a9ed..71c921a1a 100644 --- a/Linphone/tool/Constants.hpp +++ b/Linphone/tool/Constants.hpp @@ -40,6 +40,7 @@ public: static constexpr char DefaultLocale[] = "en"; static constexpr char DefaultFont[] = "Noto Sans"; static constexpr int DefaultFontPointSize = 10; + #ifdef __APPLE__ static constexpr char DefaultEmojiFont[] = "Apple Color Emoji"; #else @@ -94,6 +95,7 @@ public: Q_PROPERTY(QString PrivatePolicyUrl MEMBER PrivatePolicyUrl CONSTANT) Q_PROPERTY(QString ContactUrl MEMBER ContactUrl CONSTANT) Q_PROPERTY(QString TranslationUrl MEMBER TranslationUrl CONSTANT) + Q_PROPERTY(QString DefaultFont MEMBER DefaultFont CONSTANT) Q_PROPERTY(int maxMosaicParticipants MEMBER MaxMosaicParticipants CONSTANT) Q_PROPERTY(QStringList reactionsList READ getReactionsList CONSTANT) diff --git a/Linphone/tool/providers/AvatarProvider.cpp b/Linphone/tool/providers/AvatarProvider.cpp new file mode 100644 index 000000000..c63a731d5 --- /dev/null +++ b/Linphone/tool/providers/AvatarProvider.cpp @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2010-2024 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 . + */ + +#include "core/path/Paths.hpp" +#include "core/utils/Constants.hpp" +// #include "tool/Utils.hpp" + +#include "AvatarProvider.hpp" + +// ============================================================================= + +const QString AvatarProvider::ProviderId = "avatar"; + +AvatarProvider::AvatarProvider() + : QQuickImageProvider(QQmlImageProviderBase::Image, QQmlImageProviderBase::ForceAsynchronousImageLoading) { + const auto &str = Paths::getAvatarsDirPath().toStdString(); + if (Constants::LinphoneLocaleEncoding == QString("UTF-8")) mAvatarsPath = QString::fromStdString(str); + else mAvatarsPath = QString::fromLocal8Bit(str.c_str(), int(str.size())); +} + +QImage AvatarProvider::requestImage(const QString &id, QSize *size, const QSize &) { + QImage image(mAvatarsPath + id); + *size = image.size(); + return image; +} diff --git a/Linphone/tool/providers/AvatarProvider.hpp b/Linphone/tool/providers/AvatarProvider.hpp new file mode 100644 index 000000000..af44b47f2 --- /dev/null +++ b/Linphone/tool/providers/AvatarProvider.hpp @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2010-2024 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 . + */ + +#ifndef AVATAR_PROVIDER_H_ +#define AVATAR_PROVIDER_H_ + +#include + +// ============================================================================= + +class AvatarProvider : public QQuickImageProvider { +public: + AvatarProvider(); + + QImage requestImage(const QString &id, QSize *size, const QSize &requestedSize) override; + + static const QString ProviderId; + +private: + QString mAvatarsPath; +}; + +#endif // AVATAR_PROVIDER_H_ diff --git a/Linphone/tool/providers/ImageProvider.cpp b/Linphone/tool/providers/ImageProvider.cpp new file mode 100644 index 000000000..4eb0ef153 --- /dev/null +++ b/Linphone/tool/providers/ImageProvider.cpp @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2010-2024 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 . + */ + +#include +#include +#include +#include +#include +#include +#include + +#include "core/App.hpp" + +#include "ImageProvider.hpp" + +#include "tool/Constants.hpp" + +// ============================================================================= + +using namespace std; + +// ----------------------------------------------------------------------------- + +const QString ImageProvider::ProviderId = "internal"; + +ImageAsyncImageResponse::ImageAsyncImageResponse(const QString &id, const QSize &requestedSize) { + + QString path = ":/data/image/"; + QStringList filters; + filters << "*.svg"; + QDir imageDir(path); + if (!imageDir.exists()) { + qDebug() << QStringLiteral("[ImageProvider] Dir doesn't exist: `%1`.").arg(path); + return; + } + QFileInfoList files = QDir(path).entryInfoList(filters, QDir::Files, QDir::Name); + for (QFileInfo file : files) { + if (file.fileName() == id) { + mPath = file.absoluteFilePath(); + break; + } + } + + QFile file(mPath); + + if (!file.exists()) { + qDebug() << QStringLiteral("[ImageProvider] File doesn't exist: `%1`.").arg(mPath); + return; + } + QImage originalImage(mPath); + + if (!originalImage.isNull()) { + emit imageGrabbed(originalImage); + } +} + +void ImageAsyncImageResponse::imageGrabbed(QImage image) { + mImage = image; + emit finished(); +} + +QQuickTextureFactory *ImageAsyncImageResponse::textureFactory() const { + return QQuickTextureFactory::textureFactoryForImage(mImage); +} +QQuickImageResponse *ImageProvider::requestImageResponse(const QString &id, const QSize &requestedSize) { + ImageAsyncImageResponse *response = new ImageAsyncImageResponse(id, requestedSize); + return response; +} \ No newline at end of file diff --git a/Linphone/tool/providers/ImageProvider.hpp b/Linphone/tool/providers/ImageProvider.hpp new file mode 100644 index 000000000..ffe4929bd --- /dev/null +++ b/Linphone/tool/providers/ImageProvider.hpp @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2010-2024 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 . + */ + +#ifndef IMAGE_PROVIDER_H_ +#define IMAGE_PROVIDER_H_ + +#include + +// ============================================================================= +class ImageAsyncImageResponse : public QQuickImageResponse { +public: + ImageAsyncImageResponse(const QString &id, const QSize &requestedSize); + + QQuickTextureFactory *textureFactory() const override; // Convert QImage into texture. + // If Image is null, then sourceSize will be egal to 0. + // So there will be no errors. + + void imageGrabbed(QImage image); + + QImage mImage; + QString mPath; +}; + +class ImageProvider : public QQuickAsyncImageProvider { +public: + virtual QQuickImageResponse *requestImageResponse(const QString &id, const QSize &requestedSize) override; + + static const QString ProviderId; +}; + +#endif // IMAGE_PROVIDER_H_ diff --git a/Linphone/view/App/Layout/LoginLayout.qml b/Linphone/view/App/Layout/LoginLayout.qml new file mode 100644 index 000000000..e3b7927bc --- /dev/null +++ b/Linphone/view/App/Layout/LoginLayout.qml @@ -0,0 +1,70 @@ +/** +* 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 + property alias titleContent : titleLayout.children + property alias centerContent : centerLayout.children + + ColumnLayout { + anchors.fill: parent + Layout.fillHeight: true + ColumnLayout { + Layout.rightMargin: 25 + RowLayout { + Layout.fillWidth: true + Layout.preferredHeight: 50 + Layout.topMargin: 20 + Layout.bottomMargin: 20 + Layout.alignment: Qt.AlignRight | Qt.AlignTop + Control.Button { + background: Rectangle { + color: "transparent" + } + contentItem: Image { + fillMode: Image.PreserveAspectFit + source: AppIcons.info + } + onClicked: console.debug("[LoginLayout] open about popup") + } + + Text { + Layout.alignment: Qt.AlignRight |Qt.AlignVCenter + text: "About" + font.pixelSize: 12 + color: DefaultStyle.grayColor + } + } + RowLayout { + id: titleLayout + Layout.leftMargin: 40 + Layout.bottomMargin: 20 + } + ColumnLayout { + id: centerLayout + Layout.leftMargin: 40 + Layout.fillHeight: true + Layout.topMargin: 20 + } + } + + RowLayout { + Layout.alignment: Qt.AlignBottom + Image { + Layout.minimumHeight: 80 + Layout.fillWidth: true + source: AppIcons.belledonne + fillMode: Image.Stretch + } + + } + } +} + diff --git a/Linphone/view/App/Main.qml b/Linphone/view/App/Main.qml index 579743baa..da25a88da 100644 --- a/Linphone/view/App/Main.qml +++ b/Linphone/view/App/Main.qml @@ -1,21 +1,41 @@ import QtQuick 2.15 -import QtQuick.Layouts 1.0 +import QtQuick.Layouts 1.3 +import QtQuick.Controls import Linphone //import UI 1.0 Window { - width: 640 - height: 480 + id: mainWindow + width: 960 + height: 600 visible: true title: qsTr("Linphone") - ColumnLayout{ + StackView { + id: mainWindowStackView anchors.fill: parent - - LoginPage{ - height: 100 - width: 640 + initialItem: welcomePage + } + Component { + id: welcomePage + WelcomePage { + onStartButtonPressed: { + mainWindowStackView.pop(welcomePage) + mainWindowStackView.push(loginPage) + } } } -} + Component { + id: loginPage + LoginPage { + onUseSIPButtonClicked: mainWindowStackView.push(sipLoginPage) + } + } + Component { + id: sipLoginPage + SIPLoginPage { + onReturnToLogin: mainWindowStackView.pop() + } + } +} \ No newline at end of file diff --git a/Linphone/view/CMakeLists.txt b/Linphone/view/CMakeLists.txt index 5f72435e5..d4d7ce4ea 100644 --- a/Linphone/view/CMakeLists.txt +++ b/Linphone/view/CMakeLists.txt @@ -1,10 +1,27 @@ list(APPEND _LINPHONEAPP_QML_FILES view/App/Main.qml + view/App/Layout/LoginLayout.qml view/Item/Button.qml - - view/Page/LoginPage.qml + view/Item/Carousel.qml + view/Item/ComboBox.qml + view/Item/RectangleTest.qml + view/Item/Text.qml + view/Item/TextInput.qml + + view/Item/Form/LoginForm.qml + + view/Page/Login/LoginPage.qml + view/Page/Login/SIPLoginPage.qml + view/Page/Login/WelcomePage.qml + +) + +list(APPEND _LINPHONEAPP_QML_SINGLETONS + view/Style/AppIcons.qml + view/Style/DefaultStyle.qml ) set(_LINPHONEAPP_QML_FILES ${_LINPHONEAPP_QML_FILES} PARENT_SCOPE) +set(_LINPHONEAPP_QML_SINGLETONS ${_LINPHONEAPP_QML_SINGLETONS} PARENT_SCOPE) \ No newline at end of file diff --git a/Linphone/view/Item/Button.qml b/Linphone/view/Item/Button.qml index 7a320a051..1a2ab8cf0 100644 --- a/Linphone/view/Item/Button.qml +++ b/Linphone/view/Item/Button.qml @@ -1,36 +1,36 @@ import QtQuick 2.7 import QtQuick.Controls 2.2 as Control - - +import Linphone Control.Button { id: mainItem property int capitalization + property bool inversedColors: false + property int textSize: DefaultStyle.buttonTextSize background: Rectangle { - color: '#F50000' - radius: 10 - border.color: 'white' + color: inversedColors ? DefaultStyle.buttonInversedBackground : DefaultStyle.buttonBackground + radius: 24 + border.color: inversedColors ? DefaultStyle.buttonBackground : DefaultStyle.buttonInversedBackground } contentItem: Text { - color: 'white' + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + leftPadding: 11 + rightPadding: 11 + topPadding: 6 + bottomPadding: 6 + + wrapMode: Text.WordWrap + text: mainItem.text + color: inversedColors ? DefaultStyle.buttonInversedTextColor : DefaultStyle.buttonTextColor font { bold: true - pointSize: 10 + pointSize: mainItem.textSize capitalization: mainItem.capitalization } - wrapMode: Text.WordWrap - horizontalAlignment: Text.AlignHCenter - text: mainItem.text - verticalAlignment: Text.AlignVCenter } hoverEnabled: true - /* - MouseArea { - id: mouseArea - anchors.fill: parent - onPressed: mouse.accepted = false - }*/ -} \ No newline at end of file +} diff --git a/Linphone/view/Item/Carousel.qml b/Linphone/view/Item/Carousel.qml new file mode 100644 index 000000000..8e846f512 --- /dev/null +++ b/Linphone/view/Item/Carousel.qml @@ -0,0 +1,105 @@ +import QtQuick 2.15 +import QtQuick.Layouts 1.3 +import QtQuick.Controls 2.2 as Control + +import Linphone + +ColumnLayout { + id: carouselRoot + + property list itemsList + property int currentIndex: carouselStackLayout.currentIndex + property bool prevButtonVisible: true + property bool nextButtonVisible: true + + function goToSlide(index) { + carouselStackLayout.goToSlideAtIndex(index) + } + + StackLayout { + id: carouselStackLayout + + property var items: children + property int previousIndex: currentIndex + + function goToSlideAtIndex(index) { + carouselStackLayout.previousIndex = carouselStackLayout.currentIndex; + carouselStackLayout.currentIndex = index; + } + + Component.onCompleted: { + // The animation is not working until the slide + // has been displayed once + for (var i = 0; i < carouselRoot.itemsList.length; ++i) { + // const newObject = Qt.createQmlObject(carouselRoot.itemsList[i], carouselStackLayout); + carouselRoot.itemsList[i].createObject(carouselStackLayout) + var button = carouselButton.createObject(carouselButtonsLayout, {slideIndex: i, stackLayout: carouselStackLayout}) + button.buttonClicked.connect(goToSlideAtIndex) + currentIndex = i + } + currentIndex = 0 + previousIndex = currentIndex + items = children + } + + Component { + id: crossFader + + ParallelAnimation { + id: anim + property bool mirrored: false + property Item fadeOutTarget + property Item fadeInTarget + + NumberAnimation { + target: fadeInTarget + property: "opacity" + from: 0 + to: 1 + duration: 300 + } + + XAnimator { + target: fadeInTarget + from: (mirrored ? -1 : 1) * fadeInTarget.width/3. + to: 0 + duration: 300 + easing.type: Easing.OutCubic + } + } + } + + onCurrentIndexChanged: { + var currentItem = items[currentIndex] + var crossFaderAnim = crossFader.createObject(parent, {fadeInTarget: currentItem, mirrored: (previousIndex > currentIndex)}) + crossFaderAnim.restart() + carouselRoot.currentIndex = currentIndex + } + } + RowLayout { + id: carouselButtonsLayout + Layout.topMargin: 20 + Layout.bottomMargin: 20 + + Component { + id: carouselButton + Control.Button { + property int slideIndex + property var stackLayout + signal buttonClicked(int index) + + background: Rectangle { + color: stackLayout.currentIndex == slideIndex ? DefaultStyle.buttonBackground : DefaultStyle.carouselLightGrayColor + radius: 15 + width: stackLayout.currentIndex == slideIndex ? 11 : 8 + height: 8 + Behavior on width { NumberAnimation {duration: 100}} + } + onClicked: { + buttonClicked(slideIndex) + } + } + } + } +} + diff --git a/Linphone/view/Item/ComboBox.qml b/Linphone/view/Item/ComboBox.qml new file mode 100644 index 000000000..bcf9b94ea --- /dev/null +++ b/Linphone/view/Item/ComboBox.qml @@ -0,0 +1,77 @@ +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts 1.0 +import Linphone + +ColumnLayout { + id: cellLayout + property string label: "" + property int backgroundWidth: 200 + property variant modelList: [] + + Layout.bottomMargin: 8 + Text { + verticalAlignment: Text.AlignVCenter + text: cellLayout.label + color: DefaultStyle.formItemLabelColor + font { + pointSize: DefaultStyle.formItemLabelSize + bold: true + } + } + + ComboBox { + id: combobox + model: cellLayout.modelList + background: Loader { + sourceComponent: backgroundRectangle + } + contentItem: Text { + leftPadding: 10 + text: combobox.displayText + font.family: DefaultStyle.defaultFont + font.pointSize: DefaultStyle.formItemLabelSize + color: DefaultStyle.formItemLabelColor + verticalAlignment: Text.AlignVCenter + elide: Text.ElideRight + } + + indicator: Image { + x: combobox.width - width - combobox.rightPadding + y: combobox.topPadding + (combobox.availableHeight - height) / 2 + source: AppIcons.downArrow + // width: 12 + // height: 8 + } + + popup: Popup { + y: combobox.height - 1 + width: combobox.width + implicitHeight: contentItem.implicitHeight + padding: 1 + + contentItem: ListView { + clip: true + implicitHeight: contentHeight + model: combobox.popup.visible ? combobox.delegateModel : null + currentIndex: combobox.highlightedIndex + + ScrollIndicator.vertical: ScrollIndicator { } + } + + background: Loader { + sourceComponent: backgroundRectangle + } + } + Component { + id: backgroundRectangle + Rectangle { + implicitWidth: cellLayout.backgroundWidth + implicitHeight: 30 + radius: 20 + color: DefaultStyle.formItemBackgroundColor + opacity: 0.7 + } + } + } +} \ No newline at end of file diff --git a/Linphone/view/Item/Form/LoginForm.qml b/Linphone/view/Item/Form/LoginForm.qml new file mode 100644 index 000000000..7db2c65bd --- /dev/null +++ b/Linphone/view/Item/Form/LoginForm.qml @@ -0,0 +1,56 @@ +import QtQuick 2.15 +import QtQuick.Layouts 1.0 +import QtQuick.Controls as Control +import Linphone + +RowLayout { + Layout.alignment: Qt.AlignBottom + ColumnLayout { + TextInput { + id: username + label: "Username" + mandatory: true + textInputWidth: 250 + } + TextInput { + id: password + label: "Password" + mandatory: true + hidden: true + textInputWidth: 250 + } + + RowLayout { + id: lastFormLineLayout + Button { + text: 'Log in' + Layout.rightMargin: 20 + onClicked: { + LoginPageCpp.login(username.inputText, password.inputText); + } + } + Text { + color: DefaultStyle.grayColor + text: "Forgotten password?" + font.underline: true + font.pointSize: DefaultStyle.defaultTextSize + } + + } + Button { + Layout.topMargin: 40 + inversedColors: true + text: "Use SIP Account" + onClicked: {root.useSIPButtonClicked()} + } + } + Item { + Layout.fillWidth: true + } + Image { + Layout.rightMargin: 40 + Layout.preferredWidth: 300 + fillMode: Image.PreserveAspectFit + source: AppIcons.loginImage + } +} diff --git a/Linphone/view/Item/RectangleTest.qml b/Linphone/view/Item/RectangleTest.qml new file mode 100644 index 000000000..946f7d81e --- /dev/null +++ b/Linphone/view/Item/RectangleTest.qml @@ -0,0 +1,8 @@ +import QtQuick 2.7 + +Rectangle { + anchors.fill: parent + color: "red" + opacity: 0.2 + border.color: "green" +} diff --git a/Linphone/view/Item/Text.qml b/Linphone/view/Item/Text.qml new file mode 100644 index 000000000..7289ebeea --- /dev/null +++ b/Linphone/view/Item/Text.qml @@ -0,0 +1,10 @@ +import QtQuick 2.7 +import QtQuick.Controls 2.2 as Control +import Linphone + +Text { + property double scaleLettersFactor: 1. + font.family: DefaultStyle.defaultFont + font.pointSize: DefaultStyle.defaultFontPointSize + transform: Scale { yScale: scaleLettersFactor} +} diff --git a/Linphone/view/Item/TextInput.qml b/Linphone/view/Item/TextInput.qml new file mode 100644 index 000000000..9a117a339 --- /dev/null +++ b/Linphone/view/Item/TextInput.qml @@ -0,0 +1,62 @@ +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts 1.0 +import Linphone + +ColumnLayout { + id: cellLayout + Layout.bottomMargin: 8 + + property string label: "" + property string defaultText : "" + property bool mandatory: false + property bool hidden: false + property int textInputWidth: 200 + readonly property string inputText: textField.text + + Text { + verticalAlignment: Text.AlignVCenter + text: cellLayout.label + (cellLayout.mandatory ? "*" : "") + color: DefaultStyle.formItemLabelColor + font { + pointSize: DefaultStyle.formItemLabelSize + bold: true + } + } + + Rectangle { + implicitWidth: cellLayout.textInputWidth + implicitHeight: 30 + // anchors.fill: parent + radius: 20 + color: DefaultStyle.formItemBackgroundColor + opacity: 0.7 + TextField { + id: textField + anchors.left: parent.left + anchors.right: eyeButton.visible ? eyeButton.left : parent.right + anchors.verticalCenter: parent.verticalCenter + placeholderText: cellLayout.defaultText + echoMode: (cellLayout.hidden && !eyeButton.checked) ? TextInput.Password : TextInput.Normal + font.family: DefaultStyle.defaultFont + font.pointSize: DefaultStyle.formTextInputSize + color: DefaultStyle.formItemLabelColor + background: Item { + opacity: 0. + } + } + Button { + id: eyeButton + visible: cellLayout.hidden + checkable: true + background: Rectangle { + color: "transparent" + } + anchors.right: parent.right + contentItem: Image { + fillMode: Image.PreserveAspectFit + source: eyeButton.checked ? AppIcons.eyeHide : AppIcons.eyeShow + } + } + } +} \ No newline at end of file diff --git a/Linphone/view/Page/Login/LoginPage.qml b/Linphone/view/Page/Login/LoginPage.qml new file mode 100644 index 000000000..98b97beea --- /dev/null +++ b/Linphone/view/Page/Login/LoginPage.qml @@ -0,0 +1,40 @@ +import QtQuick 2.15 +import QtQuick.Layouts 1.0 +import QtQuick.Controls as Control +import Linphone + +LoginLayout { + id: root + signal useSIPButtonClicked() + + titleContent: RowLayout { + Image { + fillMode: Image.PreserveAspectFit + source: AppIcons.profile + } + Text { + text: "Login" + color: DefaultStyle.titleColor + font.pointSize: DefaultStyle.title2FontPointSize + font.bold: true + scaleLettersFactor: 1.1 + } + Item { + Layout.fillWidth: true + } + Text { + Layout.rightMargin: 15 + text: "No account yet ?" + color: DefaultStyle.defaultTextColor + font.pointSize: DefaultStyle.defaultTextSize + } + Button { + Layout.alignment: Qt.AlignRight + inversedColors: true + text: "Register" + } + } + + centerContent: LoginForm {} +} + diff --git a/Linphone/view/Page/Login/SIPLoginPage.qml b/Linphone/view/Page/Login/SIPLoginPage.qml new file mode 100644 index 000000000..a04a19465 --- /dev/null +++ b/Linphone/view/Page/Login/SIPLoginPage.qml @@ -0,0 +1,172 @@ +import QtQuick 2.15 +import QtQuick.Layouts 1.3 +import QtQuick.Controls as Control +import Linphone +import ConstantsCpp 1.0 + +LoginLayout { + + id: sipLoginPage + signal returnToLogin() + + titleContent: RowLayout { + Control.Button { + background: Rectangle { + color: "transparent" + } + contentItem: Image { + source: AppIcons.returnArrow + fillMode: Image.PreserveAspectFit + } + onClicked: sipLoginPage.returnToLogin() + } + Image { + fillMode: Image.PreserveAspectFit + source: AppIcons.profile + } + Text { + text: "Use a SIP Account" + color: DefaultStyle.titleColor + font.pointSize: DefaultStyle.title2FontPointSize + font.bold: true + scaleLettersFactor: 1.1 + } + Item { + Layout.fillWidth: true + } + Text { + Layout.rightMargin: 15 + text: "No account yet ?" + color: DefaultStyle.defaultTextColor + font.pointSize: DefaultStyle.defaultTextSize + } + Button { + Layout.alignment: Qt.AlignRight + inversedColors: true + text: "Register" + } + } + + centerContent: RowLayout { + Layout.alignment: Qt.AlignBottom + ColumnLayout { + Layout.fillHeight: true + Layout.fillWidth: true + clip: true + + Control.StackView { + id: rootStackView + initialItem: firstItem + Layout.fillWidth: true + Layout.fillHeight: true + + Component { + id: firstItem + ColumnLayout { + // Layout.fillWidth: true + // Layout.fillHeight: true + + Text { + Layout.preferredWidth: 361 + Layout.fillWidth: true + wrapMode: Text.WordWrap + color: DefaultStyle.darkGrayColor + font.pointSize: DefaultStyle.defaultTextSize + text: "

Some features require a Linphone account, such as group messaging, video conferences...

+

These features are hidden when you register with a third party SIP account.

+

To enable it in a commercial projet, please contact us.

" + } + + Button { + text: 'linphone.org/contact' + textSize: 8 + inversedColors: true + onClicked: { + Qt.openUrlExternally(ConstantsCpp.ContactUrl) + } + } + Item { + Layout.fillHeight: true + } + + Button { + Layout.fillWidth: true + text: 'I prefere create an account' + inversedColors: true + onClicked: { + } + } + + Button { + Layout.fillWidth: true + Layout.bottomMargin: 40 + text: 'I understand' + onClicked: { + rootStackView.replace(secondItem) + } + } + } + + } + Component { + id: secondItem + ColumnLayout { + // Layout.fillWidth: true + // Layout.fillHeight: true + TextInput { + id: username + label: "Username" + mandatory: true + textInputWidth: 250 + } + TextInput { + id: password + label: "Password" + mandatory: true + hidden: true + textInputWidth: 250 + } + TextInput { + id: domain + label: "Domain" + mandatory: true + textInputWidth: 250 + } + TextInput { + id: displayName + label: "Display Name" + textInputWidth: 250 + } + ComboBox { + label: "Transport" + backgroundWidth: 250 + modelList: ["TCP", "UDP", "TLS"] + } + + Button { + Layout.bottomMargin: 20 + + text: 'Log in' + onClicked: { + LoginPageCpp.login(username.inputText, password.inputText); + } + } + Item { + Layout.fillHeight: true + } + } + } + } + } + Item { + Layout.fillWidth: true + } + Image { + Layout.rightMargin: 40 + Layout.preferredWidth: 300 + fillMode: Image.PreserveAspectFit + source: AppIcons.loginImage + } + } +} + diff --git a/Linphone/view/Page/Login/WelcomePage.qml b/Linphone/view/Page/Login/WelcomePage.qml new file mode 100644 index 000000000..179aa11e0 --- /dev/null +++ b/Linphone/view/Page/Login/WelcomePage.qml @@ -0,0 +1,150 @@ +import QtQuick 2.15 +import QtQuick.Layouts 1.3 +import QtQuick.Controls 2.2 as Control + +import Linphone + +LoginLayout { + id: welcomePage + signal startButtonPressed() + + titleContent: RowLayout { + Text { + id: welcome + text: "Welcome" + color: DefaultStyle.titleColor + font.pointSize: DefaultStyle.title1FontPointSize + font.bold: true + scaleLettersFactor: 1.1 + } + Text { + Layout.alignment: Qt.AlignBottom + Layout.leftMargin: 10 + Layout.bottomMargin: 5 + color: DefaultStyle.titleColor + text: "in Linphone" + font.pointSize: 18 + font.bold: true + scaleLettersFactor: 1.1 + } + Item { + Layout.fillWidth: true + } + Control.Button { + leftPadding: 13 + rightPadding: 13 + topPadding: 20 + bottomPadding: 20 + flat: true + checkable: false + background: Rectangle { + color: "transparent" + radius: 48 + } + contentItem: Text { + text: "Skip" + font.underline: true + color: DefaultStyle.defaultTextColor + } + onClicked: welcomePage.startButtonPressed(); + } + } + centerContent: ColumnLayout { + Layout.bottomMargin: 20 + RowLayout { + Layout.leftMargin: 100 + Image { + Layout.rightMargin: 40 + Layout.topMargin: 20 + Layout.preferredWidth: 100 + Layout.maximumWidth: 100 + fillMode: Image.PreserveAspectFit + source: carousel.currentIndex == 0 ? AppIcons.welcomeLinphoneLogo : carousel.currentIndex == 1 ? AppIcons.welcomeLock : AppIcons.welcomeOpenSource + } + Carousel { + id: carousel + itemsList: [carousel0, carousel1, carousel2] + Component { + id: carousel0 + Item { + ColumnLayout { + anchors.verticalCenter: parent.verticalCenter + Text { + text: "Linphone" + font.bold: true + font.pixelSize: 20 + color: DefaultStyle.defaultTextColor + scaleLettersFactor: 1.1 + } + Text { + Layout.maximumWidth: 361 + wrapMode: Text.WordWrap + font.pixelSize: 11 + color: DefaultStyle.defaultTextColor + text: "Une application de communication sécurisée,
open source et française. " + } + } + } + } + Component { + id: carousel1 + Item { + ColumnLayout { + anchors.verticalCenter: parent.verticalCenter + Text { + text: "Sécurisé" + font.bold: true + font.pixelSize: 20 + color: DefaultStyle.defaultTextColor + } + Text { + Layout.maximumWidth: 361 + wrapMode: Text.WordWrap + font.pixelSize: 11 + color: DefaultStyle.defaultTextColor + text: "Vos communications sont en sécurité grâce aux
Chiffrement de bout en bout." + } + } + } + } + Component { + id: carousel2 + Item { + ColumnLayout { + anchors.verticalCenter: parent.verticalCenter + Text { + text: "Open Source" + font.bold: true + font.pixelSize: 20 + color: DefaultStyle.defaultTextColor + } + Text { + Layout.maximumWidth: 361 + wrapMode: Text.WordWrap + font.pixelSize: 11 + color: DefaultStyle.defaultTextColor + text: "Une application open source et un service gratuit depuis 2001" + } + } + } + } + } + } + + Button { + Layout.topMargin: 20 + Layout.bottomMargin: 20 + Layout.leftMargin: 361 - width + Layout.alignment: Qt.AlignBottom + text: carousel.currentIndex < (carousel.itemsList.length - 1) ? "Next" : "Start" + onClicked: { + if (carousel.currentIndex < 2) carousel.goToSlide(carousel.currentIndex + 1); + else welcomePage.startButtonPressed(); + } + } + Item { + Layout.fillHeight: true + } + } +} + diff --git a/Linphone/view/Page/LoginPage.qml b/Linphone/view/Page/LoginPage.qml deleted file mode 100644 index ca09627a5..000000000 --- a/Linphone/view/Page/LoginPage.qml +++ /dev/null @@ -1,25 +0,0 @@ -import QtQuick 2.15 -import QtQuick.Layouts 1.0 -import Linphone - -Item{ - id: mainItem - ColumnLayout{ - anchors.fill: parent - Text{ - Layout.fillWidth: true - text: LoginPageCpp.isLogged ? "Online" : "Offline" - } - RowLayout{ - Button{ - text: 'Sign In' - onClicked: LoginPageCpp.login("myusername", "passy") - } - Button{ - text: 'Sign Out' - onClicked: console.log("Click!") - } - } - } -} - diff --git a/Linphone/view/Style/AppIcons.qml b/Linphone/view/Style/AppIcons.qml new file mode 100644 index 000000000..bbc0ef7dd --- /dev/null +++ b/Linphone/view/Style/AppIcons.qml @@ -0,0 +1,16 @@ +pragma Singleton +import QtQuick 2.15 + +QtObject { + property string welcomeLinphoneLogo: "image://internal/welcome-linphone-logo.svg" + property string welcomeLock: "image://internal/welcome-lock.svg" + property string welcomeOpenSource: "image://internal/welcome-opensource.svg" + property string eyeHide: "image://internal/hide.svg" + property string eyeShow: "image://internal/show.svg" + property string downArrow: "image://internal/down-arrow.svg" + property string returnArrow: "image://internal/return-arrow.svg" + property string info: "image://internal/info-logo.svg" + property string loginImage: "image://internal/login-image.svg" + property string belledonne: "image://internal/belledonne.svg" + property string profile: "image://internal/profil.svg" +} \ No newline at end of file diff --git a/Linphone/view/Style/DefaultStyle.qml b/Linphone/view/Style/DefaultStyle.qml new file mode 100644 index 000000000..adc5b05ba --- /dev/null +++ b/Linphone/view/Style/DefaultStyle.qml @@ -0,0 +1,28 @@ +pragma Singleton +import QtQuick 2.15 + +QtObject { + + property string defaultFont: "Noto Sans" + property color orangeColor: "#FE5E00" + property color buttonBackground: "#FE5E00" + property color buttonInversedBackground: "white" + property color buttonTextColor: "white" + property color buttonInversedTextColor: "#FE5E00" + property int buttonTextSize: 10 + property color darkBlueColor: "#22334D" + property color titleColor: "#22334D" + property color darkGrayColor: "#4E6074" + property color defaultTextColor: "#4E6074" + property int defaultTextSize: 8 + property color formItemLabelColor: "#4E6074" + property int formItemLabelSize: 8 + property int formTextInputSize: 10 + property color grayColor: "#6C7A87" + property color lightGrayColor: "#EDEDED" + property color carouselLightGrayColor: "#DFECF2" + property color formItemBackgroundColor: "#EDEDED" + property int defaultFontPointSize: 10 + property int title1FontPointSize: 40 + property int title2FontPointSize: 20 +} \ No newline at end of file diff --git a/cmake/TasksMacos.cmake b/cmake/TasksMacos.cmake index 00b7d75f5..b01242b6b 100644 --- a/cmake/TasksMacos.cmake +++ b/cmake/TasksMacos.cmake @@ -1,6 +1,6 @@ ############################################################################ # TasksMacos.cmake -# Copyright (C) 2010-2023 Belledonne Communications, Grenoble France +# Copyright (C) 2010-2024 Belledonne Communications, Grenoble France # ############################################################################ #