Welcome page images

add resources file

belledonne image

Revert "belledonne image"

This reverts commit 4f7ea04c16aaec1ed321590620c61fad6010a148.

image

add images resources

new images

Welcome page images

add resources file

belledonne image

Revert "belledonne image"

This reverts commit 4f7ea04c16aaec1ed321590620c61fad6010a148.

image

add images resources

new images

image

image cmake

providers

Constants

Constants

start welcome page

start welcome page

Welcome page

welcome and login pages

default text item

Item : default input cell for any form

qml items

welcome/login template

add resources files to macro cmake

LoginPage : get username/pwd and call login

make welcome page temporary

icons

main stack view

Add final text + anims welcome page

fix previous

register constants in initCppInterfaces

unify images names

MR thread : clean

move login pages

use styling qml file

mr threads: unify colors

remove anchors warnings

custom combobox + modify custom textinput

mr thread : indent

mr thread : pointsize in style

mr thread : default style singleton

icons as style

change login base layout name

mr thread : color in style
This commit is contained in:
Gaelle Braud 2023-10-06 14:52:32 +02:00
parent 2c69ae7fec
commit 592d64bc8c
9 changed files with 220 additions and 5 deletions

View file

@ -108,6 +108,12 @@ void App::initCppInterfaces() {
LinphoneEnums::registerMetaTypes();
}
void App::registerToolTypes() {
qmlRegisterSingletonType<Constants>(
"ConstantsCpp", 1, 0, "ConstantsCpp",
[](QQmlEngine *engine, QJSEngine *) -> QObject * { return new Constants(engine); });
}
//------------------------------------------------------------
void App::clean() {

View file

@ -15,4 +15,4 @@ list(APPEND _LINPHONEAPP_RC_FILES data/assistant/use-app-sip-account.rc
"data/image/return-arrow.svg"
)
set(_LINPHONEAPP_RC_FILES ${_LINPHONEAPP_RC_FILES} PARENT_SCOPE)
set(_LINPHONEAPP_RC_FILES ${_LINPHONEAPP_RC_FILES} PARENT_SCOPE)

View file

@ -82,4 +82,4 @@ QQuickTextureFactory *ImageAsyncImageResponse::textureFactory() const {
QQuickImageResponse *ImageProvider::requestImageResponse(const QString &id, const QSize &requestedSize) {
ImageAsyncImageResponse *response = new ImageAsyncImageResponse(id, requestedSize);
return response;
}
}

View file

@ -37,4 +37,4 @@ Window {
}
}
}

View file

@ -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
}
}
}
}

View file

@ -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
}
}
}
}

View file

@ -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.belldonne
fillMode: Image.Stretch
}
}
}
}

View file

@ -13,4 +13,4 @@ QtObject {
property string loginImage: "image://internal/login-image.svg"
property string belledonne: "image://internal/belledonne.svg"
property string profile: "image://internal/profil.svg"
}
}

View file

@ -25,4 +25,4 @@ QtObject {
property int defaultFontPointSize: 10
property int title1FontPointSize: 40
property int title2FontPointSize: 20
}
}