feat(app): refactoring & provide Units module

This commit is contained in:
Ronan Abhamon 2017-06-08 10:48:18 +02:00
parent 79e27ca6a6
commit 865c595d3d
144 changed files with 349 additions and 202 deletions

View file

@ -109,7 +109,6 @@ set(SOURCES
src/components/camera/MSFunctions.cpp
src/components/chat/ChatModel.cpp
src/components/chat/ChatProxyModel.cpp
src/components/clipboard/Clipboard.cpp
src/components/codecs/AbstractCodecsModel.cpp
src/components/codecs/AudioCodecsModel.cpp
src/components/codecs/VideoCodecsModel.cpp
@ -123,6 +122,9 @@ set(SOURCES
src/components/core/CoreHandlers.cpp
src/components/core/CoreManager.cpp
src/components/notifier/Notifier.cpp
src/components/other/clipboard/Clipboard.cpp
src/components/other/text-to-speech/TextToSpeech.cpp
src/components/other/units/Units.cpp
src/components/presence/OwnPresenceModel.cpp
src/components/presence/Presence.cpp
src/components/settings/AccountSettingsModel.cpp
@ -132,12 +134,11 @@ set(SOURCES
src/components/sip-addresses/SipAddressObserver.cpp
src/components/sound-player/SoundPlayer.cpp
src/components/telephone-numbers/TelephoneNumbersModel.cpp
src/components/text-to-speech/TextToSpeech.cpp
src/components/timeline/TimelineModel.cpp
src/externals/single-application/SingleApplication.cpp
src/main.cpp
src/LinphoneUtils.cpp
src/Utils.cpp
src/utils/LinphoneUtils.cpp
src/utils/Utils.cpp
)
set(HEADERS
@ -158,7 +159,6 @@ set(HEADERS
src/components/camera/MSFunctions.hpp
src/components/chat/ChatModel.hpp
src/components/chat/ChatProxyModel.hpp
src/components/clipboard/Clipboard.cpp
src/components/codecs/AbstractCodecsModel.hpp
src/components/codecs/AudioCodecsModel.hpp
src/components/codecs/VideoCodecsModel.hpp
@ -173,6 +173,9 @@ set(HEADERS
src/components/core/CoreHandlers.hpp
src/components/core/CoreManager.hpp
src/components/notifier/Notifier.hpp
src/components/other/clipboard/Clipboard.cpp
src/components/other/text-to-speech/TextToSpeech.hpp
src/components/other/units/Units.hpp
src/components/presence/OwnPresenceModel.hpp
src/components/presence/Presence.hpp
src/components/settings/AccountSettingsModel.hpp
@ -182,12 +185,11 @@ set(HEADERS
src/components/sip-addresses/SipAddressObserver.hpp
src/components/sound-player/SoundPlayer.hpp
src/components/telephone-numbers/TelephoneNumbersModel.hpp
src/components/text-to-speech/TextToSpeech.hpp
src/components/timeline/TimelineModel.hpp
src/externals/single-application/SingleApplication.hpp
src/externals/single-application/SingleApplicationPrivate.hpp
src/LinphoneUtils.hpp
src/Utils.hpp
src/utils/LinphoneUtils.hpp
src/utils/Utils.hpp
)
set(QRC_RESOURCES resources.qrc)

View file

@ -31,7 +31,7 @@
#include "gitversion.h"
#include "../components/Components.hpp"
#include "../Utils.hpp"
#include "../utils/Utils.hpp"
#include "cli/Cli.hpp"
#include "logger/Logger.hpp"
@ -187,6 +187,7 @@ void App::initContentApp () {
registerTypes();
registerSharedTypes();
registerToolTypes();
// Enable notifications.
createNotifier();
@ -332,8 +333,8 @@ void registerMetaType (const char *name) {
template<class T>
void registerSingletonType (const char *name) {
qmlRegisterSingletonType<T>("Linphone", 1, 0, name, [](QQmlEngine *, QJSEngine *) -> QObject *{
return new T();
qmlRegisterSingletonType<T>("Linphone", 1, 0, name, [](QQmlEngine *engine, QJSEngine *) -> QObject *{
return new T(engine);
});
}
@ -342,6 +343,13 @@ void registerType (const char *name) {
qmlRegisterType<T>("Linphone", 1, 0, name);
}
template<class T>
void registerToolType (const char *name) {
qmlRegisterSingletonType<T>(name, 1, 0, name, [](QQmlEngine *engine, QJSEngine *) -> QObject *{
return new T(engine);
});
}
void App::registerTypes () {
qInfo() << QStringLiteral("Registering types...");
@ -360,10 +368,8 @@ void App::registerTypes () {
registerType<TelephoneNumbersModel>("TelephoneNumbersModel");
registerSingletonType<AudioCodecsModel>("AudioCodecsModel");
registerSingletonType<Clipboard>("Clipboard");
registerSingletonType<OwnPresenceModel>("OwnPresenceModel");
registerSingletonType<Presence>("Presence");
registerSingletonType<TextToSpeech>("TextToSpeech");
registerSingletonType<TimelineModel>("TimelineModel");
registerSingletonType<VideoCodecsModel>("VideoCodecsModel");
@ -388,6 +394,14 @@ void App::registerSharedTypes () {
registerSharedSingletonType(ContactsListModel, "ContactsListModel", CoreManager::getInstance()->getContactsListModel);
}
void App::registerToolTypes () {
qInfo() << QStringLiteral("Registering tool types...");
registerToolType<Clipboard>("Clipboard");
registerToolType<TextToSpeech>("TextToSpeech");
registerToolType<Units>("Units");
}
#undef registerUncreatableType
#undef registerSharedSingletonType

View file

@ -92,6 +92,8 @@ private:
void registerTypes ();
void registerSharedTypes ();
void registerToolTypes ();
void setTrayIcon ();
void createNotifier ();

View file

@ -22,10 +22,8 @@
#include <stdexcept>
#include <QObject>
#include "../../components/core/CoreManager.hpp"
#include "../../Utils.hpp"
#include "../../utils/Utils.hpp"
#include "../App.hpp"
#include "Cli.hpp"

View file

@ -29,6 +29,8 @@
// =============================================================================
class Cli : public QObject {
Q_OBJECT;
typedef void (*Function)(const QHash<QString, QString> &);
enum ArgumentType {

View file

@ -25,7 +25,7 @@
#include <QDateTime>
#include <QThread>
#include "../../Utils.hpp"
#include "../../utils/Utils.hpp"
#include "../paths/Paths.hpp"
#include "Logger.hpp"

View file

@ -27,7 +27,7 @@
#include <QStandardPaths>
#include <QtDebug>
#include "../../Utils.hpp"
#include "../../utils/Utils.hpp"
#include "config.h"
#include "Paths.hpp"

View file

@ -20,7 +20,7 @@
* Author: Ronan Abhamon
*/
#include "../../Utils.hpp"
#include "../../utils/Utils.hpp"
#include "../paths/Paths.hpp"
#include "AvatarProvider.hpp"

View file

@ -20,7 +20,7 @@
* Author: Ronan Abhamon
*/
#include "../../Utils.hpp"
#include "../../utils/Utils.hpp"
#include "../paths/Paths.hpp"
#include "ThumbnailProvider.hpp"

View file

@ -30,7 +30,6 @@
#include "camera/Camera.hpp"
#include "camera/CameraPreview.hpp"
#include "chat/ChatProxyModel.hpp"
#include "clipboard/Clipboard.hpp"
#include "codecs/AudioCodecsModel.hpp"
#include "codecs/VideoCodecsModel.hpp"
#include "conference/ConferenceAddModel.hpp"
@ -41,7 +40,10 @@
#include "sip-addresses/SipAddressesProxyModel.hpp"
#include "sound-player/SoundPlayer.hpp"
#include "telephone-numbers/TelephoneNumbersModel.hpp"
#include "text-to-speech/TextToSpeech.hpp"
#include "timeline/TimelineModel.hpp"
#include "other/clipboard/Clipboard.hpp"
#include "other/text-to-speech/TextToSpeech.hpp"
#include "other/units/Units.hpp"
#endif // COMPONENTS_H_

View file

@ -21,8 +21,8 @@
*/
#include "../../app/paths/Paths.hpp"
#include "../../LinphoneUtils.hpp"
#include "../../Utils.hpp"
#include "../../utils/LinphoneUtils.hpp"
#include "../../utils/Utils.hpp"
#include "../core/CoreManager.hpp"
#include "AssistantModel.hpp"

View file

@ -20,7 +20,7 @@
* Author: Ronan Abhamon
*/
#include "../../Utils.hpp"
#include "../../utils/Utils.hpp"
#include "../core/CoreManager.hpp"
#include "AuthenticationNotifier.hpp"

View file

@ -25,7 +25,7 @@
#include <QTimer>
#include "../../app/App.hpp"
#include "../../Utils.hpp"
#include "../../utils/Utils.hpp"
#include "../core/CoreManager.hpp"
#include "CallModel.hpp"

View file

@ -24,7 +24,7 @@
#include <QTimer>
#include "../../app/App.hpp"
#include "../../Utils.hpp"
#include "../../utils/Utils.hpp"
#include "../conference/ConferenceHelperModel.hpp"
#include "../core/CoreManager.hpp"

View file

@ -33,7 +33,7 @@
#include "../../app/App.hpp"
#include "../../app/paths/Paths.hpp"
#include "../../app/providers/ThumbnailProvider.hpp"
#include "../../Utils.hpp"
#include "../../utils/Utils.hpp"
#include "../core/CoreManager.hpp"
#include "ChatModel.hpp"

View file

@ -20,7 +20,7 @@
* Author: Ronan Abhamon
*/
#include "../../Utils.hpp"
#include "../../utils/Utils.hpp"
#include "../core/CoreManager.hpp"
#include "AbstractCodecsModel.hpp"

View file

@ -20,7 +20,7 @@
* Author: Ronan Abhamon
*/
#include "../../Utils.hpp"
#include "../../utils/Utils.hpp"
#include "../core/CoreManager.hpp"
#include "ConferenceAddModel.hpp"

View file

@ -22,7 +22,7 @@
#include <QDateTime>
#include "../../Utils.hpp"
#include "../../utils/Utils.hpp"
#include "../core/CoreManager.hpp"
#include "ConferenceModel.hpp"

View file

@ -29,7 +29,7 @@
#include "../../app/App.hpp"
#include "../../app/paths/Paths.hpp"
#include "../../app/providers/AvatarProvider.hpp"
#include "../../Utils.hpp"
#include "../../utils/Utils.hpp"
#include "../core/CoreManager.hpp"
#include "VcardModel.hpp"

View file

@ -23,7 +23,7 @@
#include <QtDebug>
#include "../../app/App.hpp"
#include "../../Utils.hpp"
#include "../../utils/Utils.hpp"
#include "../core/CoreManager.hpp"
#include "ContactsListModel.hpp"

View file

@ -24,7 +24,7 @@
#include <QDebug>
#include "../../Utils.hpp"
#include "../../utils/Utils.hpp"
#include "../core/CoreManager.hpp"
#include "ContactsListProxyModel.hpp"

View file

@ -26,7 +26,7 @@
#include <QTimer>
#include "../../app/App.hpp"
#include "../../Utils.hpp"
#include "../../utils/Utils.hpp"
#include "CoreManager.hpp"
#include "CoreHandlers.hpp"

View file

@ -25,7 +25,7 @@
#include <QTimer>
#include "../../app/paths/Paths.hpp"
#include "../../Utils.hpp"
#include "../../utils/Utils.hpp"
#include "CoreManager.hpp"

View file

@ -27,7 +27,7 @@
#include <QTimer>
#include "../../app/App.hpp"
#include "../../Utils.hpp"
#include "../../utils/Utils.hpp"
#include "../core/CoreManager.hpp"
#include "Notifier.hpp"

View file

@ -0,0 +1,31 @@
/*
* Units.cpp
* Copyright (C) 2017 Belledonne Communications, Grenoble, France
*
* 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 2
* 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, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Created on: June 8, 2017
* Author: Ronan Abhamon
*/
#include "Units.hpp"
// =============================================================================
Units::Units (QObject *parent) : QObject(parent) {}
float Units::getDp () const {
return 1.0;
}

View file

@ -0,0 +1,46 @@
/*
* Units.hpp
* Copyright (C) 2017 Belledonne Communications, Grenoble, France
*
* 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 2
* 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, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Created on: June 8, 2017
* Author: Ronan Abhamon
*/
#ifndef UNITS_H_
#define UNITS_H_
#include <QObject>
// =============================================================================
class Units : public QObject {
Q_OBJECT;
Q_PROPERTY(float dp READ getDp NOTIFY dpChanged);
public:
Units (QObject *parent = Q_NULLPTR);
~Units () = default;
signals:
void dpChanged ();
private:
float getDp () const;
};
#endif // UNITS_H_

View file

@ -22,7 +22,7 @@
#include <QtDebug>
#include "../../Utils.hpp"
#include "../../utils/Utils.hpp"
#include "../core/CoreManager.hpp"
#include "OwnPresenceModel.hpp"

View file

@ -22,7 +22,7 @@
#include <QtDebug>
#include "../../Utils.hpp"
#include "../../utils/Utils.hpp"
#include "../core/CoreManager.hpp"
#include "AccountSettingsModel.hpp"

View file

@ -23,7 +23,7 @@
#include <QDir>
#include "../../app/paths/Paths.hpp"
#include "../../Utils.hpp"
#include "../../utils/Utils.hpp"
#include "../core/CoreManager.hpp"
#include "SettingsModel.hpp"

View file

@ -24,8 +24,8 @@
#include <QSet>
#include <QtDebug>
#include "../../LinphoneUtils.hpp"
#include "../../Utils.hpp"
#include "../../utils/LinphoneUtils.hpp"
#include "../../utils/Utils.hpp"
#include "../chat/ChatModel.hpp"
#include "../core/CoreManager.hpp"

View file

@ -22,7 +22,7 @@
#include <QTimer>
#include "../../Utils.hpp"
#include "../../utils/Utils.hpp"
#include "../core/CoreManager.hpp"
#include "SoundPlayer.hpp"

View file

@ -43,7 +43,7 @@
#include <lmcons.h>
#endif // ifdef Q_OS_WIN
#include "../../Utils.hpp"
#include "../../utils/Utils.hpp"
#include "SingleApplication.hpp"
#include "SingleApplicationPrivate.hpp"

View file

@ -24,7 +24,7 @@ Item {
}
color: DialogStyle.description.color
font.pointSize: DialogStyle.description.fontSize
font.pointSize: DialogStyle.description.pointSize
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
wrapMode: Text.WordWrap

View file

@ -65,7 +65,7 @@ Item {
color: _getTextColor()
font {
bold: true
pointSize: AbstractTextButtonStyle.text.fontSize
pointSize: AbstractTextButtonStyle.text.pointSize
}
elide: Text.ElideRight

View file

@ -24,7 +24,7 @@ Button {
}
contentItem: Text {
color: SmallButtonStyle.text.color
font.pointSize: SmallButtonStyle.text.fontSize
font.pointSize: SmallButtonStyle.text.pointSize
horizontalAlignment: Text.AlignHCenter
text: button.text
verticalAlignment: Text.AlignVCenter

View file

@ -30,7 +30,7 @@ CheckBox {
verticalAlignment: Text.AlignVCenter
}
font.pointSize: CheckBoxTextStyle.fontSize
font.pointSize: CheckBoxTextStyle.pointSize
hoverEnabled: true
indicator: Rectangle {

View file

@ -50,7 +50,7 @@ ComboBox {
color: ComboBoxStyle.contentItem.text.color
elide: Text.ElideRight
font.pointSize: ComboBoxStyle.contentItem.text.fontSize
font.pointSize: ComboBoxStyle.contentItem.text.pointSize
rightPadding: comboBox.indicator.width + comboBox.spacing
text: Logic.getSelectedEntryText()
@ -123,7 +123,7 @@ ComboBox {
font {
bold: comboBox.currentIndex === index
pointSize: ComboBoxStyle.delegate.contentItem.text.fontSize
pointSize: ComboBoxStyle.delegate.contentItem.text.pointSize
}
text: item.flattenedModel[textRole] || modelData

View file

@ -4,7 +4,6 @@ import QtQuick.Dialogs 1.2
import Common 1.0
import Common.Styles 1.0
import Utils 1.0
// =============================================================================
@ -65,7 +64,7 @@ Item {
}
color: DroppableTextAreaStyle.text.color
font.pointSize: DroppableTextAreaStyle.text.fontSize
font.pointSize: DroppableTextAreaStyle.text.pointSize
rightPadding: fileChooserButton.width +
fileChooserButton.anchors.rightMargin +
DroppableTextAreaStyle.fileChooserButton.margins
@ -132,7 +131,7 @@ Item {
Text {
anchors.centerIn: parent
color: DroppableTextAreaStyle.hoverContent.text.color
font.pointSize: DroppableTextAreaStyle.hoverContent.text.fontSize
font.pointSize: DroppableTextAreaStyle.hoverContent.text.pointSize
text: qsTr('dropYourAttachment')
}
}

View file

@ -74,7 +74,7 @@ TextField {
contentItem: Text {
color: NumericFieldStyle.tools.button.text.color
text: buttonInstance.text
font.pointSize: NumericFieldStyle.tools.button.text.fontSize
font.pointSize: NumericFieldStyle.tools.button.text.pointSize
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter

View file

@ -35,7 +35,7 @@ Flickable {
}
color: TextAreaFieldStyle.text.color
font.pointSize: TextAreaFieldStyle.text.fontSize
font.pointSize: TextAreaFieldStyle.text.pointSize
selectByMouse: true
wrapMode: TextArea.Wrap

View file

@ -60,7 +60,7 @@ Controls.TextField {
}
color: TextFieldStyle.text.color
font.pointSize: TextFieldStyle.text.fontSize
font.pointSize: TextFieldStyle.text.pointSize
rightPadding: TextFieldStyle.text.rightPadding + toolsContainer.width
selectByMouse: true

View file

@ -71,7 +71,7 @@ RowLayout {
font {
bold: true
pointSize: ListFormStyle.titleArea.text.fontSize
pointSize: ListFormStyle.titleArea.text.pointSize
}
}
}
@ -89,7 +89,7 @@ RowLayout {
font {
italic: true
pointSize: ListFormStyle.value.placeholder.fontSize
pointSize: ListFormStyle.value.placeholder.pointSize
}
padding: ListFormStyle.value.text.padding

View file

@ -27,7 +27,7 @@ Column {
color: FormStyle.header.title.color
font {
bold: true
pointSize: FormStyle.header.title.fontSize
pointSize: FormStyle.header.title.pointSize
}
}

View file

@ -24,7 +24,7 @@ RowLayout {
color: FormHGroupStyle.legend.color
elide: Text.ElideRight
font.pointSize: FormHGroupStyle.legend.fontSize
font.pointSize: FormHGroupStyle.legend.pointSize
horizontalAlignment: Text.AlignRight
verticalAlignment: Text.AlignVCenter

View file

@ -54,7 +54,7 @@ Column {
font {
bold: true
pointSize: FormTableStyle.entry.text.fontSize
pointSize: FormTableStyle.entry.text.pointSize
}
}
}

View file

@ -32,7 +32,7 @@ Row {
font {
bold: false
pointSize: FormTableStyle.entry.text.fontSize
pointSize: FormTableStyle.entry.text.pointSize
}
visible: !formTableLine.parent.disableLineTitle

View file

@ -24,7 +24,7 @@ ColumnLayout {
color: FormVGroupStyle.legend.color
elide: Text.ElideRight
font.pointSize: FormVGroupStyle.legend.fontSize
font.pointSize: FormVGroupStyle.legend.pointSize
verticalAlignment: Text.AlignVCenter
}
@ -64,7 +64,7 @@ ColumnLayout {
font {
italic: true
pointSize: FormVGroupStyle.error.fontSize
pointSize: FormVGroupStyle.error.pointSize
}
text: _content && _content.error && _content.error.length ? _content.error : ''

View file

@ -39,7 +39,7 @@ RowLayout {
font {
bold: true
pointSize: ListFormStyle.titleArea.text.fontSize
pointSize: ListFormStyle.titleArea.text.pointSize
}
verticalAlignment: Text.AlignVCenter

View file

@ -82,7 +82,7 @@ Controls.TabButton {
font {
bold: true
pointSize: TabButtonStyle.text.fontSize
pointSize: TabButtonStyle.text.pointSize
}
elide: Text.ElideRight

View file

@ -71,7 +71,7 @@ Item {
font {
italic: true
pointSize: TransparentTextInputStyle.placeholder.fontSize
pointSize: TransparentTextInputStyle.placeholder.pointSize
}
height: textInput.height
@ -92,7 +92,7 @@ Item {
color: activeFocus && !readOnly
? TransparentTextInputStyle.text.color.focused
: TransparentTextInputStyle.text.color.normal
font.pointSize: TransparentTextInputStyle.text.fontSize
font.pointSize: TransparentTextInputStyle.text.pointSize
selectByMouse: true
verticalAlignment: TextInput.AlignVCenter

View file

@ -86,7 +86,7 @@ Rectangle {
color: _selectedEntry === index
? ApplicationMenuStyle.entry.text.color.selected
: ApplicationMenuStyle.entry.text.color.normal
font.pointSize: ApplicationMenuStyle.entry.text.fontSize
font.pointSize: ApplicationMenuStyle.entry.text.pointSize
height: parent.height
text: modelData.entryName
verticalAlignment: Text.AlignVCenter

View file

@ -32,7 +32,7 @@ Rectangle {
color: DropDownStaticMenuStyle.entry.text.color
elide: Text.ElideRight
font.pointSize: DropDownStaticMenuStyle.entry.text.fontSize
font.pointSize: DropDownStaticMenuStyle.entry.text.pointSize
height: parent.height
verticalAlignment: Text.AlignVCenter

View file

@ -28,7 +28,7 @@ MenuItem {
font {
bold: true
pointSize: MenuItemStyle.text.fontSize
pointSize: MenuItemStyle.text.pointSize
}
text: button.text

View file

@ -2,6 +2,7 @@ pragma Singleton
import QtQuick 2.7
import Common 1.0
import Units 1.0
// =============================================================================
@ -24,7 +25,7 @@ QtObject {
property QtObject description: QtObject {
property color color: Colors.j
property int fontSize: 11
property int pointSize: Units.dp * 11
property int verticalMargin: 25
}
}

View file

@ -1,6 +1,8 @@
pragma Singleton
import QtQuick 2.7
import Units 1.0
// =============================================================================
QtObject {
@ -11,6 +13,6 @@ QtObject {
}
property QtObject text: QtObject {
property int fontSize: 8
property int pointSize: Units.dp * 8
}
}

View file

@ -2,6 +2,7 @@ pragma Singleton
import QtQuick 2.7
import Common 1.0
import Units 1.0
// =============================================================================
@ -22,6 +23,6 @@ QtObject {
property QtObject text: QtObject {
property color color: Colors.k
property int fontSize: 8
property int pointSize: Units.dp * 8
}
}

View file

@ -2,11 +2,12 @@ pragma Singleton
import QtQuick 2.7
import Common 1.0
import Units 1.0
// =============================================================================
QtObject {
property int fontSize: 10
property int pointSize: Units.dp * 10
property int radius: 3
property int size: 18

View file

@ -2,6 +2,7 @@ pragma Singleton
import QtQuick 2.7
import Common 1.0
import Units 1.0
// =============================================================================
@ -25,7 +26,7 @@ QtObject {
property QtObject text: QtObject {
property color color: Colors.d
property int fontSize: 10
property int pointSize: Units.dp * 10
}
}
@ -41,7 +42,7 @@ QtObject {
property QtObject text: QtObject {
property color color: Colors.d
property int fontSize: 10
property int pointSize: Units.dp * 10
}
}

View file

@ -2,6 +2,7 @@ pragma Singleton
import QtQuick 2.7
import Common 1.0
import Units 1.0
// =============================================================================
@ -18,12 +19,12 @@ QtObject {
property QtObject text: QtObject {
property color color: Colors.i
property int fontSize: 11
property int pointSize: Units.dp * 11
}
}
property QtObject text: QtObject {
property color color: Colors.d
property int fontSize: 10
property int pointSize: Units.dp * 10
}
}

View file

@ -2,6 +2,7 @@ pragma Singleton
import QtQuick 2.7
import Common 1.0
import Units 1.0
// =============================================================================
@ -17,7 +18,7 @@ QtObject {
property QtObject text: QtObject {
property color color: Colors.d
property int fontSize: 9
property int pointSize: Units.dp * 9
}
}
}

View file

@ -2,6 +2,7 @@ pragma Singleton
import QtQuick 2.7
import Common 1.0
import Units 1.0
// =============================================================================
@ -25,7 +26,7 @@ QtObject {
property QtObject text: QtObject {
property color color: Colors.d
property int fontSize: 10
property int pointSize: Units.dp * 10
property int padding: 8
}
}

View file

@ -2,6 +2,7 @@ pragma Singleton
import QtQuick 2.7
import Common 1.0
import Units 1.0
// =============================================================================
@ -29,7 +30,7 @@ QtObject {
property QtObject text: QtObject {
property color color: Colors.d
property int fontSize: 10
property int pointSize: Units.dp * 10
property int rightPadding: 10
}
}

View file

@ -2,6 +2,7 @@ pragma Singleton
import QtQuick 2.7
import Common 1.0
import Units 1.0
// =============================================================================
@ -11,7 +12,7 @@ QtObject {
property QtObject value: QtObject {
property QtObject placeholder: QtObject {
property color color: Colors.w
property int fontSize: 10
property int pointSize: Units.dp * 10
}
property QtObject text: QtObject {
@ -25,7 +26,7 @@ QtObject {
property QtObject text: QtObject {
property color color: Colors.j
property int fontSize: 9
property int pointSize: Units.dp * 9
property int width: 130
}
}

View file

@ -2,6 +2,7 @@ pragma Singleton
import QtQuick 2.7
import Common 1.0
import Units 1.0
// =============================================================================
@ -14,7 +15,7 @@ QtObject {
property QtObject legend: QtObject {
property color color: Colors.j
property int fontSize: 10
property int pointSize: Units.dp * 10
property int height: 36
property int width: 200
}

View file

@ -2,6 +2,7 @@ pragma Singleton
import QtQuick 2.7
import Common 1.0
import Units 1.0
// =============================================================================
@ -19,7 +20,7 @@ QtObject {
property QtObject title: QtObject {
property color color: Colors.i
property int fontSize: 12
property int pointSize: Units.dp * 12
}
}
}

View file

@ -2,6 +2,7 @@ pragma Singleton
import QtQuick 2.7
import Common 1.0
import Units 1.0
// =============================================================================
@ -15,7 +16,7 @@ QtObject {
property QtObject text: QtObject {
property color color: Colors.j
property int fontSize: 10
property int pointSize: Units.dp * 10
}
}
}

View file

@ -2,6 +2,7 @@ pragma Singleton
import QtQuick 2.7
import Common 1.0
import Units 1.0
// =============================================================================
@ -14,12 +15,12 @@ QtObject {
property QtObject error: QtObject {
property color color: Colors.error
property int fontSize: 10
property int pointSize: Units.dp * 10
property int height: 11
}
property QtObject legend: QtObject {
property color color: Colors.j
property int fontSize: 10
property int pointSize: Units.dp * 10
}
}

View file

@ -2,6 +2,7 @@ pragma Singleton
import QtQuick 2.7
import Common 1.0
import Units 1.0
// =============================================================================
@ -20,7 +21,7 @@ QtObject {
}
property QtObject text: QtObject {
property int fontSize: 9
property int pointSize: Units.dp * 9
property int height: 40
property int leftPadding: 10
property int rightPadding: 10

View file

@ -2,6 +2,7 @@ pragma Singleton
import QtQuick 2.7
import Common 1.0
import Units 1.0
// =============================================================================
@ -12,11 +13,11 @@ QtObject {
property QtObject placeholder: QtObject {
property color color: Colors.w
property int fontSize: 10
property int pointSize: Units.dp * 10
}
property QtObject text: QtObject {
property int fontSize: 10
property int pointSize: Units.dp * 10
property QtObject color: QtObject {
property color focused: Colors.l

View file

@ -2,6 +2,7 @@ pragma Singleton
import QtQuick 2.7
import Common 1.0
import Units 1.0
// =============================================================================
@ -28,7 +29,7 @@ QtObject {
}
property QtObject text: QtObject {
property int fontSize: 11
property int pointSize: Units.dp * 11
property QtObject color: QtObject {
property color normal: Colors.k50

View file

@ -2,6 +2,7 @@ pragma Singleton
import QtQuick 2.7
import Common 1.0
import Units 1.0
// =============================================================================
@ -20,7 +21,7 @@ QtObject {
property QtObject text: QtObject {
property color color: Colors.k
property int fontSize: 9
property int pointSize: Units.dp * 9
}
}
}

View file

@ -2,6 +2,7 @@ pragma Singleton
import QtQuick 2.7
import Common 1.0
import Units 1.0
// =============================================================================
@ -20,7 +21,7 @@ QtObject {
}
property QtObject text: QtObject {
property int fontSize: 10
property int pointSize: Units.dp * 10
property QtObject color: QtObject {
property color enabled: Colors.j

View file

@ -2,6 +2,7 @@ pragma Singleton
import QtQuick 2.7
import Common 1.0
import Units 1.0
// =============================================================================
@ -10,7 +11,7 @@ QtObject {
property color color: Colors.k
property int arrowSize: 8
property int delay: 1000
property int fontSize: 9
property int pointSize: Units.dp * 9
property int margins: 8
property int padding: 4
property int radius: 4

View file

@ -117,7 +117,7 @@ ToolTip {
id: text
color: TooltipStyle.color
font.pointSize: TooltipStyle.fontSize
font.pointSize: TooltipStyle.pointSize
padding: TooltipStyle.padding + TooltipStyle.margins
text: tooltip.text
}

View file

@ -54,7 +54,7 @@ Item {
color: AccountStatusStyle.username.color
elide: Text.ElideRight
font.bold: true
font.pointSize: AccountStatusStyle.username.fontSize
font.pointSize: AccountStatusStyle.username.pointSize
text: AccountSettingsModel.username
verticalAlignment: Text.AlignBottom
}
@ -63,7 +63,7 @@ Item {
Text {
color: AccountStatusStyle.sipAddress.color
elide: Text.ElideRight
font.pointSize: AccountStatusStyle.sipAddress.fontSize
font.pointSize: AccountStatusStyle.sipAddress.pointSize
height: parent.height / 2
text: AccountSettingsModel.sipAddress
verticalAlignment: Text.AlignTop

View file

@ -38,7 +38,7 @@ Column {
font {
bold: true
pointSize: CardBlockStyle.title.fontSize
pointSize: CardBlockStyle.title.pointSize
}
height: CardBlockStyle.title.height
@ -50,7 +50,7 @@ Column {
color: CardBlockStyle.description.color
elide: Text.ElideRight
font.pointSize: CardBlockStyle.description.fontSize
font.pointSize: CardBlockStyle.description.pointSize
horizontalAlignment: Text.AlignHCenter
wrapMode: Text.WordWrap

View file

@ -37,7 +37,7 @@ Item {
font {
italic: true
pointSize: RequestBlockStyle.error.fontSize
pointSize: RequestBlockStyle.error.pointSize
}
height: parent.height

View file

@ -62,7 +62,7 @@ Popup {
elide: Text.ElideRight
font {
pointSize: CallStatisticsStyle.key.fontSize
pointSize: CallStatisticsStyle.key.pointSize
bold: true
}
@ -77,7 +77,7 @@ Popup {
color: CallStatisticsStyle.value.color
elide: Text.ElideRight
font.pointSize: CallStatisticsStyle.value.fontSize
font.pointSize: CallStatisticsStyle.value.pointSize
text: modelData.value
}
@ -97,7 +97,7 @@ Popup {
font {
bold: true
pointSize: CallStatisticsStyle.title.fontSize
pointSize: CallStatisticsStyle.title.pointSize
}
elide: Text.ElideRight

View file

@ -96,7 +96,7 @@ Rectangle {
color: ChatStyle.sectionHeading.text.color
font {
bold: true
pointSize: ChatStyle.sectionHeading.text.fontSize
pointSize: ChatStyle.sectionHeading.text.pointSize
}
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
@ -163,7 +163,7 @@ Rectangle {
Layout.preferredWidth: ChatStyle.entry.time.width
color: ChatStyle.entry.time.color
font.pointSize: ChatStyle.entry.time.fontSize
font.pointSize: ChatStyle.entry.time.pointSize
text: $chatEntry.timestamp.toLocaleString(
Qt.locale(App.locale),

View file

@ -57,7 +57,7 @@ Row {
color: ChatStyle.entry.event.text.color
font {
bold: true
pointSize: ChatStyle.entry.event.text.fontSize
pointSize: ChatStyle.entry.event.text.pointSize
}
height: parent.height
text: qsTr(Utils.snakeToCamel(_type))

View file

@ -132,8 +132,8 @@ Row {
font {
bold: true
pointSize: $chatEntry.isOutgoing
? ChatStyle.entry.message.outgoing.text.fontSize
: ChatStyle.entry.message.incoming.text.fontSize
? ChatStyle.entry.message.outgoing.text.pointSize
: ChatStyle.entry.message.incoming.text.pointSize
}
text: $chatEntry.fileName

View file

@ -56,7 +56,7 @@ RowLayout {
backgroundColor: ChatStyle.entry.message.incoming.backgroundColor
color: ChatStyle.entry.message.incoming.text.color
fontSize: ChatStyle.entry.message.incoming.text.fontSize
pointSize: ChatStyle.entry.message.incoming.text.pointSize
ActionButton {
height: ChatStyle.entry.lineHeight

View file

@ -1,8 +1,9 @@
import QtQuick 2.7
import Clipboard 1.0
import Common 1.0
import Linphone 1.0
import Linphone.Styles 1.0
import TextToSpeech 1.0
import Utils 1.0
import 'Message.js' as Logic
@ -16,7 +17,7 @@ Item {
property alias backgroundColor: rectangle.color
property alias color: message.color
property alias fontSize: message.font.pointSize
property alias pointSize: message.font.pointSize
default property alias _content: content.data

View file

@ -23,7 +23,7 @@ Item {
}
backgroundColor: ChatStyle.entry.message.outgoing.backgroundColor
color: ChatStyle.entry.message.outgoing.text.color
fontSize: ChatStyle.entry.message.outgoing.text.fontSize
pointSize: ChatStyle.entry.message.outgoing.text.pointSize
width: parent.width
Row {

View file

@ -7,5 +7,5 @@ import Linphone.Styles 1.0
Text {
color: CodecsViewerStyle.attribute.text.color
elide: Text.ElideRight
font.pointSize: CodecsViewerStyle.attribute.text.fontSize
font.pointSize: CodecsViewerStyle.attribute.text.pointSize
}

View file

@ -10,6 +10,6 @@ Text {
font {
bold: true
pointSize: CodecsViewerStyle.legend.fontSize
pointSize: CodecsViewerStyle.legend.pointSize
}
}

View file

@ -60,7 +60,7 @@ Item {
width = parent.width / AvatarStyle.initials.ratio
}
return AvatarStyle.initials.fontSize * (width || 1)
return AvatarStyle.initials.pointSize * (width || 1)
}
text: _computeInitials()

View file

@ -19,7 +19,7 @@ Column {
color: usernameColor
elide: Text.ElideRight
font.bold: true
font.pointSize: ContactDescriptionStyle.username.fontSize
font.pointSize: ContactDescriptionStyle.username.pointSize
height: parent.height / 2
horizontalAlignment: horizontalTextAlignment
verticalAlignment: Text.AlignBottom
@ -31,7 +31,7 @@ Column {
color: sipAddressColor
elide: Text.ElideRight
font.pointSize: ContactDescriptionStyle.sipAddress.fontSize
font.pointSize: ContactDescriptionStyle.sipAddress.pointSize
height: parent.height / 2
horizontalAlignment: horizontalTextAlignment
verticalAlignment: Text.AlignTop

View file

@ -34,7 +34,7 @@ Item {
Text {
anchors.centerIn: parent
color: MessagesCounterStyle.text.color
font.pointSize: MessagesCounterStyle.text.fontSize
font.pointSize: MessagesCounterStyle.text.pointSize
text: messagesCounter.count
}
}

View file

@ -91,7 +91,7 @@ Item {
color: SipAddressesMenuStyle.entry.text.color
elide: Text.ElideRight
font.pointSize: SipAddressesMenuStyle.entry.text.fontSize
font.pointSize: SipAddressesMenuStyle.entry.text.pointSize
height: parent.height
text: $sipAddress
verticalAlignment: Text.AlignVCenter

View file

@ -49,7 +49,7 @@ Notification {
color: NotificationNewVersionAvailableStyle.message.color
elide: Text.ElideRight
wrapMode: Text.Wrap
font.pointSize: NotificationNewVersionAvailableStyle.message.fontSize
font.pointSize: NotificationNewVersionAvailableStyle.message.pointSize
text: notificationData.message
}
}

View file

@ -50,7 +50,7 @@ Notification {
color: NotificationReceivedFileMessageStyle.fileName.color
elide: Text.ElideRight
font.pointSize: NotificationReceivedFileMessageStyle.fileName.fontSize
font.pointSize: NotificationReceivedFileMessageStyle.fileName.pointSize
text: Utils.basename(notification._fileUri)
}
@ -59,7 +59,7 @@ Notification {
color: NotificationReceivedFileMessageStyle.fileSize.color
elide: Text.ElideRight
font.pointSize: NotificationReceivedFileMessageStyle.fileSize.fontSize
font.pointSize: NotificationReceivedFileMessageStyle.fileSize.pointSize
horizontalAlignment: Text.AlignRight
text: Utils.formatSize(notification.notificationData.fileSize)
}

Some files were not shown because too many files have changed in this diff Show more