Commit c4a65c84 authored by Ronan Abhamon's avatar Ronan Abhamon

feat(ui/views/App/AssistantWindow): assistant in progress

parent 2394b10e
......@@ -28,6 +28,40 @@
<translation>Start in the system tray, do not show the main interface.</translation>
</message>
</context>
<context>
<name>AssistantHome</name>
<message>
<source>createSipAccount</source>
<translation>CREATE A LINPHONE ACCOUNT</translation>
</message>
<message>
<source>useLinphoneSipAccount</source>
<translation>USE A LINPHONE ACCOUNT</translation>
</message>
<message>
<source>useOtherSipAccount</source>
<translation>USE A SIP ACCOUNT</translation>
</message>
<message>
<source>fetchRemoteConfiguration</source>
<translation>FETCH REMOTE CONFIGURATION</translation>
</message>
<message>
<source>homeTitle</source>
<translation>WELCOME</translation>
</message>
<message>
<source>homeDescription</source>
<translation>This assistant will help you to configure and use your linphone account.</translation>
</message>
</context>
<context>
<name>AssistantWindow</name>
<message>
<source>assistantTitle</source>
<translation>Linphone - Assistant</translation>
</message>
</context>
<context>
<name>CallControls</name>
<message>
......@@ -442,32 +476,55 @@ Server url not configured.</translation>
<name>InviteFriends</name>
<message>
<source>enterEmailLabel</source>
<translation>Enter your friend&apos;s email address</translation>
<translation type="vanished">Enter your friend&apos;s email address</translation>
</message>
<message>
<source>messageLabel</source>
<translation>You can modify the invitation that will be sent</translation>
<translation type="vanished">You can modify the invitation that will be sent</translation>
</message>
<message>
<source>cancel</source>
<translation>CANCEL</translation>
<translation type="vanished">CANCEL</translation>
</message>
<message>
<source>confirm</source>
<translation>CONFIRM</translation>
<translation type="vanished">CONFIRM</translation>
</message>
<message>
<source>inviteFriendsTitle</source>
<translation>Linphone - Invite Friends</translation>
<translation type="vanished">Linphone - Invite Friends</translation>
</message>
</context>
<context>
<name>InviteFriendsWindow</name>
<message>
<source>defaultMessage</source>
<translation type="unfinished"></translation>
<source>cancel</source>
<translation type="unfinished">CANCEL</translation>
</message>
<message>
<source>confirm</source>
<translation type="unfinished">CONFIRM</translation>
</message>
<message>
<source>defaultSubject</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>inviteFriendsTitle</source>
<translation type="unfinished">Linphone - Invite Friends</translation>
</message>
<message>
<source>enterEmailLabel</source>
<translation type="unfinished">Enter your friend&apos;s email address</translation>
</message>
<message>
<source>messageLabel</source>
<translation type="unfinished">You can modify the invitation that will be sent</translation>
</message>
<message>
<source>defaultMessage</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MainWindow</name>
......@@ -547,7 +604,7 @@ Server url not configured.</translation>
</message>
<message>
<source>manageAccountsTitle</source>
<translation>Presence and accounts</translation>
<translation type="vanished">Presence and accounts</translation>
</message>
<message>
<source>validate</source>
......@@ -595,11 +652,26 @@ Server url not configured.</translation>
</message>
<message>
<source>ok</source>
<translation>OK</translation>
<translation type="vanished">OK</translation>
</message>
<message>
<source>selectAccountLabel</source>
<translation type="vanished">Select you active account</translation>
</message>
</context>
<context>
<name>ManageAccountsWindow</name>
<message>
<source>ok</source>
<translation type="unfinished">OK</translation>
</message>
<message>
<source>manageAccountsTitle</source>
<translation type="unfinished">Presence and accounts</translation>
</message>
<message>
<source>selectAccountLabel</source>
<translation>Select you active account</translation>
<translation type="unfinished">Select you active account</translation>
</message>
</context>
<context>
......
......@@ -28,6 +28,40 @@
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AssistantHome</name>
<message>
<source>createSipAccount</source>
<translation>CRÉER UN COMPTE LINPHONE</translation>
</message>
<message>
<source>useLinphoneSipAccount</source>
<translation>UTILISER UN COMPTE LINPHONE</translation>
</message>
<message>
<source>useOtherSipAccount</source>
<translation>UTILISER UN COMPTE SIP</translation>
</message>
<message>
<source>fetchRemoteConfiguration</source>
<translation>TÉLÉCHARGER UNE CONFIGURATION</translation>
</message>
<message>
<source>homeTitle</source>
<translation>BIENVENUE</translation>
</message>
<message>
<source>homeDescription</source>
<translation>Cet assistant va vous aider à configurer et utiliser votre compte SIP.</translation>
</message>
</context>
<context>
<name>AssistantWindow</name>
<message>
<source>assistantTitle</source>
<translation>Linphone - Assistant</translation>
</message>
</context>
<context>
<name>CallControls</name>
<message>
......@@ -441,32 +475,55 @@ Url du serveur non configurée.</translation>
<name>InviteFriends</name>
<message>
<source>enterEmailLabel</source>
<translation>Entrer l&apos;adresse email de votre ami</translation>
<translation type="vanished">Entrer l&apos;adresse email de votre ami</translation>
</message>
<message>
<source>messageLabel</source>
<translation>Modifier l&apos;invitation qui sera envoyée</translation>
<translation type="vanished">Modifier l&apos;invitation qui sera envoyée</translation>
</message>
<message>
<source>cancel</source>
<translation>ANNULER</translation>
<translation type="vanished">ANNULER</translation>
</message>
<message>
<source>confirm</source>
<translation>CONFIRMER</translation>
<translation type="vanished">CONFIRMER</translation>
</message>
<message>
<source>inviteFriendsTitle</source>
<translation>Linphone - Inviter des amis</translation>
<translation type="vanished">Linphone - Inviter des amis</translation>
</message>
</context>
<context>
<name>InviteFriendsWindow</name>
<message>
<source>defaultMessage</source>
<translation type="unfinished"></translation>
<source>cancel</source>
<translation type="unfinished">ANNULER</translation>
</message>
<message>
<source>confirm</source>
<translation type="unfinished">CONFIRMER</translation>
</message>
<message>
<source>defaultSubject</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>inviteFriendsTitle</source>
<translation type="unfinished">Linphone - Inviter des amis</translation>
</message>
<message>
<source>enterEmailLabel</source>
<translation type="unfinished">Entrer l&apos;adresse email de votre ami</translation>
</message>
<message>
<source>messageLabel</source>
<translation type="unfinished">Modifier l&apos;invitation qui sera envoyée</translation>
</message>
<message>
<source>defaultMessage</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MainWindow</name>
......@@ -546,7 +603,7 @@ Url du serveur non configurée.</translation>
</message>
<message>
<source>manageAccountsTitle</source>
<translation>Présence et comptes</translation>
<translation type="vanished">Présence et comptes</translation>
</message>
<message>
<source>validate</source>
......@@ -594,11 +651,26 @@ Url du serveur non configurée.</translation>
</message>
<message>
<source>ok</source>
<translation>OK</translation>
<translation type="vanished">OK</translation>
</message>
<message>
<source>selectAccountLabel</source>
<translation type="vanished">Sélectionner votre compte principal</translation>
</message>
</context>
<context>
<name>ManageAccountsWindow</name>
<message>
<source>ok</source>
<translation type="unfinished">OK</translation>
</message>
<message>
<source>manageAccountsTitle</source>
<translation type="unfinished">Présence et comptes</translation>
</message>
<message>
<source>selectAccountLabel</source>
<translation>Sélectionner votre compte principal</translation>
<translation type="unfinished">Sélectionner votre compte principal</translation>
</message>
</context>
<context>
......
......@@ -309,20 +309,22 @@
<file>ui/scripts/Utils/qmldir</file>
<file>ui/scripts/Utils/uri-tools.js</file>
<file>ui/scripts/Utils/utils.js</file>
<file>ui/views/App/Assistant/AssistantHome.qml</file>
<file>ui/views/App/AssistantWindow.qml</file>
<file>ui/views/App/Calls/AbstractStartingCall.qml</file>
<file>ui/views/App/Calls/CallsWindow.qml</file>
<file>ui/views/App/Calls/Incall.qml</file>
<file>ui/views/App/Calls/IncomingCall.qml</file>
<file>ui/views/App/Calls/OutgoingCall.qml</file>
<file>ui/views/App/IncallFullscreen.qml</file>
<file>ui/views/App/InviteFriends.qml</file>
<file>ui/views/App/IncallFullscreenWindow.qml</file>
<file>ui/views/App/InviteFriendsWindow.qml</file>
<file>ui/views/App/Main/ContactEdit.qml</file>
<file>ui/views/App/Main/Contacts.qml</file>
<file>ui/views/App/Main/Conversation.qml</file>
<file>ui/views/App/Main/Home.qml</file>
<file>ui/views/App/Main/MainWindowMenuBar.qml</file>
<file>ui/views/App/Main/MainWindow.qml</file>
<file>ui/views/App/ManageAccounts.qml</file>
<file>ui/views/App/ManageAccountsWindow.qml</file>
<file>ui/views/App/qmldir</file>
<file>ui/views/App/Settings/SettingsAudio.qml</file>
<file>ui/views/App/Settings/SettingsCallsChat.qml</file>
......@@ -331,16 +333,18 @@
<file>ui/views/App/Settings/SettingsUi.qml</file>
<file>ui/views/App/Settings/SettingsVideo.qml</file>
<file>ui/views/App/Settings/SettingsWindow.qml</file>
<file>ui/views/App/Styles/Assistant/AssistantHomeStyle.qml</file>
<file>ui/views/App/Styles/AssistantWindowStyle.qml</file>
<file>ui/views/App/Styles/Calls/CallStyle.qml</file>
<file>ui/views/App/Styles/Calls/CallsWindowStyle.qml</file>
<file>ui/views/App/Styles/InviteFriendsStyle.qml</file>
<file>ui/views/App/Styles/InviteFriendsWindowStyle.qml</file>
<file>ui/views/App/Styles/Main/ContactEditStyle.qml</file>
<file>ui/views/App/Styles/Main/ContactsStyle.qml</file>
<file>ui/views/App/Styles/Main/ConversationStyle.qml</file>
<file>ui/views/App/Styles/Main/HomeStyle.qml</file>
<file>ui/views/App/Styles/Main/MainWindowMenuBarStyle.qml</file>
<file>ui/views/App/Styles/Main/MainWindowStyle.qml</file>
<file>ui/views/App/Styles/ManageAccountsStyle.qml</file>
<file>ui/views/App/Styles/ManageAccountsWindowStyle.qml</file>
<file>ui/views/App/Styles/qmldir</file>
<file>ui/views/App/Styles/Settings/SettingsWindowStyle.qml</file>
</qresource>
......
......@@ -48,8 +48,8 @@ Item {
// ---------------------------------------------------------------------------
implicitHeight: button.height
implicitWidth: button.width
height: AbstractTextButtonStyle.background.height
width: AbstractTextButtonStyle.background.width
// ---------------------------------------------------------------------------
......@@ -58,10 +58,9 @@ Item {
background: Rectangle {
color: _getBackgroundColor()
implicitHeight: AbstractTextButtonStyle.background.height
implicitWidth: AbstractTextButtonStyle.background.width
radius: AbstractTextButtonStyle.background.radius
}
contentItem: Text {
color: _getTextColor()
font {
......@@ -74,8 +73,12 @@ Item {
text: button.text
verticalAlignment: Text.AlignVCenter
}
hoverEnabled: true
height: parent.height
width: parent.width
onClicked: wrappedButton.enabled && parent.clicked()
}
}
import QtQuick 2.7
import QtQuick.Layouts 1.3
import Common 1.0
import App.Styles 1.0
// =============================================================================
ColumnLayout {
spacing: 0
// ---------------------------------------------------------------------------
// Info.
// ---------------------------------------------------------------------------
Icon {
Layout.alignment: Qt.AlignHCenter
icon: 'home_account_assistant'
iconSize: AssistantHomeStyle.info.iconSize
}
Text {
Layout.fillWidth: true
Layout.preferredHeight: AssistantHomeStyle.info.title.height
color: AssistantHomeStyle.info.title.color
elide: Text.ElideRight
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
font {
bold: true
pointSize: AssistantHomeStyle.info.title.fontSize
}
text: qsTr('homeTitle')
}
Text {
Layout.fillWidth: true
Layout.preferredHeight: AssistantHomeStyle.info.description.height
color: AssistantHomeStyle.info.description.color
elide: Text.ElideRight
font.pointSize: AssistantHomeStyle.info.description.fontSize
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
text: qsTr('homeDescription')
}
// ---------------------------------------------------------------------------
// Buttons.
// ---------------------------------------------------------------------------
GridView {
id: buttons
Layout.fillWidth: true
Layout.preferredHeight: AssistantHomeStyle.buttons.height
cellHeight: height / 2
cellWidth: width / 2
delegate: Item {
height: buttons.cellHeight
width: buttons.cellWidth
TextButtonA {
anchors {
fill: parent
margins: AssistantHomeStyle.buttons.spacing
}
text: $text
onClicked: window.pushView($view)
}
}
model: ListModel {
ListElement {
$text: qsTr('createSipAccount')
$view: 'AssistantCreateSipAccount'
}
ListElement {
$text: qsTr('useLinphoneSipAccount')
$view: 'AssistantUseLinphoneSipAccount'
}
ListElement {
$text: qsTr('useOtherSipAccount')
$view: 'AssistantUseOtherSipAccount'
}
ListElement {
$text: qsTr('fetchRemoteConfiguration')
$view: 'AssistantFetchRemoteConfiguration'
}
}
interactive: false
}
}
import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Window 2.2
import App.Styles 1.0
// =============================================================================
Window {
id: window
// ---------------------------------------------------------------------------
readonly property string viewsPath: 'qrc:/ui/views/App/Assistant/'
// ---------------------------------------------------------------------------
function pushView (view) {
stack.push(viewsPath + view + '.qml')
}
function popView () {
stack.pop()
}
// ---------------------------------------------------------------------------
modality: Qt.WindowModal
title: qsTr('assistantTitle')
visible: true
height: AssistantWindowStyle.height
width: AssistantWindowStyle.width
maximumHeight: AssistantWindowStyle.height
maximumWidth: AssistantWindowStyle.width
minimumHeight: AssistantWindowStyle.height
minimumWidth: AssistantWindowStyle.width
// ---------------------------------------------------------------------------
Shortcut {
sequence: StandardKey.Close
onActivated: close()
}
// ---------------------------------------------------------------------------
Rectangle {
anchors.fill: parent
color: AssistantWindowStyle.color
}
// ---------------------------------------------------------------------------
StackView {
id: stack
anchors {
fill: parent
bottomMargin: AssistantWindowStyle.bottomMargin
leftMargin: AssistantWindowStyle.leftMargin
rightMargin: AssistantWindowStyle.rightMargin
topMargin: AssistantWindowStyle.topMargin
}
initialItem: window.viewsPath + 'AssistantHome.qml'
}
}
......@@ -28,7 +28,7 @@ Rectangle {
return
}
_fullscreen = Utils.openWindow('IncallFullscreen', incall, {
_fullscreen = Utils.openWindow('IncallFullscreenWindow', incall, {
properties: {
call: incall.call
}
......
......@@ -31,13 +31,7 @@ Window {
// ---------------------------------------------------------------------------
height: Screen.height
width: Screen.width
visible: true
visibility: Window.FullScreen
onActiveChanged: incall.showFullScreen()
onVisibilityChanged: visibility === Window.Windowed && showFullScreen()
// ---------------------------------------------------------------------------
......@@ -109,8 +103,8 @@ Window {
Layout.alignment: Qt.AlignTop
Layout.fillWidth: true
Layout.leftMargin: CallStyle.header.leftMargin
Layout.rightMargin: CallStyle.header.rightMargin
Layout.preferredHeight: CallStyle.header.contactDescription.height
Layout.rightMargin: CallStyle.header.rightMargin
Icon {
id: callQuality
......
......@@ -32,22 +32,22 @@ DialogPlus {
centeredButtons: true
title: qsTr('inviteFriendsTitle')
height: InviteFriendsStyle.height
width: InviteFriendsStyle.width
height: InviteFriendsWindowStyle.height
width: InviteFriendsWindowStyle.width
maximumHeight: InviteFriendsStyle.height
maximumWidth: InviteFriendsStyle.width
maximumHeight: InviteFriendsWindowStyle.height
maximumWidth: InviteFriendsWindowStyle.width
minimumHeight: InviteFriendsStyle.height
minimumWidth: InviteFriendsStyle.width
minimumHeight: InviteFriendsWindowStyle.height
minimumWidth: InviteFriendsWindowStyle.width
// ---------------------------------------------------------------------------
Form {
anchors {
fill: parent
leftMargin: InviteFriendsStyle.leftMargin
rightMargin: InviteFriendsStyle.rightMargin
leftMargin: InviteFriendsWindowStyle.leftMargin
rightMargin: InviteFriendsWindowStyle.rightMargin
}
orientation: Qt.Vertical
......@@ -72,7 +72,7 @@ DialogPlus {
TextAreaField {
id: message
height: InviteFriendsStyle.message.height
height: InviteFriendsWindowStyle.message.height
text: qsTr('defaultMessage')
}
}
......
......@@ -36,7 +36,7 @@ Rectangle {
$component: 'button'
$componentText: qsTr('inviteButton')
$description: qsTr('inviteDescription')
$window: 'InviteFriends'
$window: 'InviteFriendsWindow'
$icon: 'home_invite_friends'
$title: qsTr('inviteTitle')
}
......@@ -47,7 +47,7 @@ Rectangle {
$description: qsTr('accountAssistantDescription')
$icon: 'home_account_assistant'
$title: qsTr('accountAssistantTitle')
$window: 'Assistant'
$window: 'AssistantWindow'
}
}
......
......@@ -165,7 +165,7 @@ Controls1.ApplicationWindow {
text: AccountSettingsModel.sipAddress
}
onClicked: Utils.openWindow('ManageAccounts', window)
onClicked: Utils.openWindow('ManageAccountsWindow', window)
}
Column {
......
......@@ -20,13 +20,13 @@ DialogPlus {
centeredButtons: true
title: qsTr('manageAccountsTitle')
height: ManageAccountsStyle.height
width: ManageAccountsStyle.width
height: ManageAccountsWindowStyle.height
width: ManageAccountsWindowStyle.width
minimumHeight: ManageAccountsStyle.height
minimumWidth: ManageAccountsStyle.width
maximumHeight: ManageAccountsStyle.height
maximumWidth: ManageAccountsStyle.width
minimumHeight: ManageAccountsWindowStyle.height
minimumWidth: ManageAccountsWindowStyle.width
maximumHeight: ManageAccountsWindowStyle.height
maximumWidth: ManageAccountsWindowStyle.width
// ---------------------------------------------------------------------------
......@@ -35,9 +35,9 @@ DialogPlus {
anchors {
left: parent.left
leftMargin: ManageAccountsStyle.leftMargin
leftMargin: ManageAccountsWindowStyle.leftMargin
right: parent.right
rightMargin: ManageAccountsStyle.rightMargin
rightMargin: ManageAccountsWindowStyle.rightMargin
}
FormLine {
......
pragma Singleton
import QtQuick 2.7
import Common 1.0
// =============================================================================
QtObject {
property QtObject info: QtObject {
property int iconSize: 150
property QtObject description: QtObject {
property color color: Colors.g
property int height: 40
property int fontSize: 10
}
property QtObject title: QtObject {
property color color: Colors.g
property int height: 40
property int fontSize: 11
}
}
property QtObject buttons: QtObject {
property int height: 90
property int spacing: 5
}
}
pragma Singleton
import QtQuick 2.7
import Common 1.0
// =============================================================================
QtObject {
property color color: Colors.k
property int bottomMargin: 35
property int leftMargin: 90
property int rightMargin: 90
property int topMargin: 35
property int height: 480
property int width: 700
}
......@@ -4,17 +4,20 @@ module App.Styles
# Views styles -----------------------------------------------------------------
singleton InviteFriendsStyle 1.0 InviteFriendsStyle.qml
singleton ManageAccountsStyle 1.0 ManageAccountsStyle.qml
singleton AssistantWindowStyle 1.0 AssistantWindowStyle.qml
singleton InviteFriendsWindowStyle 1.0 InviteFriendsWindowStyle.qml
singleton ManageAccountsWindowStyle 1.0 ManageAccountsWindowStyle.qml
singleton CallStyle 1.0 Calls/CallStyle.qml
singleton CallsWindowStyle 1.0 Calls/CallsWindowStyle.qml
singleton AssistantHomeStyle 1.0 Assistant/AssistantHomeStyle.qml
singleton ContactEditStyle 1.0 Main/ContactEditStyle.qml
singleton ContactsStyle 1.0 Main/ContactsStyle.qml
singleton ConversationStyle 1.0 Main/ConversationStyle.qml
singleton HomeStyle 1.0 Main/HomeStyle.qml
singleton MainWindowMenuBarStyle 1.0 Main/MainWindowMenuBarStyle.qml
singleton MainWindowStyle 1.0 Main/MainWindowStyle.qml
singleton CallStyle 1.0 Calls/CallStyle.qml
singleton CallsWindowStyle 1.0 Calls/CallsWindowStyle.qml
singleton SettingsWindowStyle 1.0 Settings/SettingsWindowStyle.qml
singleton ContactEditStyle 1.0 Main/ContactEditStyle.qml
singleton ContactsStyle 1.0 Main/ContactsStyle.qml
singleton ConversationStyle 1.0 Main/ConversationStyle.qml
singleton HomeStyle 1.0 Main/HomeStyle.qml
singleton MainWindowMenuBarStyle 1.0 Main/MainWindowMenuBarStyle.qml
singleton MainWindowStyle 1.0 Main/MainWindowStyle.qml
singleton SettingsWindowStyle 1.0 Settings/SettingsWindowStyle.qml
......@@ -6,6 +6,7 @@ module App
# Views ------------------------------------------------------------------------
IncallFullscreen 1.0 IncallFullscreen.qml
InviteFriends 1.0 InviteFriends.qml
ManageAccounts 1.0 ManageAccounts.qml
Assistant 1.0 AssistantWindow.qml
IncallFullscreenWindow 1.0 IncallFullscreenWindow.qml
InviteFriendsWindow 1.0 InviteFriendsWindow.qml
ManageAccountsWindow 1.0 ManageAccountsWindow.qml
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment