Commit 2850facd authored by Ronan Abhamon's avatar Ronan Abhamon

feat(app): use Linphone module (1.0)!!!

parent d373f9cd
......@@ -2,49 +2,7 @@
<qresource prefix="/">
<file>languages/fr.qm</file>
<file>languages/en.qm</file>
<file>ui/components/scrollBar/ForceScrollBar.qml</file>
<file>ui/components/searchBox/SearchBox.qml</file>
<file>ui/components/misc/MenuEntry.qml</file>
<file>ui/components/timeline/Timeline.qml</file>
<file>ui/components/image/Icon.qml</file>
<file>ui/components/select/SelectContact.qml</file>
<file>ui/components/collapse/Collapse.qml</file>
<file>ui/components/chat/IncomingMessage.qml</file>
<file>ui/components/chat/Chat.qml</file>
<file>ui/components/chat/OutgoingMessage.qml</file>
<file>ui/components/chat/Event.qml</file>
<file>ui/components/chat/Message.qml</file>
<file>ui/components/contact/Contact.qml</file>
<file>ui/components/contact/ContactDescription.qml</file>
<file>ui/components/contact/Avatar.qml</file>
<file>ui/components/popup/DropDownMenu.qml</file>
<file>ui/components/popup/PopupShadow.qml</file>
<file>ui/components/view/ScrollableListView.qml</file>
<file>ui/components/dialog/ConfirmDialog.qml</file>
<file>ui/components/dialog/DialogDescription.qml</file>
<file>ui/components/dialog/DialogPlus.qml</file>
<file>ui/components/form/CheckBoxText.qml</file>
<file>ui/components/form/DropZone.qml</file>
<file>ui/components/form/LightButton.qml</file>
<file>ui/components/form/ListForm.qml</file>
<file>ui/components/form/ExclusiveButtons.qml</file>
<file>ui/components/form/ActionBar.qml</file>
<file>ui/components/form/ActionButton.qml</file>
<file>ui/components/form/TransparentComboBox.qml</file>
<file>ui/components/form/SmallButton.qml</file>
<file>ui/components/form/DarkButton.qml</file>
<file>ui/components/invertedMouseArea/InvertedMouseArea.qml</file>
<file>ui/scripts/utils.js</file>
<file>ui/style/ComponentsStyle/qmldir</file>
<file>ui/style/ComponentsStyle/DialogStyle.qml</file>
<file>ui/style/ComponentsStyle/ScrollBarStyle.qml</file>
<file>ui/style/ComponentsStyle/TimelineStyle.qml</file>
<file>ui/style/ComponentsStyle/SearchBoxStyle.qml</file>
<file>ui/style/ComponentsStyle/CollapseStyle.qml</file>
<file>ui/style/ComponentsStyle/PopupStyle.qml</file>
<file>ui/style/AppStyle/qmldir</file>
<file>ui/style/AppStyle/Colors.qml</file>
<file>ui/style/AppStyle/Constants.qml</file>
<file>ui/views/newCall.qml</file>
<file>ui/views/manageAccounts.qml</file>
<file>ui/views/mainWindow/mainWindow.qml</file>
......@@ -52,6 +10,47 @@
<file>ui/views/mainWindow/home.qml</file>
<file>ui/views/mainWindow/contact.qml</file>
<file>ui/views/mainWindow/conversation.qml</file>
<file>ui/Linphone/Popup/DropDownMenu.qml</file>
<file>ui/Linphone/Popup/PopupShadow.qml</file>
<file>ui/Linphone/qmldir</file>
<file>ui/Linphone/ScrollBar/ForceScrollBar.qml</file>
<file>ui/Linphone/Chat/IncomingMessage.qml</file>
<file>ui/Linphone/Chat/Chat.qml</file>
<file>ui/Linphone/Chat/OutgoingMessage.qml</file>
<file>ui/Linphone/Chat/Event.qml</file>
<file>ui/Linphone/Chat/Message.qml</file>
<file>ui/Linphone/SearchBox/SearchBox.qml</file>
<file>ui/Linphone/Form/CheckBoxText.qml</file>
<file>ui/Linphone/Form/DropZone.qml</file>
<file>ui/Linphone/Form/LightButton.qml</file>
<file>ui/Linphone/Form/ListForm.qml</file>
<file>ui/Linphone/Form/ExclusiveButtons.qml</file>
<file>ui/Linphone/Form/ActionBar.qml</file>
<file>ui/Linphone/Form/ActionButton.qml</file>
<file>ui/Linphone/Form/TransparentComboBox.qml</file>
<file>ui/Linphone/Form/SmallButton.qml</file>
<file>ui/Linphone/Form/DarkButton.qml</file>
<file>ui/Linphone/View/ScrollableListView.qml</file>
<file>ui/Linphone/Collapse/Collapse.qml</file>
<file>ui/Linphone/Styles/qmldir</file>
<file>ui/Linphone/Styles/DialogStyle.qml</file>
<file>ui/Linphone/Styles/ScrollBarStyle.qml</file>
<file>ui/Linphone/Styles/TimelineStyle.qml</file>
<file>ui/Linphone/Styles/SearchBoxStyle.qml</file>
<file>ui/Linphone/Styles/CollapseStyle.qml</file>
<file>ui/Linphone/Styles/PopupStyle.qml</file>
<file>ui/Linphone/Timeline/Timeline.qml</file>
<file>ui/Linphone/Misc/MenuEntry.qml</file>
<file>ui/Linphone/InvertedMouseArea/InvertedMouseArea.qml</file>
<file>ui/Linphone/Select/SelectContact.qml</file>
<file>ui/Linphone/Contact/Contact.qml</file>
<file>ui/Linphone/Contact/ContactDescription.qml</file>
<file>ui/Linphone/Contact/Avatar.qml</file>
<file>ui/Linphone/Constants.qml</file>
<file>ui/Linphone/Dialog/ConfirmDialog.qml</file>
<file>ui/Linphone/Dialog/DialogDescription.qml</file>
<file>ui/Linphone/Dialog/DialogPlus.qml</file>
<file>ui/Linphone/Image/Icon.qml</file>
<file>imgs/lost_outgoing_call.svg</file>
<file>imgs/led_disconnected.svg</file>
<file>imgs/valid.svg</file>
......
......@@ -56,7 +56,7 @@ int main (int argc, char *argv[]) {
selector->setExtraSelectors(QStringList("custom"));
// Set modules paths.
engine.addImportPath(":/ui/style");
engine.addImportPath(":/ui/");
engine.load(QUrl("qrc:/ui/views/mainWindow/mainWindow.qml"));
if (engine.rootObjects().isEmpty())
......
......@@ -2,9 +2,7 @@ import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.3
import 'qrc:/ui/components/form'
import 'qrc:/ui/components/image'
import 'qrc:/ui/components/view'
import Linphone 1.0
ScrollableListView {
model: ListModel {
......
import QtQuick 2.7
import QtQuick.Layouts 1.3
import 'qrc:/ui/components/contact'
import Linphone 1.0
// ===================================================================
......
import QtQuick 2.7
import QtQuick.Layouts 1.3
import 'qrc:/ui/components/image'
import Linphone 1.0
Message {
backgroundColor: '#E4E4E4'
......
import QtQuick 2.7
import ComponentsStyle 1.0
import 'qrc:/ui/components/form'
import Linphone 1.0
import Linphone.Styles 1.0
// ===================================================================
// A simple component to build collapsed item.
......
pragma Singleton
import QtQuick 2.7
QtObject {
property int zPopup: 999
property int zMax: 999999
// TODO: Mutualize similar colors.
property QtObject colors: QtObject {
property string a: '#808080'
property string b: '#5E5E5F'
property string c: '#C5C5C5'
property string d: '#5A585B'
property string e: '#DEDEDE'
}
}
import QtQuick 2.7
import QtQuick.Layouts 1.3
import 'qrc:/ui/components/form'
import Linphone 1.0
// ===================================================================
......
import QtQuick 2.7
import ComponentsStyle 1.0
import 'qrc:/ui/components/form'
import Linphone 1.0
import Linphone.Styles 1.0
// ===================================================================
// A dialog with OK/Cancel buttons.
......
import QtQuick 2.7
import ComponentsStyle 1.0
import Linphone.Styles 1.0
// ===================================================================
// Description content used by dialogs.
......
......@@ -2,7 +2,7 @@ import QtQuick 2.7
import QtQuick.Layouts 1.3
import QtQuick.Window 2.2
import ComponentsStyle 1.0
import Linphone.Styles 1.0
// ===================================================================
// Helper to build quickly dialogs.
......
import QtQuick 2.7
import QtQuick.Controls 2.0
import 'qrc:/ui/components/image'
import Linphone 1.0
// ===================================================================
// An animated small button with an image.
......
import QtQuick 2.7
import AppStyle 1.0
import Linphone.Styles 1.0
// ===================================================================
// Helper to handle button click outside a component.
......
......@@ -2,10 +2,8 @@ import QtGraphicalEffects 1.0
import QtQuick 2.7
import QtQuick.Controls 2.0
import 'qrc:/ui/components/contact'
import 'qrc:/ui/components/form'
import 'qrc:/ui/components/view'
import 'qrc:/ui/style'
import Linphone 1.0
import Linphone.Styles 1.0
Rectangle {
readonly property int entryHeight: 50
......
import QtGraphicalEffects 1.0
import ComponentsStyle 1.0
import Linphone.Styles 1.0
// ===================================================================
......
import QtQuick 2.7
import QtQuick.Controls 2.0
import ComponentsStyle 1.0
import Linphone.Styles 1.0
// ===================================================================
......
import QtQuick 2.7
import QtQuick.Controls 2.0
import AppStyle 1.0
import ComponentsStyle 1.0
import 'qrc:/ui/components/invertedMouseArea'
import 'qrc:/ui/components/popup'
import Linphone 1.0
import Linphone.Styles 1.0
// ===================================================================
......
......@@ -2,9 +2,7 @@ import QtGraphicalEffects 1.0
import QtQuick 2.7
import QtQuick.Controls 2.0
import 'qrc:/ui/components/contact'
import 'qrc:/ui/components/form'
import 'qrc:/ui/components/view'
import Linphone 1.0
// TODO: Contacts list.
Item {
......
pragma Singleton
import QtQuick 2.7
import AppStyle 1.0
import Linphone 1.0
QtObject {
property QtObject shadow: QtObject {
......@@ -9,6 +9,6 @@ QtObject {
property int horizontalOffset: 0
property int samples: 15
property int verticalOffset: 2
property string color: Colors.a
property string color: Constants.colors.a
}
}
pragma Singleton
import QtQuick 2.7
import AppStyle 1.0
import Linphone 1.0
QtObject {
property string color: Colors.c
property string pressedColor: Colors.b
property string color: Constants.colors.c
property string pressedColor: Constants.colors.b
property Rectangle background: Rectangle {
color: Colors.d
color: Constants.colors.d
}
property Rectangle contentItem: Rectangle {
......
pragma Singleton
import QtQuick 2.7
import AppStyle 1.0
import Linphone 1.0
QtObject {
property string shadowColor: Colors.a
property string shadowColor: Constants.colors.a
property Rectangle searchFieldBackground: Rectangle {
implicitHeight: 30
......
pragma Singleton
import QtQuick 2.7
import AppStyle 1.0
import Linphone 1.0
QtObject {
property QtObject legend: QtObject {
......@@ -11,12 +11,12 @@ QtObject {
property int leftMargin: 18
property int spacing: 16
property int topMargin: 10
property string color: Colors.d
property string color: Constants.colors.d
property string icon: 'history'
}
property QtObject separator: QtObject {
property int height: 1
property string color: Colors.e
property string color: Constants.colors.e
}
}
# See: https://wiki.qt.io/Qml_Styling
module ComponentsStyle
module Linphone.Style
# Components styles.
singleton CollapseStyle 1.0 CollapseStyle.qml
singleton DialogStyle 1.0 DialogStyle.qml
singleton PopupStyle 1.0 PopupStyle.qml
singleton SearchBoxStyle 1.0 SearchBoxStyle.qml
singleton ScrollBarStyle 1.0 ScrollBarStyle.qml
singleton SearchBoxStyle 1.0 SearchBoxStyle.qml
singleton TimelineStyle 1.0 TimelineStyle.qml
import QtQuick 2.7
import QtQuick.Layouts 1.3
import ComponentsStyle 1.0
import 'qrc:/ui/components/contact'
import 'qrc:/ui/components/image'
import 'qrc:/ui/components/view'
import Linphone 1.0
import Linphone.Styles 1.0
// ===================================================================
......
import QtQuick 2.7
import QtQuick.Controls 2.0
import 'qrc:/ui/components/scrollBar'
import Linphone 1.0
// ===================================================================
......
module Linphone
# Constants.
singleton Constants 1.0 Constants.qml
# Components.
Chat 1.0 Chat/Chat.qml
Collapse 1.0 Collapse/Collapse.qml
Avatar 1.0 Contact/Avatar.qml
Contact 1.0 Contact/Contact.qml
ContactDescription 1.0 Contact/ContactDescription.qml
DialogPlus 1.0 Dialog/DialogPlus.qml
ActionBar 1.0 Form/ActionBar.qml
ActionButton 1.0 Form/ActionButton.qml
DarkButton 1.0 Form/DarkButton.qml
ExclusiveButtons 1.0 Form/ExclusiveButtons.qml
LightButton 1.0 Form/LightButton.qml
TransparentComboBox 1.0 Form/TransparentComboBox.qml
Icon 1.0 Image/Icon.qml
InvertedMouseArea 1.0 InvertedMouseArea/InvertedMouseArea.qml
MenuEntry 1.0 Misc/MenuEntry.qml
DropDownMenu 1.0 Popup/DropDownMenu.qml
PopupShadow 1.0 Popup/PopupShadow.qml
SearchBox 1.0 SearchBox/SearchBox.qml
ForceScrollBar 1.0 ScrollBar/ForceScrollBar.qml
Timeline 1.0 Timeline/Timeline.qml
ScrollableListView 1.0 View/ScrollableListView.qml
pragma Singleton
import QtQuick 2.7
// TODO: Mutualize similar colors.
QtObject {
property string a: '#808080'
property string b: '#5E5E5F'
property string c: '#C5C5C5'
property string d: '#5A585B'
property string e: '#DEDEDE'
}
pragma Singleton
import QtQuick 2.7
QtObject {
property int zPopup: 999
property int zMax: 999999
}
# See: https://wiki.qt.io/Qml_Styling
module AppStyle
singleton Colors 1.0 Colors.qml
singleton Constants 1.0 Constants.qml
......@@ -2,9 +2,7 @@ import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.3
import 'qrc:/ui/components/contact'
import 'qrc:/ui/components/form'
import 'qrc:/ui/components/scrollBar'
import Linphone 1.0
ColumnLayout {
spacing: 0
......
......@@ -2,9 +2,7 @@ import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.3
import 'qrc:/ui/components/contact'
import 'qrc:/ui/components/form'
import 'qrc:/ui/components/view'
import Linphone 1.0
import 'qrc:/ui/scripts/utils.js' as Utils
......
......@@ -2,10 +2,7 @@ import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.3
import 'qrc:/ui/components/contact'
import 'qrc:/ui/components/form'
import 'qrc:/ui/components/scrollBar'
import 'qrc:/ui/components/chat'
import Linphone 1.0
ColumnLayout {
spacing: 0
......
import QtQuick 2.7
import QtQuick.Layouts 1.3
import 'qrc:/ui/components/form'
import Linphone 1.0
// ===================================================================
......
......@@ -2,12 +2,7 @@ import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.3
import 'qrc:/ui/components/collapse'
import 'qrc:/ui/components/contact'
import 'qrc:/ui/components/form'
import 'qrc:/ui/components/misc'
import 'qrc:/ui/components/searchBox'
import 'qrc:/ui/components/timeline'
import Linphone 1.0
import 'qrc:/ui/scripts/utils.js' as Utils
......
......@@ -2,9 +2,7 @@ import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.3
import 'qrc:/ui/components/dialog'
import 'qrc:/ui/components/form'
import 'qrc:/ui/components/view'
import Linphone 1.0
DialogPlus {
descriptionText: qsTr('manageAccountsDescription')
......
import QtQuick 2.7
import QtQuick.Controls 2.0
import 'qrc:/ui/components/dialog'
import 'qrc:/ui/components/form'
import 'qrc:/ui/components/select'
import Linphone 1.0
DialogPlus {
centeredButtons: true
......
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