Commit 3944fec6 authored by Ronan's avatar Ronan
Browse files

feat(app): create a Common module wich contains no linphone components

parent c2efc8f6
......@@ -34,18 +34,20 @@ TRANSLATIONS = \
lupdate_only{
SOURCES = \
ui/modules/Common/*.qml \
ui/modules/Common/Dialog/*.qml \
ui/modules/Common/Form/*.qml \
ui/modules/Common/Image/*.qml \
ui/modules/Common/Popup/*.qml \
ui/modules/Common/Styles/*.qml \
ui/modules/Common/Styles/Form/*.qml \
ui/modules/Common/View/*.qml \
ui/modules/Linphone/*.qml \
ui/modules/Linphone/Chat/*.qml \
ui/modules/Linphone/Contact/*.qml \
ui/modules/Linphone/Dialog/*.qml \
ui/modules/Linphone/Form/*.qml \
ui/modules/Linphone/Image/*.qml \
ui/modules/Linphone/Popup/*.qml \
ui/modules/Linphone/Select/*.qml \
ui/modules/Linphone/Styles/*.qml \
ui/modules/Linphone/Styles/Contact/*.qml \
ui/modules/Linphone/Styles/Form/*.qml \
ui/modules/Linphone/View/*.qml \
ui/views/*.qml \
ui/views/Calls/*.qml \
ui/views/MainWindow/*.qml \
......
......@@ -28,68 +28,70 @@
<file>imgs/valid.svg</file>
<file>languages/en.qm</file>
<file>languages/fr.qm</file>
<file>ui/modules/Linphone/Borders.qml</file>
<file>ui/modules/Common/Borders.qml</file>
<file>ui/modules/Common/Collapse.qml</file>
<file>ui/modules/Common/Colors.qml</file>
<file>ui/modules/Common/Constants.qml</file>
<file>ui/modules/Common/Dialog/ConfirmDialog.qml</file>
<file>ui/modules/Common/Dialog/DialogDescription.qml</file>
<file>ui/modules/Common/Dialog/DialogPlus.qml</file>
<file>ui/modules/Common/DroppableTextArea.qml</file>
<file>ui/modules/Common/DropZone.qml</file>
<file>ui/modules/Common/ForceScrollBar.qml</file>
<file>ui/modules/Common/Form/AbstractTextButton.qml</file>
<file>ui/modules/Common/Form/ActionBar.qml</file>
<file>ui/modules/Common/Form/ActionButton.qml</file>
<file>ui/modules/Common/Form/CheckBoxText.qml</file>
<file>ui/modules/Common/Form/ExclusiveButtons.qml</file>
<file>ui/modules/Common/Form/ListForm.qml</file>
<file>ui/modules/Common/Form/SmallButton.qml</file>
<file>ui/modules/Common/Form/TextButtonA.qml</file>
<file>ui/modules/Common/Form/TextButtonB.qml</file>
<file>ui/modules/Common/Form/TransparentComboBox.qml</file>
<file>ui/modules/Common/Image/Icon.qml</file>
<file>ui/modules/Common/Image/RoundedImage.qml</file>
<file>ui/modules/Common/InvertedMouseArea.qml</file>
<file>ui/modules/Common/Menu.qml</file>
<file>ui/modules/Common/Paned.qml</file>
<file>ui/modules/Common/Popup/DropDownMenu.qml</file>
<file>ui/modules/Common/Popup/PopupShadow.qml</file>
<file>ui/modules/Common/qmldir</file>
<file>ui/modules/Common/SearchBox.qml</file>
<file>ui/modules/Common/Styles/CollapseStyle.qml</file>
<file>ui/modules/Common/Styles/DialogStyle.qml</file>
<file>ui/modules/Common/Styles/ForceScrollBarStyle.qml</file>
<file>ui/modules/Common/Styles/Form/AbstractTextButtonStyle.qml</file>
<file>ui/modules/Common/Styles/Form/ActionBarStyle.qml</file>
<file>ui/modules/Common/Styles/Form/CheckBoxTextStyle.qml</file>
<file>ui/modules/Common/Styles/Form/ExclusiveButtonsStyle.qml</file>
<file>ui/modules/Common/Styles/Form/ListFormStyle.qml</file>
<file>ui/modules/Common/Styles/Form/SmallButtonStyle.qml</file>
<file>ui/modules/Common/Styles/Form/TextButtonAStyle.qml</file>
<file>ui/modules/Common/Styles/Form/TextButtonBStyle.qml</file>
<file>ui/modules/Common/Styles/Form/TransparentComboBoxStyle.qml</file>
<file>ui/modules/Common/Styles/MenuStyle.qml</file>
<file>ui/modules/Common/Styles/PanedStyle.qml</file>
<file>ui/modules/Common/Styles/PopupStyle.qml</file>
<file>ui/modules/Common/Styles/qmldir</file>
<file>ui/modules/Common/Styles/SearchBoxStyle.qml</file>
<file>ui/modules/Common/View/ScrollableListView.qml</file>
<file>ui/modules/Linphone/Chat/Chat.qml</file>
<file>ui/modules/Linphone/Chat/Event.qml</file>
<file>ui/modules/Linphone/Chat/IncomingMessage.qml</file>
<file>ui/modules/Linphone/Chat/Message.qml</file>
<file>ui/modules/Linphone/Chat/OutgoingMessage.qml</file>
<file>ui/modules/Linphone/Collapse.qml</file>
<file>ui/modules/Linphone/Colors.qml</file>
<file>ui/modules/Linphone/Constants.qml</file>
<file>ui/modules/Linphone/Contact/Avatar.qml</file>
<file>ui/modules/Linphone/Contact/ContactDescription.qml</file>
<file>ui/modules/Linphone/Contact/Contact.qml</file>
<file>ui/modules/Linphone/Contact/PresenceLevel.qml</file>
<file>ui/modules/Linphone/Dialog/ConfirmDialog.qml</file>
<file>ui/modules/Linphone/Dialog/DialogDescription.qml</file>
<file>ui/modules/Linphone/Dialog/DialogPlus.qml</file>
<file>ui/modules/Linphone/DroppableTextArea.qml</file>
<file>ui/modules/Linphone/DropZone.qml</file>
<file>ui/modules/Linphone/ForceScrollBar.qml</file>
<file>ui/modules/Linphone/Form/AbstractTextButton.qml</file>
<file>ui/modules/Linphone/Form/ActionBar.qml</file>
<file>ui/modules/Linphone/Form/ActionButton.qml</file>
<file>ui/modules/Linphone/Form/CheckBoxText.qml</file>
<file>ui/modules/Linphone/Form/ExclusiveButtons.qml</file>
<file>ui/modules/Linphone/Form/ListForm.qml</file>
<file>ui/modules/Linphone/Form/SmallButton.qml</file>
<file>ui/modules/Linphone/Form/TextButtonA.qml</file>
<file>ui/modules/Linphone/Form/TextButtonB.qml</file>
<file>ui/modules/Linphone/Form/TransparentComboBox.qml</file>
<file>ui/modules/Linphone/Image/Icon.qml</file>
<file>ui/modules/Linphone/Image/RoundedImage.qml</file>
<file>ui/modules/Linphone/InvertedMouseArea.qml</file>
<file>ui/modules/Linphone/Menu.qml</file>
<file>ui/modules/Linphone/Paned.qml</file>
<file>ui/modules/Linphone/Popup/DropDownMenu.qml</file>
<file>ui/modules/Linphone/Popup/PopupShadow.qml</file>
<file>ui/modules/Linphone/qmldir</file>
<file>ui/modules/Linphone/SearchBox.qml</file>
<file>ui/modules/Linphone/Select/SelectContact.qml</file>
<file>ui/modules/Linphone/Styles/CollapseStyle.qml</file>
<file>ui/modules/Linphone/Styles/Contact/AvatarStyle.qml</file>
<file>ui/modules/Linphone/Styles/Contact/ContactDescriptionStyle.qml</file>
<file>ui/modules/Linphone/Styles/Contact/ContactStyle.qml</file>
<file>ui/modules/Linphone/Styles/DialogStyle.qml</file>
<file>ui/modules/Linphone/Styles/ForceScrollBarStyle.qml</file>
<file>ui/modules/Linphone/Styles/Form/AbstractTextButtonStyle.qml</file>
<file>ui/modules/Linphone/Styles/Form/ActionBarStyle.qml</file>
<file>ui/modules/Linphone/Styles/Form/CheckBoxTextStyle.qml</file>
<file>ui/modules/Linphone/Styles/Form/ExclusiveButtonsStyle.qml</file>
<file>ui/modules/Linphone/Styles/Form/ListFormStyle.qml</file>
<file>ui/modules/Linphone/Styles/Form/SmallButtonStyle.qml</file>
<file>ui/modules/Linphone/Styles/Form/TextButtonAStyle.qml</file>
<file>ui/modules/Linphone/Styles/Form/TextButtonBStyle.qml</file>
<file>ui/modules/Linphone/Styles/Form/TransparentComboBoxStyle.qml</file>
<file>ui/modules/Linphone/Styles/MenuStyle.qml</file>
<file>ui/modules/Linphone/Styles/PanedStyle.qml</file>
<file>ui/modules/Linphone/Styles/PopupStyle.qml</file>
<file>ui/modules/Linphone/Styles/qmldir</file>
<file>ui/modules/Linphone/Styles/SearchBoxStyle.qml</file>
<file>ui/modules/Linphone/Styles/TimelineStyle.qml</file>
<file>ui/modules/Linphone/Timeline.qml</file>
<file>ui/modules/Linphone/View/ScrollableListView.qml</file>
<file>ui/scripts/Utils/qmldir</file>
<file>ui/scripts/Utils/utils.js</file>
<file>ui/views/Calls/Calls.qml</file>
......
#include <QMenu>
#include <QQmlApplicationEngine>
#include <QQmlComponent>
#include <QQmlContext>
#include <QQmlFileSelector>
#include <QQuickView>
#include <QSystemTrayIcon>
#include <QtDebug>
#include <QQmlComponent>
#include "app.hpp"
#include "components/contacts/ContactsListProxyModel.hpp"
#include "components/notification/Notification.hpp"
......
import QtQuick 2.7
import Linphone.Styles 1.0
import Common.Styles 1.0
// ===================================================================
// A simple component to build collapsed item.
......
import Linphone 1.0
import Linphone.Styles 1.0
import Common 1.0
import Common.Styles 1.0
// ===================================================================
// A dialog with OK/Cancel buttons.
......
import QtQuick 2.7
import Linphone.Styles 1.0
import Common.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 Linphone.Styles 1.0
import Common.Styles 1.0
// ===================================================================
// Helper to build quickly dialogs.
......
import QtQuick 2.7
import QtQuick.Controls 2.0
import Linphone.Styles 1.0
import Common.Styles 1.0
// ===================================================================
......
import QtQuick 2.7
import QtQuick.Controls 2.0
import Linphone.Styles 1.0
import Common.Styles 1.0
// ===================================================================
......
import QtQuick 2.7
import Linphone.Styles 1.0
import Common.Styles 1.0
// ===================================================================
// Bar which can contains ActionButtons.
......
import QtQuick 2.7
import QtQuick.Controls 2.0
import Linphone 1.0
import Common 1.0
// ===================================================================
// An animated small button with an image.
......
import QtQuick 2.7
import QtQuick.Controls 2.0
import Linphone.Styles 1.0
import Common.Styles 1.0
// ===================================================================
// Checkbox with clickable text.
......
import QtQuick 2.7
import Linphone.Styles 1.0
import Common.Styles 1.0
// ===================================================================
......
import QtQuick 2.7
import QtQuick.Layouts 1.3
import Linphone 1.0
import Linphone.Styles 1.0
import Common 1.0
import Common.Styles 1.0
// ===================================================================
......
import QtQuick 2.7
import QtQuick.Controls 2.0
import Linphone.Styles 1.0
import Common.Styles 1.0
// ===================================================================
......
import Linphone.Styles 1.0
import Common.Styles 1.0
// ===================================================================
......
import Linphone.Styles 1.0
import Common.Styles 1.0
// ===================================================================
......
import QtQuick 2.7
import QtQuick.Controls 2.0
import Linphone.Styles 1.0
import Common.Styles 1.0
// ===================================================================
// Discrete ComboBox that can be integrated in text.
......
import QtQuick 2.7
import Linphone 1.0
import Common 1.0
import Utils 1.0
// ===================================================================
......
import QtQuick 2.7
import QtQuick.Layouts 1.3
import Linphone.Styles 1.0
import Common.Styles 1.0
// ===================================================================
// Responsive flat menu with visual indicators.
......
import QtQuick 2.7
import Linphone.Styles 1.0
import Common.Styles 1.0
import Utils 1.0
// ===================================================================
......
import QtQuick 2.7
import Linphone 1.0
import Linphone.Styles 1.0
import Common 1.0
import Common.Styles 1.0
// ===================================================================
// Low component to display a list/menu in a popup.
......
import QtGraphicalEffects 1.0
import Linphone.Styles 1.0
import Common.Styles 1.0
// ===================================================================
......
import QtQuick 2.7
import QtQuick.Controls 2.0
import Linphone.Styles 1.0
import Common.Styles 1.0
// ===================================================================
......
pragma Singleton
import QtQuick 2.7
import Linphone 1.0
import Common 1.0
QtObject {
property int leftMargin: 50
......
pragma Singleton
import QtQuick 2.7
import Linphone 1.0
import Common 1.0
QtObject {
property Rectangle background: Rectangle {
......
pragma Singleton
import QtQuick 2.7
import Linphone 1.0
import Common 1.0
QtObject {
property int radius: 3
......
pragma Singleton
import QtQuick 2.7
import Linphone 1.0
import Common 1.0
QtObject {
property int buttonsSpacing: 8
......
pragma Singleton
import QtQuick 2.7
import Linphone 1.0
import Common 1.0
QtObject {
property int lineHeight: 30
......
pragma Singleton
import QtQuick 2.7
import Linphone 1.0
import Common 1.0
QtObject {
property QtObject background: QtObject {
......
pragma Singleton
import QtQuick 2.7
import Linphone 1.0
import Common 1.0
QtObject {
property QtObject backgroundColor: QtObject {
......
pragma Singleton
import QtQuick 2.7
import Linphone 1.0
import Common 1.0
QtObject {
property QtObject backgroundColor: QtObject {
......
pragma Singleton
import QtQuick 2.7
import Linphone 1.0
import Common 1.0
QtObject {
property QtObject item: QtObject {
......
pragma Singleton
import QtQuick 2.7
import Linphone 1.0
import Common 1.0
QtObject {
property int spacing: 2
......
pragma Singleton
import QtQuick 2.7
import Linphone 1.0
import Common 1.0
QtObject {
property int transitionDuration: 200
......
pragma Singleton
import QtQuick 2.7
import Linphone 1.0
import Common 1.0
QtObject {
property color backgroundColor: Colors.k
......
pragma Singleton
import QtQuick 2.7
import Linphone 1.0
import Common 1.0
QtObject {
property color shadowColor: Colors.f
......
# See: https://wiki.qt.io/Qml_Styling
module Common.Styles
# Components styles.
singleton CollapseStyle 1.0 CollapseStyle.qml
singleton DialogStyle 1.0 DialogStyle.qml
singleton ForceScrollBarStyle 1.0 ForceScrollBarStyle.qml
singleton MenuStyle 1.0 MenuStyle.qml
singleton PanedStyle 1.0 PanedStyle.qml
singleton PopupStyle 1.0 PopupStyle.qml
singleton SearchBoxStyle 1.0 SearchBoxStyle.qml
singleton AbstractTextButtonStyle 1.0 Form/AbstractTextButtonStyle.qml
singleton ActionBarStyle 1.0 Form/ActionBarStyle.qml
singleton CheckBoxTextStyle 1.0 Form/CheckBoxTextStyle.qml
singleton ExclusiveButtonsStyle 1.0 Form/ExclusiveButtonsStyle.qml
singleton ListFormStyle 1.0 Form/ListFormStyle.qml
singleton SmallButtonStyle 1.0 Form/SmallButtonStyle.qml
singleton TextButtonAStyle 1.0 Form/TextButtonAStyle.qml
singleton TextButtonBStyle 1.0 Form/TextButtonBStyle.qml
singleton TransparentComboBoxStyle 1.0 Form/TransparentComboBoxStyle.qml
import QtQuick 2.7
import QtQuick.Controls 2.0
import Linphone 1.0
import Common 1.0
// ===================================================================
......
# ====================================================================
# Common's components to export.
# ====================================================================
module Common
# Constants ----------------------------------------------------------
singleton Colors 1.0 Colors.qml
singleton Constants 1.0 Constants.qml
# Components ---------------------------------------------------------
# Chat
Borders 1.0 Borders.qml
# Collapse
Collapse 1.0 Collapse.qml
# Dialog
ConfirmDialog 1.0 Dialog/ConfirmDialog.qml
DialogPlus 1.0 Dialog/DialogPlus.qml
# DropZone
DropZone 1.0 DropZone.qml
# DroppableTextArea
DroppableTextArea 1.0 DroppableTextArea.qml
# ForceScrollBar
ForceScrollBar 1.0 ForceScrollBar.qml
# Form
ActionBar 1.0 Form/ActionBar.qml
ActionButton 1.0 Form/ActionButton.qml
CheckBoxText 1.0 Form/CheckBoxText.qml
ExclusiveButtons 1.0 Form/ExclusiveButtons.qml
LightButton 1.0 Form/LightButton.qml
ListForm 1.0 Form/ListForm.qml
TextButtonA 1.0 Form/TextButtonA.qml
TextButtonB 1.0 Form/TextButtonB.qml
TransparentComboBox 1.0 Form/TransparentComboBox.qml
# Image
Icon 1.0 Image/Icon.qml
RoundedImage 1.0 Image/RoundedImage.qml
# InvertedMouseArea
InvertedMouseArea 1.0 InvertedMouseArea.qml
# Menu