Commit 12023c3c authored by Jenkins's avatar Jenkins

Updated version 0.7+git20190208 from 'upstream/0.7+git20190208'

with Debian dir dca312261881ed05dfbe3f84255396cae1f5ef56
parents 55ea7a2f 3c46aabd
{
"phabricator.uri" : "https://phabricator.kde.org/"
}
build
*.config
*.creator
*.files
*.includes
*.user
project(plasma-phone-components)
# minimal requirements
cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR)
set (QT_MIN_VERSION "5.2.0")
set(KF5_MIN_VERSION "5.0.0")
set(CMAKE_AUTOMOC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
find_package(ECM 0.0.9 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_SOURCE_DIR}/cmake)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings)
include(ECMOptionalAddSubdirectory)
include(ECMInstallIcons)
include(ECMSetupVersion)
include(ECMMarkNonGuiExecutable)
include(ECMGenerateHeaders)
include(GenerateExportHeader)
include(FeatureSummary)
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED Core Gui Widgets Qml Quick Test)
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS Plasma Service Declarative I18n KIO People)
find_package(KF5 REQUIRED COMPONENTS PlasmaQuick DBusAddons Notifications)
find_package(TelepathyQt5 REQUIRED)
find_package(KF5Wayland CONFIG)
set_package_properties(KF5Wayland PROPERTIES
TYPE REQUIRED
PURPOSE "Required for interacting with the compositor")
# torch
find_package(GStreamer 1.1.90 REQUIRED)
find_package(GLIB2 REQUIRED)
find_package(GObject REQUIRED)
include(CheckIncludeFiles)
plasma_install_package(look-and-feel org.kde.plasma.phone look-and-feel)
plasma_install_package(shell org.kde.plasma.phone shells)
install(DIRECTORY wallpaper/ DESTINATION "${WALLPAPER_INSTALL_DIR}/org.kde.plasma.phone.lockers")
#kpackage_install_package(phonebook org.kde.phone.phonebook genericqml)
#install(FILES phonebook/metadata.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} RENAME org.kde.phone.phonebook.desktop)
install( DIRECTORY kwinmultitasking/ DESTINATION ${DATA_INSTALL_DIR}/kwin/scripts/org.kde.phone.multitasking )
install( FILES kwinmultitasking/metadata.desktop DESTINATION ${SERVICES_INSTALL_DIR} RENAME kwin-script-org.kde.phone.multitasking.desktop )
install( DIRECTORY qtvirtualkeyboardplugin/ DESTINATION ${KDE_INSTALL_QMLDIR}/QtQuick/VirtualKeyboard/Styles/Plasma )
configure_file(plasma-mobile.desktop.cmake ${CMAKE_CURRENT_BINARY_DIR}/plasma-mobile.desktop)
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/plasma-mobile.desktop
DESTINATION ${KDE_INSTALL_DATADIR}/wayland-sessions
)
add_subdirectory(bin)
#add_subdirectory(services)
add_subdirectory(applets)
add_subdirectory(containments)
add_subdirectory(components)
add_subdirectory(dialer)
add_subdirectory(sounds)
#add_subdirectory(touchscreentest)
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
This diff is collapsed.
This diff is collapsed.
plasma-phone-components
=======================
UI components for Plasma Phone
Test on a development machine
=======================
Dependencies:
* KDE Frameworks 5 setup (plasma-framework and its dependencies)
* oFono https://git.kernel.org/cgit/network/ofono/ofono.git
* voicecall https://github.com/nemomobile/voicecall
* libqofono https://github.com/nemomobile/libqofono
* ofono-phonesim https://git.kernel.org/cgit/network/ofono/phonesim.git/
* qml contextkit plugin https://github.com/nemomobile/nemo-qml-plugin-contextkit FIXME: ContextKit is deprecated, battery status should be ported to something else
Phonesim will add a fake phone modem, that can be controlled via a Qt based user interface from
which it will be possible to test various aspects of the phone UI: making calls, receiving, signal strength,
send SMS and so on. It will not generate any real call, but only make the UI think a SIM is working and that
a phone call is in progress.
A tutorial how to start phonesim on a desktop system can be found here:
http://comments.gmane.org/gmane.comp.handhelds.ofono/12178
* edit /etc/ofono/phonesim.conf, uncomment everything so that it looks like
```
[phonesim]
Driver=phonesim
Address=127.0.0.1
Port=12345
```
* start ofonod as root
* start phonesim:
`phonesim -p 12345 -gui /usr/share/phonesim/default.xml`
* from the oFono *source* directory, call `./test/enable-modem` to bring the modem up, the control UI should come up
* call `./test/online-modem` to activate the test phonesim modem
* start plasma with plasmashell -w -p org.kde.plasma.phone to start the phone homescreen in a window
Note that the oFono/phonesim part is necessary only if it's needed to test some part specific to telephony
plasma_install_package(activities org.kde.phone.activities)
plasma_install_package(clock org.kde.phone.clock)
plasma_install_package(notifications org.kde.phone.notifications)
#! /usr/bin/env bash
$EXTRACTRC `find . -name \*.rc -o -name \*.ui -o -name \*.kcfg` >> rc.cpp
$XGETTEXT `find . -name \*.js -o -name \*.qml -o -name \*.cpp` -o $podir/plasma_applet_org.kde.phone.activities.pot
rm -f rc.cpp
/*
* Copyright 2016 Marco Martin <notmart@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2, 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 Library General Public License for more details
*
* You should have received a copy of the GNU Library 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.
*/
import QtQuick 2.5
import QtQuick.Layouts 1.1
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.activities 0.1 as Activities
ColumnLayout {
PlasmaComponents.ToolButton {
id: newButton
Layout.fillWidth: true
text: i18n("New Activity...")
onClicked: {
newEdit.visible = true;
newEdit.forceActiveFocus();
}
PlasmaComponents.TextField {
id: newEdit
visible: false
width: parent.width
onFocusChanged: {
if (!focus) {
visible = false
}
}
onAccepted: {
if (text != "") {
activityModel.addActivity(text, function(id) {
visible = false;
activityModel.setCurrentActivity(id, function() {
plasmoid.expanded = false;
});
});
}
}
}
}
MouseArea {
id: rootMouseArea
Layout.fillWidth: true
Layout.fillHeight: true
drag.filterChildren: true
onClicked: newEdit.visible = false
ListView {
id: listView
anchors.fill: parent
model: Activities.ActivityModel {
id: activityModel
}
delegate: MouseArea {
id: delegate
preventStealing: true
drag {
target: listView.count > 0 ? delegate : null
axis: Drag.XAxis
}
PlasmaComponents.Highlight {
visible: model.current
anchors.fill:parent
}
Connections {
target: rootMouseArea
onClicked: {
if (!delegate.contains(rootMouseArea.mapToItem(delegate, mouse.x, mouse.y))) {
edit.visible = false;
}
}
}
Connections {
target: newButton
onClicked: edit.visible = false;
}
SequentialAnimation {
id: positionAnim
property alias to: xAnim.to
XAnimator {
id: xAnim
target: delegate
from: delegate.x
duration: units.longDuration
easing.type: Easing.InOutQuad
}
ScriptAction {
script: {
if (delegate.x < -delegate.width/2 || delegate.x > delegate.width/2) {
activityModel.removeActivity(model.id, function() {});
}
}
}
}
width: listView.width
height: Math.max(label.height, label.height)
onClicked: {
listView.currentIndex = index;
activityModel.startActivity(model.id, function() {
activityModel.setCurrentActivity(model.id, function() {
plasmoid.expanded = false;
});
});
}
onPressAndHold: {
edit.visible = true
edit.focus = true
}
onReleased: {
if (edit.visible) {
edit.focus = true
edit.forceActiveFocus()
}
if (delegate.x < -delegate.width/2) {
positionAnim.to = -delegate.width;
} else if (delegate.x > delegate.width/2) {
positionAnim.to = delegate.width;
} else {
positionAnim.to = 0;
}
positionAnim.running = true;
}
PlasmaComponents.Label {
id: label
text: model.name
anchors.verticalCenter: parent.verticalCenter
x: units.smallSpacing
}
PlasmaComponents.TextField {
id: edit
visible: false
text: model.name
width: parent.width
onFocusChanged: {
if (!focus) {
visible = false
}
}
onAccepted: {
if (text != "") {
activityModel.setActivityName(model.id, text, function() {visible = false});
}
}
}
}
}
}
}
[Desktop Entry]
Encoding=UTF-8
Name=Phone Activities
Name[ca]=Activitats del telèfon
Name[ca@valencia]=Activitats del telèfon
Name[cs]=Aktivity telefonu
Name[de]=Telefonaktivitäten
Name[en_GB]=Phone Activities
Name[es]=Actividades del teléfono
Name[fi]=Puhelinaktiviteetit
Name[fr]=Activités du téléphone
Name[gl]=Actividades de teléfono
Name[it]=Attività del telefono
Name[nl]=Telefoonactiviteiten
Name[nn]=Telefonaktivitetar
Name[pl]=Aktywności telefonu
Name[pt]=Actividades do Telefone
Name[sv]=Telefonaktiviteter
Name[tr]=Telefon Etkinlikleri
Name[uk]=Простори дій телефону
Name[x-test]=xxPhone Activitiesxx
Name[zh_CN]=手机活动
Name[zh_TW]=手機活動
Comment=Activity switcher for the phone
Comment[ca]=Commutador de l'activitat per al telèfon
Comment[ca@valencia]=Commutador de l'activitat per al telèfon
Comment[cs]=Přepínač aktivit pro telefon
Comment[en_GB]=Activity switcher for the phone
Comment[es]=Selector de actividad para el teléfono
Comment[fi]=Akviteettivaihtaja puhelimeen
Comment[fr]=Gestionnaire d'activités pour téléphone
Comment[gl]=Cambiador de actividade para o teléfono.
Comment[it]=Selettore di attività per il telefono
Comment[nl]=Omschakelaar van telefoonactiviteiten
Comment[nn]=Aktivitetsbytar for telefon
Comment[pl]=Przełącznik aktywności dla tego telefonu
Comment[pt]=Selector de actividades do telefone
Comment[sv]=Aktivitetsbyte för telefonen
Comment[tr]=Telefon için etkinlik değiştirici
Comment[uk]=Перемикач дій для телефону
Comment[x-test]=xxActivity switcher for the phonexx
Comment[zh_CN]=手机的活动切换器
Comment[zh_TW]=手機的活動切換器
Icon=preferences-activities
Type=Service
X-KDE-ParentApp=
X-KDE-PluginInfo-Author=Marco Martin
X-KDE-PluginInfo-Email=mart@kde.org
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-Name=org.kde.phone.activities
X-KDE-PluginInfo-Version=1.0
X-KDE-PluginInfo-Website=plasma.kde.org
X-KDE-ServiceTypes=Plasma/Applet
X-Plasma-API=declarativeappletscript
X-KDE-PluginInfo-Category=Activities
X-Plasma-Provides=org.kde.plasma.activities
X-Plasma-MainScript=ui/main.qml
X-Plasma-RemoteLocation=
#! /usr/bin/env bash
$EXTRACTRC `find . -name \*.rc -o -name \*.ui -o -name \*.kcfg` >> rc.cpp
$XGETTEXT `find . -name \*.js -o -name \*.qml -o -name \*.cpp` -o $podir/plasma_applet_org.kde.phone.clock.pot
rm -f rc.cpp
/*
* Copyright 2014 Aaron Seigo <aseigo@kde.org>
* Copyright 2015 Marco Martin <notmart@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2, 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 Library General Public License for more details
*
* You should have received a copy of the GNU Library 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.
*/
import QtQuick 2.1
import QtQuick.Layouts 1.1
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents
PlasmaComponents.Label {
id: bigClock
PlasmaCore.DataSource {
id: timeSource
engine: "time"
connectedSources: ["Local"]
interval: 60 * 1000
}
Layout.minimumWidth: implicitWidth
Layout.minimumHeight: implicitHeight
text: Qt.formatTime(timeSource.data.Local.DateTime, "hh:mm")
color: PlasmaCore.ColorScope.textColor
horizontalAlignment: Qt.AlignHCenter
verticalAlignment: Qt.AlignVCenter
font.pointSize: 40
style: Text.Raised
styleColor: "black"
}
[Desktop Entry]
Encoding=UTF-8
Name=Clock
Name[ca]=Rellotge
Name[ca@valencia]=Rellotge
Name[cs]=Hodiny
Name[de]=Uhr
Name[el]=Ρολόι
Name[en_GB]=Clock
Name[es]=Reloj
Name[fi]=Kello
Name[fr]=Horloge
Name[gl]=Reloxo
Name[it]=Orologio
Name[nl]=Klok
Name[nn]=Klokke
Name[pl]=Zegar
Name[pt]=Relógio
Name[ru]=Часы
Name[sv]=Klocka
Name[tr]=Saat
Name[uk]=Годинник
Name[x-test]=xxClockxx
Name[zh_CN]=时钟
Name[zh_TW]=時鐘
Comment=Time displayed in a digital format
Comment[ca]=Mostra l'hora en un format digital
Comment[ca@valencia]=Mostra l'hora en un format digital
Comment[cs]=Čas zobrazený v digitální podobě
Comment[de]=Zeigt die Uhrzeit in digitaler Form an.
Comment[en_GB]=Time displayed in a digital format
Comment[es]=La hora mostrada en formato digital
Comment[fi]=Aika näytettynä digitaalimuodossa
Comment[fr]=Heure affichée dans un format numérique
Comment[gl]=A hora mostrada nun formato dixital.
Comment[it]=Ora visualizzata in un formato digitale
Comment[nl]=De tijd getoond in een digitaal formaat
Comment[nn]=Klokka vist i digitalformat
Comment[pl]=Wyświetla czas w formacie cyfrowym
Comment[pt]=A hora apresentada num formato digital
Comment[sv]=Tid visad med digitalformat
Comment[tr]=Saati, sayısal biçimde göster
Comment[uk]=Час, показаний у цифровому форматі
Comment[x-test]=xxTime displayed in a digital formatxx
Comment[zh_CN]=已数字格式显示时间
Comment[zh_TW]=以數位格式顯示時間
Icon=preferences-system-time
Type=Service
X-KDE-ParentApp=
X-KDE-PluginInfo-Author=Marco Martin
X-KDE-PluginInfo-Email=mart@kde.org
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-Name=org.kde.phone.clock
X-KDE-PluginInfo-Version=1.0
X-KDE-PluginInfo-Website=plasma.kde.org
X-KDE-ServiceTypes=Plasma/Applet
X-Plasma-API=declarativeappletscript
X-KDE-PluginInfo-Category=Date and Time
X-Plasma-Provides=org.kde.plasma.time
X-Plasma-MainScript=ui/main.qml
X-Plasma-RemoteLocation=
#! /usr/bin/env bash
$EXTRACTRC `find . -name \*.rc -o -name \*.ui -o -name \*.kcfg` >> rc.cpp
$XGETTEXT `find . -name \*.qml` -L Java -o $podir/plasma_applet_org.kde.phone.notifications.pot
$XGETTEXT rc.cpp -jo $podir/plasma_applet_org.kde.phone.notifications.pot
rm -f rc.cpp
/*
* Copyright 2014 Aaron Seigo <aseigo@kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2, 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 Library General Public License for more details
*
* You should have received a copy of the GNU Library 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.
*/
import QtQuick 2.4
import QtQuick.Layouts 1.1
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents
MouseArea {
id: notificationItem
//actionsLayout.height*2 because the text is centered
//TODO: center the whole block not only the text
height: Math.max(units.gridUnit * 3, Math.max(messageLayout.height, icon.height)) + (expanded ? actionsLayout.height*2 : 0)
width: parent.width
anchors.bottomMargin: 10
drag.axis: Drag.XAxis
drag.target: notificationItem
property bool expanded: false
property string source: model.source
property var actions: model.actions
opacity: 1 - Math.abs(x) / (width/2)
Behavior on x {
NumberAnimation {
easing.type: Easing.InOutQuad
duration: units.longDuration
}
}
Behavior on height {
NumberAnimation {
easing.type: Easing.InOutQuad
duration: units.longDuration
}
}
onReleased: {
if (drag.active) {
if (x > width / 4 || x < width / -4) {
//if there is an action, execute the first when swiping left
if (x < 0 && actions) {
var action = actions.get(0);
if (action) {
root.executeAction(source, action.id)
}
}
notificationsModel.remove(index);
} else {
x = 0;
}
} else if (body || actions) {
expanded = !expanded;
}
}
Rectangle {
id: background
anchors.fill: parent
color: Qt.rgba(PlasmaCore.ColorScope.textColor.r, PlasmaCore.ColorScope.textColor.g, PlasmaCore.ColorScope.textColor.b, notificationItem.pressed ? 0.5 : 0.2)
}
PlasmaComponents.ToolButton {
id: closeButton
anchors {
right: parent.right
verticalCenter: parent.verticalCenter
rightMargin: units.gridUnit
}
iconSource: "window-close"
flat: false
onClicked: {
notificationsModel.remove(index);
}
}
ColumnLayout {
id: messageLayout
anchors {
verticalCenter: parent.verticalCenter
left: icon.right
right: notificationItem.expanded ? actionsLayout.left : closeButton.left
leftMargin: units.gridUnit
rightMargin: units.gridUnit
}
PlasmaComponents.Label {
id: summaryLabel
Layout.fillWidth: true
verticalAlignment: Qt.AlignVCenter
text: model.appName + " " + summary
elide: Text.ElideRight
}
PlasmaComponents.Label {
id: bodyLabel
Layout.fillWidth: true
visible: text.length > 0
opacity: 0.8
verticalAlignment: Qt.AlignVCenter
text: body
wrapMode: Text.WordWrap
}
}
PlasmaCore.IconItem {
id: icon
anchors {
verticalCenter: parent.verticalCenter
}
x: units.gridUnit
width: units.iconSizes.medium
height: width
source: appIcon && appIcon.length > 0 ? appIcon : "preferences-desktop-notification"
colorGroup: PlasmaCore.ColorScope.colorGroup
}
Column {
id: actionsLayout
anchors {
right: closeButton.left
rightMargin: units.gridUnit
verticalCenter: parent.verticalCenter
}
opacity: notificationItem.expanded && notificationItem.actions && notificationItem.actions.count > 0 ? 1 : 0
Behavior on opacity {
NumberAnimation {