[-]
[+]
|
Changed |
_service:tar_git:glacier-dialer.changes
|
|
[-]
[+]
|
Changed |
_service:tar_git:glacier-dialer.spec
^
|
|
|
Changed |
_service
^
|
[-]
[+]
|
Deleted |
_service:tar_git:glacier-dialer-0.0.2.tar.bz2/qml/pages/DialerButton.qml
^
|
@@ -1,86 +0,0 @@
-/*
- * Copyright 2014 Aleksi Suomalainen <suomalainen.aleksi@gmail.com>
- *
- * This library 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 of the License, or (at your option) any later version.
- *
- * This library 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 library; see the file COPYING.LIB. 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.Controls 1.0
-import QtQuick.Controls.Nemo 1.0
-import QtQuick.Controls.Styles.Nemo 1.0
-import QtQuick.Layouts 1.0
-import org.nemomobile.contacts 1.0
-
-Rectangle {
- id: btn
- Layout.fillWidth: true
- Layout.fillHeight: true
- Layout.preferredHeight: 140
- Layout.preferredWidth: 140
- color: "transparent"
- property int index
- property string text: {
- if (index <= 8) {
- return "" + (index + 1)
- }
-
- if (index > 8) {
- switch(index) {
- case 9: return "+";
- case 10: return "0";
- case 11: return "*";
- }
- }
- }
- property Person person
- onPersonChanged: {
- person.avatarPathChanged.connect(avatarPotentiallyChanged)
- avatarPotentiallyChanged()
- }
- function avatarPotentiallyChanged() {
- if (person == null || person.avatarPath == "image://theme/icon-m-telephony-contact-avatar")
- contactImage.source = "image://theme/icon-m-telephony-contact-avatar"
- else
- contactImage.source = person.avatarPath
- }
- Image {
- id: contactImage
- anchors.fill: parent
- }
-
- Text {
- id: numberText
- color: "steelblue"
- font.pointSize: 72
- anchors.right: parent.right
- anchors.bottom: parent.bottom
- font.bold: true
- text: btn.text
- style: Text.Outline
- styleColor : "black"
- }
-
- MouseArea {
- anchors.fill: parent
- onClicked: {
- dialedNumber.insert(dialedNumber.cursorPosition,btn.text)
- }
- onPressAndHold: {
- var normalizedNumber = person.phoneDetails[0].normalizedNumber
- telephone.dial(telephone.defaultProviderId, normalizedNumber)
- }
- }
-}
|
[-]
[+]
|
Deleted |
_service:tar_git:glacier-dialer-0.0.2.tar.bz2/qml/pages/LogDelegate.qml
^
|
@@ -1,64 +0,0 @@
-/*
- * Copyright 2014 Aleksi Suomalainen <suomalainen.aleksi@gmail.com>
- *
- * This library 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 of the License, or (at your option) any later version.
- *
- * This library 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 library; see the file COPYING.LIB. 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.Controls 1.0
-import QtQuick.Controls.Nemo 1.0
-import QtQuick.Controls.Styles.Nemo 1.0
-import org.nemomobile.contacts 1.0
-import org.nemomobile.commhistory 1.0
-import QtQuick.Layouts 1.0
-
-Item {
- id: root
- width: parent.width
- height: 72
- property Person contact
- RowLayout {
- anchors.fill: parent
- spacing: 10
- Label {
- id: directionLabel
- Layout.fillWidth: true
- Layout.fillHeight: true
- text: model.isMissedCall ? 'missed' : (model.direction == CommCallModel.Inbound ? 'received' : 'initiated')
- }
- Label {
- id: contactLabel
- Layout.fillWidth: true
- Layout.fillHeight: true
- text: contact ? contact.displayLabel.substring(0,10): model.remoteUid
- }
- Label {
- id: dateLabel
- Layout.fillWidth: true
- Layout.fillHeight: true
- text: Qt.formatDateTime(model.startTime, Qt.DefaultLocaleShortDate)
- }
- }
- MouseArea {
- anchors.fill: parent
- onClicked: {
- telephone.dial(telephone.defaultProviderId, model.remoteUid)
- }
- onPressAndHold: {
- commCallModel.deleteAt(model.index)
- }
- }
-}
|
[-]
[+]
|
Changed |
_service:tar_git:glacier-dialer-0.2.tar.bz2/glacier-dialer.desktop
^
|
@@ -6,7 +6,7 @@
Name=Glacier Dialer
X-MeeGo-Logical-Id=voicecall-ap-name
X-MeeGo-Translation-Catalog=voicecall
-Exec=env QT_QUICK_CONTROLS_STYLE=Nemo /usr/bin/glacier-dialer
+Exec=invoker --type=nemomobile -s /usr/bin/glacier-dialer
Icon=icon-app-dialer
X-Window-Icon=
X-HildonDesk-ShowInToolbar=true
|
[-]
[+]
|
Changed |
_service:tar_git:glacier-dialer-0.2.tar.bz2/glacier-dialer.pro
^
|
@@ -4,21 +4,23 @@
SOURCES += src/glacier-dialer.cpp \
src/dbusadaptor.cpp
+LIBS += -lglacierapp
+
HEADERS += src/dbusadaptor.h
OTHER_FILES += qml/glacier-dialer.qml \
qml/pages/FirstPage.qml \
- rpm/glacier-dialer.spec \
- glacier-dialer.desktop \
- qml/pages/DialerButton.qml \
- org.glacier.voicecall.ui.service \
qml/pages/CallLogPage.qml \
- qml/pages/LogDelegate.qml \
qml/pages/CallView.qml \
qml/pages/DialerPage.qml \
qml/pages/ContactsPage.qml \
qml/pages/ContactDelegate.qml \
- qml/pages/ContactDetails.qml
+ qml/pages/ContactDetails.qml \
+ qml/components/DialerButton.qml \
+ qml/components/LogDelegate.qml \
+ rpm/glacier-dialer.spec \
+ glacier-dialer.desktop \
+ org.glacier.voicecall.ui.service
target.path = /usr/bin
@@ -28,17 +30,8 @@
qml.files = qml/glacier-dialer.qml
qml.path = /usr/share/glacier-dialer/qml
-pages.files = qml/pages/FirstPage.qml \
- qml/pages/SecondPage.qml \
- qml/pages/DialerButton.qml \
- qml/pages/CallLogPage.qml \
- qml/pages/LogDelegate.qml \
- qml/pages/CallView.qml \
- qml/pages/DialerPage.qml \
- qml/pages/ContactsPage.qml \
- qml/pages/ContactDelegate.qml \
- qml/pages/ContactDetails.qml
-pages.path = /usr/share/glacier-dialer/qml/pages
+pages.files = qml
+pages.path = /usr/share/glacier-dialer/
systemd_dbus_service.path = $${INSTALL_ROOT}/usr/share/dbus-1/services
systemd_dbus_service.files = org.glacier.voicecall.ui.service
@@ -47,3 +40,6 @@
systemd_ui_prestart_service.files = voicecall-ui-prestart.service
INSTALLS += target desktop qml pages systemd_dbus_service systemd_ui_prestart_service
+
+CONFIG += link_pkgconfig
+PKGCONFIG += glacierapp
|
[-]
[+]
|
Changed |
_service:tar_git:glacier-dialer-0.2.tar.bz2/org.glacier.voicecall.ui.service
^
|
@@ -1,3 +1,3 @@
[D-BUS Service]
Name=org.glacier.voicecall.ui
-Exec=/usr/bin/glacier-dialer -prestart
+Exec=/usr/bin/glacier-dialer --prestart
|
[-]
[+]
|
Added |
_service:tar_git:glacier-dialer-0.2.tar.bz2/qml/components/DialerButton.qml
^
|
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2014 Aleksi Suomalainen <suomalainen.aleksi@gmail.com>
+ *
+ * This library 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 of the License, or (at your option) any later version.
+ *
+ * This library 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 library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+*/
+
+import QtQuick 2.6
+import QtQuick.Controls 1.0
+import QtQuick.Controls.Nemo 1.0
+import QtQuick.Controls.Styles.Nemo 1.0
+
+import org.nemomobile.contacts 1.0
+
+Rectangle {
+ id: btn
+
+ color: "transparent"
+
+ radius: height/2
+
+ property int index
+ property string text: {
+ if (index <= 8) {
+ return "" + (index + 1)
+ }
+
+ if (index > 8) {
+ switch(index) {
+ case 9: return "*";
+ case 10: return "0";
+ case 11: return "#";
+ }
+ }
+ }
+
+ Text {
+ id: numberText
+ color: Theme.textColor
+ font.pointSize: 72
+ anchors.centerIn: parent
+ font.bold: true
+ text: btn.text
+ style: Text.Outline
+ styleColor : "black"
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ dialedNumber.insert(dialedNumber.cursorPosition,btn.text)
+ btn.color = Theme.accentColor
+ }
+ onPressAndHold: {
+
+ }
+ onReleased: {
+ btn.color = Theme.backgroundColor
+ }
+ }
+}
|
[-]
[+]
|
Added |
_service:tar_git:glacier-dialer-0.2.tar.bz2/qml/components/LogDelegate.qml
^
|
@@ -0,0 +1,116 @@
+/*
+ * Copyright 2014 Aleksi Suomalainen <suomalainen.aleksi@gmail.com>
+ *
+ * This library 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 of the License, or (at your option) any later version.
+ *
+ * This library 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 library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+*/
+
+import QtQuick 2.6
+import QtQuick.Controls 1.0
+import QtQuick.Controls.Nemo 1.0
+import QtQuick.Controls.Styles.Nemo 1.0
+import org.nemomobile.contacts 1.0
+import org.nemomobile.commhistory 1.0
+
+
+Item {
+ id: root
+ width: parent.width
+ height: Theme.itemHeightExtraLarge
+ property Person contact
+
+ Image{
+ id: callRoute
+ width: parent.height*0.8
+ height: width
+ source: "image://theme/phone"
+ anchors{
+ left: parent.left
+ leftMargin: parent.height*0.1
+ top: parent.top
+ topMargin: parent.height*0.1
+ }
+ }
+
+ /*Label {
+ id: directionLabel
+ Layout.fillWidth: true
+ Layout.fillHeight: true
+ text: model.isMissedCall ? qsTr('missed') : (model.direction == CommCallModel.Inbound ? qsTr('received') : qsTr('initiated'))
+ }*/
+
+ Label {
+ id: contactLabel
+ text: contact ? contact.displayLabel.substring(0,10): model.remoteUid
+ anchors{
+ left: callRoute.right
+ leftMargin: parent.height*0.1
+ verticalCenter: parent.verticalCenter
+ }
+ width: parent.width-callRoute.width-dateLabel.width-parent.height*0.4
+ }
+ Label {
+ id: dateLabel
+ text: refreshTimestamp(model.startTime)
+ anchors{
+ right: parent.right
+ leftMargin: parent.height*0.1
+ verticalCenter: parent.verticalCenter
+ }
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ telephone.dial(telephone.defaultProviderId, model.remoteUid)
+ }
+ onPressAndHold: {
+ commCallModel.deleteAt(model.index)
+ }
+ }
+
+ function refreshTimestamp(time) {
+ var timeAgo;
+
+ var seconds = Math.floor((new Date() - time) / 1000)
+ var years = Math.floor(seconds / (365*24*60*60))
+ var months = Math.floor(seconds / (30*24*60*60))
+ var days = Math.floor(seconds / (24*60*60))
+ var hours = Math.floor(seconds / (60*60))
+ var minutes = Math.floor(seconds / 60)
+
+ if (months >= 1) {
+ timeAgo = qsTr("long time ago")
+ }else if (days >= 1) {
+ if (days > 1) {
+ timeAgo = days + " " + qsTr("days ago")
+ } else {
+ timeAgo = days + " " + qsTr("day ago")
+ }
+ }else if (hours >= 1) {
+ if (hours > 1) {
+ timeAgo = hours + " " + qsTr("hours ago")
+ } else {
+ timeAgo = hours + " " + qsTr("hour ago")
+ }
+ } else if (minutes >= 1) {
+ timeAgo = minutes + " " + qsTr("min ago")
+
+ } else {
+ timeAgo = qsTr("Just now")
+ }
+ return timeAgo;
+ }
+}
|
[-]
[+]
|
Changed |
_service:tar_git:glacier-dialer-0.2.tar.bz2/qml/glacier-dialer.qml
^
|
@@ -17,7 +17,7 @@
* Boston, MA 02110-1301, USA.
*/
-import QtQuick 2.1
+import QtQuick 2.6
import QtQuick.Window 2.1
import QtQuick.Controls 1.0
import QtQuick.Controls.Nemo 1.0
@@ -53,7 +53,6 @@
},
"immediate": true
})
- __window.setTitle("Dialer")
if(!__window.visible)
{
main.activationReason = "activeVoiceCallChanged"
|
[-]
[+]
|
Changed |
_service:tar_git:glacier-dialer-0.2.tar.bz2/qml/pages/CallLogPage.qml
^
|
@@ -1,5 +1,6 @@
/*
* Copyright 2014 Aleksi Suomalainen <suomalainen.aleksi@gmail.com>
+ * Copyright 2018 Chupligin Sergey <neochapay@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -17,7 +18,7 @@
* Boston, MA 02110-1301, USA.
*/
-import QtQuick 2.1
+import QtQuick 2.6
import QtQuick.Controls 1.0
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
@@ -25,12 +26,23 @@
import org.nemomobile.contacts 1.0
import org.nemomobile.commhistory 1.0
+import "../components"
+
Page {
id: callLogPage
headerTools: HeaderToolsLayout {
id: tools
- title: "Call log"
+ title: qsTr("Call log")
showBackButton: true;
+
+ tools: [
+ ToolButton {
+ iconSource: "image://theme/check"
+ onClicked: {
+ commCallModel.markAllRead()
+ }
+ }
+ ]
}
ListView {
|
[-]
[+]
|
Changed |
_service:tar_git:glacier-dialer-0.2.tar.bz2/qml/pages/CallView.qml
^
|
@@ -1,6 +1,6 @@
/*
* Copyright 2014 Aleksi Suomalainen <suomalainen.aleksi@gmail.com>
- *
+ * Copyright 2018 Chupligin Sergey <neochapay@gmail.com>
* This library 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
@@ -16,7 +16,7 @@
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
-import QtQuick 2.1
+import QtQuick 2.6
import QtQuick.Controls 1.0
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
@@ -28,7 +28,7 @@
id: call
headerTools: HeaderToolsLayout {
id: tools
- title: "Call"
+ title: qsTr("Call")
}
state: telephone.activeVoiceCall ? telephone.activeVoiceCall.statusText : 'disconnected'
states: [
@@ -48,7 +48,7 @@
anchors.horizontalCenter: parent.horizontalCenter
source: main.activeVoiceCallPerson
? main.activeVoiceCallPerson.avatarPath
- : 'image://theme/icon-m-telephony-contact-avatar';
+ : 'image://theme/user';
Layout.fillWidth: false
Layout.fillHeight: false
Layout.preferredHeight: 280
@@ -59,10 +59,10 @@
width:parent.width; height:paintedHeight
horizontalAlignment: Text.Center
anchors.horizontalCenter: parent.horizontalCenter
- font.pointSize: 56
- color: "white"
+ font.pointSize: Theme.fontWeightLarge
+ color: Theme.textColor
- text:main.activeVoiceCallPerson
+ text: main.activeVoiceCallPerson
? main.activeVoiceCallPerson.displayLabel
: (telephone.activeVoiceCall ? telephone.activeVoiceCall.lineId : '');
@@ -82,23 +82,23 @@
Text {
id:tVoiceCallDuration
anchors.horizontalCenter: parent.horizontalCenter
- font.pointSize: 56
+ font.pointSize: Theme.fontWeightLarge
color: "white"
visible: call.state == "active"
text: telephone.activeVoiceCall ? main.secondsToTimeString(telephone.activeVoiceCall.duration) : '00:00:00'
}
RowLayout {
- spacing: 40
+ spacing: Theme.itemSpacingHuge
anchors.horizontalCenter: parent.horizontalCenter
Button {
- text: "Answer"
+ text: qsTr("Answer")
Layout.fillWidth: true
Layout.fillHeight: false
onClicked: if (telephone.activeVoiceCall) telephone.activeVoiceCall.answer()
visible: call.state == "incoming"
}
Button {
- text: "Hang up"
+ text: qsTr("Hang up")
Layout.fillWidth: true
Layout.fillHeight: false
onClicked: {
|
[-]
[+]
|
Changed |
_service:tar_git:glacier-dialer-0.2.tar.bz2/qml/pages/ContactDelegate.qml
^
|
@@ -16,7 +16,7 @@
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
-import QtQuick 2.1
+import QtQuick 2.6
import QtQuick.Controls 1.0
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
@@ -37,8 +37,8 @@
avatarPotentiallyChanged()
}
function avatarPotentiallyChanged() {
- if (person == null || person.avatarPath == "image://theme/icon-m-telephony-contact-avatar")
- contactImage.source = "image://theme/icon-m-telephony-contact-avatar"
+ if (person == null || person.avatarPath == "image://theme/user")
+ contactImage.source = "image://theme/user"
else
contactImage.source = person.avatarPath
}
@@ -59,7 +59,7 @@
onPressAndHold: {
var comp = Qt.createComponent("ContactDetails.qml")
if (comp.status === Component.Ready) {
- first.pageStack.push({
+ pageStack.push({
"item": comp,
"properties": {
"person": person
|
[-]
[+]
|
Changed |
_service:tar_git:glacier-dialer-0.2.tar.bz2/qml/pages/ContactDetails.qml
^
|
@@ -16,7 +16,7 @@
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
-import QtQuick 2.1
+import QtQuick 2.6
import QtQuick.Controls 1.0
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
@@ -51,19 +51,19 @@
anchors.horizontalCenter: parent.horizontalCenter
}
Label {
- text: "First name"
+ text: qsTr("First name")
}
TextField {
text: person.firstName
}
Label {
- text: "Last name"
+ text: qsTr("Last name")
}
TextField {
text: person.lastName
}
Label {
- text: "Phone number"
+ text: qsTr("Phone number")
}
TextField {
text: person.phoneDetails[0].normalizedNumber
|
[-]
[+]
|
Changed |
_service:tar_git:glacier-dialer-0.2.tar.bz2/qml/pages/ContactsPage.qml
^
|
@@ -17,7 +17,7 @@
* Boston, MA 02110-1301, USA.
*/
-import QtQuick 2.1
+import QtQuick 2.6
import QtQuick.Controls 1.0
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
@@ -30,7 +30,7 @@
anchors.fill: parent
anchors.topMargin: 20
delegate: ContactDelegate {
- person: peopleModel.personByRow(index)
+ person: modelData.personByRow(index)
}
}
}
|
[-]
[+]
|
Changed |
_service:tar_git:glacier-dialer-0.2.tar.bz2/qml/pages/DialerPage.qml
^
|
@@ -16,87 +16,99 @@
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
-import QtQuick 2.1
+import QtQuick 2.6
import QtQuick.Controls 1.0
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
import QtQuick.Layouts 1.0
import org.nemomobile.contacts 1.0
+import "../components"
+
Page {
id: dialer
- ColumnLayout {
- id: rootColumn
- spacing: 5
- anchors.centerIn: parent
- anchors.fill: parent
- anchors.topMargin: 15
-
- RowLayout {
- spacing: 20
-
- TextEdit {
- id: dialedNumber
- Layout.fillWidth: true
- Layout.preferredWidth: 240
- font.pointSize: 52
- color: "steelblue"
- horizontalAlignment: TextEdit.AlignRight
- }
+
+ Item {
+ id: numForDialing
+ height: Theme.itemHeightLarge
+ width: parent.width
+
+ TextEdit {
+ id: dialedNumber
+ width: dialer.width-dialedNumber.height
+ height: Theme.itemHeightLarge
+ font.pointSize: Theme.fontSizeExtraLarge
+ color: "steelblue"
+ horizontalAlignment: TextEdit.AlignRight
}
- GridLayout {
- width: rootColumn.width
- anchors {
- leftMargin: 10
- rightMargin: 10
- topMargin: 5
- bottomMargin: 10
+
+ Image{
+ width: dialedNumber.height
+ height: width
+ source: "image://theme/angle-right"
+
+ anchors{
+ left: dialedNumber.right
+ verticalCenter: dialedNumber.verticalCenter
}
- columnSpacing: 0
- rowSpacing: 0
- columns: 3
- Repeater {
- model: [0,1,2,3,4,5,6,7,8,9,10,11]
- delegate: DialerButton {
- index: model.index
- person: {
- if (model.index < peopleModel.count) {
- return peopleModel.personByRow(index)
- } else {
- return null
- }
- }
+ MouseArea{
+ anchors.fill: parent
+ onClicked: {
+ dialedNumber.text = dialedNumber.text.substring(0, dialedNumber.text.length - 1)
}
}
}
- Rectangle {
- id: dimmer
- Layout.fillWidth: true
- Layout.fillHeight: true
- Layout.preferredHeight: 35
- height: 35
- width: parent.width
- color: "green"
-
- gradient: Gradient {
- GradientStop { position: 0; color: "green" }
- GradientStop { position: 1.0; color: "transparent" }
- }
- Text {
- color: "white"
- text: "Call"
- font.pointSize: 32
- anchors.right: parent.right
- anchors.bottom: parent.bottom
+ }
+ Grid {
+ id: dialerButtons
+ width: parent.width
+ height: parent.height-numForDialing.height-dimmer.height-Theme.itemSpacingLarge*3
+ anchors {
+ top: numForDialing.bottom
+ topMargin: 5
+ bottomMargin: 10
+ }
+
+ columns: 3
+
+ Repeater {
+ model: [0,1,2,3,4,5,6,7,8,9,10,11]
+ delegate: DialerButton {
+ width: dialerButtons.width/3
+ height: dialerButtons.height/4
+ index: model.index
}
- MouseArea {
- anchors.fill: parent
- onClicked: {
- var normalizedNumber = Person.normalizePhoneNumber(dialedNumber.text)
- telephone.dial(telephone.defaultProviderId, normalizedNumber)
- }
+ }
+ }
+ Rectangle {
+ id: dimmer
+
+ height: Theme.itemHeightLarge+Theme.itemSpacingLarge
+ width: parent.width-Theme.itemSpacingLarge*2
+ color: "green"
+ radius: height/2
+
+ anchors{
+ bottom: parent.bottom
+ bottomMargin: Theme.itemSpacingLarge
+ left: parent.left
+ leftMargin: Theme.itemSpacingLarge
+ }
+
+ Text {
+ color: "white"
+ text: qsTr("Call")
+ font.pointSize: Theme.fontSizeExtraLarge
+ anchors.centerIn: parent
+ }
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ var normalizedNumber = Person.normalizePhoneNumber(dialedNumber.text)
+ telephone.dial(telephone.defaultProviderId, normalizedNumber)
}
}
}
}
+
|
[-]
[+]
|
Changed |
_service:tar_git:glacier-dialer-0.2.tar.bz2/qml/pages/FirstPage.qml
^
|
@@ -17,79 +17,39 @@
* Boston, MA 02110-1301, USA.
*/
-import QtQuick 2.1
+import QtQuick 2.6
import QtQuick.Controls 1.0
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
import QtQuick.Layouts 1.0
+
import org.nemomobile.voicecall 1.0
-import MeeGo.QOfono 0.2
import org.nemomobile.contacts 1.0
+import MeeGo.QOfono 0.2
+
Page {
id: first
headerTools: HeaderToolsLayout {
id: tools
- title: "Glacier Dialer"
+ title: qsTr("Glacier Dialer")
tools: [
ToolButton {
- iconSource: "image://theme/icon-m-toolbar-callhistory-white"
- onClicked: {
- dialer_page.visible = false
- call_log_page.visible = true
- contacts_page.visible = false
- }
- },
- ToolButton {
- iconSource: "image://theme/icon-m-toolbar-view-menu-white-selected"
+ iconSource: "image://theme/history"
onClicked: {
- call_log_page.visible = false
- dialer_page.visible = true
- contacts_page.visible = false
+ pageStack.push(Qt.resolvedUrl("CallLogPage.qml"));
}
},
ToolButton {
- iconSource: "image://theme/icon-m-telephony-contact-avatar"
- onClicked: {
- call_log_page.visible = false
- dialer_page.visible = false
- contacts_page.visible = true
- }
- }
- ]
- drawerLevels: [
- Button {
- visible: dialer_page.visible
- text: "Edit speed dial"
- onClicked: {
- main.speedDialEditor = true
- }
- },
- Button {
- visible: call_log_page.visible
- text: "Mark all as read"
+ iconSource: "image://theme/user"
onClicked: {
- commCallModel.markAllRead()
+ pageStack.push(Qt.resolvedUrl("ContactsPage.qml"));
}
}
-
]
}
- CallLogPage {
- id: call_log_page
- visible: false
- }
DialerPage {
id: dialer_page
- visible: false
- }
- ContactsPage {
- id: contacts_page
- visible: false
- }
-
- Component.onCompleted: {
- dialer_page.visible = true
}
}
|
[-]
[+]
|
Changed |
_service:tar_git:glacier-dialer-0.2.tar.bz2/src/dbusadaptor.cpp
^
|
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2013 Jolla Ltd. <robin.burchell@jollamobile.com>
+ * Copyright (C) 2018 Chupligin Sergey <neochapay@gmail.com>
*
* You may use this file under the terms of the BSD license as follows:
*
@@ -31,9 +32,27 @@
#include "dbusadaptor.h"
+#include <QDBusConnection>
+#include <QDBusConnectionInterface>
+#include <QDebug>
+#include <QCoreApplication>
+
DBusAdaptor::DBusAdaptor(QQuickWindow *m)
: QDBusAbstractAdaptor(m), wm(m)
{
+ QDBusConnection sessionbus = QDBusConnection::sessionBus();
+
+ if(sessionbus.interface()->isServiceRegistered("org.glacier.voicecall.ui"))
+ {
+ qWarning() << "Second start of glacier dialler";
+ QCoreApplication::quit();
+ }
+
+ QDBusConnection::sessionBus().registerService("org.glacier.voicecall.ui");
+ if (!QDBusConnection::sessionBus().registerObject("/", m))
+ {
+ qWarning() << Q_FUNC_INFO << "Cannot register DBus object!";
+ }
}
/* libcontentaction requires this signature for methods invoked from
|
[-]
[+]
|
Changed |
_service:tar_git:glacier-dialer-0.2.tar.bz2/src/glacier-dialer.cpp
^
|
@@ -1,6 +1,7 @@
/*
Copyright (C) 2013 Jolla Ltd.
Contact: Thomas Perl <thomas.perl@jollamobile.com>
+ Copyright (C) 2018 Chupligin Sergey <neochapay@gmail.com>
All rights reserved.
You may use this file under the terms of BSD license as follows:
@@ -32,45 +33,36 @@
#include <QtQuick>
#endif
#include <QtGui/QGuiApplication>
-#include "dbusadaptor.h"
#include <QtQml>
#include <QtQuick/QQuickView>
#include <QtCore/QString>
#include <QScreen>
#include <QDBusConnection>
+#include <QDBusConnectionInterface>
#include <QCoreApplication>
+#include <glacierapp.h>
+
+#include "dbusadaptor.h"
-int main(int argc, char *argv[])
+Q_DECL_EXPORT int main(int argc, char *argv[])
{
- QGuiApplication app(argc, argv);
- QScreen* sc = app.primaryScreen();
- if(sc){
- sc->setOrientationUpdateMask(Qt::LandscapeOrientation
- | Qt::PortraitOrientation
- | Qt::InvertedLandscapeOrientation
- | Qt::InvertedPortraitOrientation);
- }
- QQmlApplicationEngine* engine = new QQmlApplicationEngine(QUrl("/usr/share/glacier-dialer/qml/glacier-dialer.qml"));
- QObject *topLevel = engine->rootObjects().value(0);
- QQuickWindow *window = qobject_cast<QQuickWindow *>(topLevel);
- setenv("QT_QUICK_CONTROLS_STYLE", "Nemo", 1);
- engine->rootContext()->setContextProperty("__window", window);
- window->setTitle("Dialer");
+ QGuiApplication *app = GlacierApp::app(argc, argv);
+ app->setOrganizationName("NemoMobile");
+
+ QQuickWindow *window = GlacierApp::showWindow();
+
+ window->setTitle(QObject::tr("Dialer"));
if ( !window ) {
qWarning("Error: Your root item has to be a Window.");
return -1;
}
- if (app.arguments().contains("-prestart")) {
+
+ if (app->arguments().contains("--prestart")) {
new DBusAdaptor(window);
- QDBusConnection::sessionBus().registerService("org.glacier.voicecall.ui");
- if (!QDBusConnection::sessionBus().registerObject("/", window))
- qWarning() << Q_FUNC_INFO << "Cannot register DBus object!";
- QObject::connect(engine, SIGNAL(quit()), window, SLOT(close()));
- } else {
- window->showFullScreen();
}
- return app.exec();
+
+ return app->exec();
}
|
[-]
[+]
|
Changed |
_service:tar_git:glacier-dialer-0.2.tar.bz2/voicecall-ui-prestart.service
^
|
@@ -5,7 +5,7 @@
[Service]
Environment="QT_QUICK_CONTROLS_STYLE=Nemo"
-ExecStart=/usr/bin/glacier-dialer -prestart
+ExecStart=/usr/bin/glacier-dialer --prestart
Restart=always
[Install]
|