[-]
[+]
|
Changed |
_service:tar_git:glacier-dialer.changes
|
|
[-]
[+]
|
Changed |
_service:tar_git:glacier-dialer.spec
^
|
|
|
Changed |
_service
^
|
[-]
[+]
|
Changed |
_service:tar_git:glacier-dialer-0.0.2.tar.bz2/glacier-dialer.pro
^
|
@@ -13,7 +13,12 @@
qml/pages/DialerButton.qml \
org.glacier.voicecall.ui.service \
qml/pages/CallLogPage.qml \
- qml/pages/LogDelegate.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
target.path = /usr/bin
@@ -27,7 +32,12 @@
qml/pages/SecondPage.qml \
qml/pages/DialerButton.qml \
qml/pages/CallLogPage.qml \
- qml/pages/LogDelegate.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
systemd_dbus_service.path = $${INSTALL_ROOT}/usr/share/dbus-1/services
|
[-]
[+]
|
Changed |
_service:tar_git:glacier-dialer-0.0.2.tar.bz2/qml/glacier-dialer.qml
^
|
@@ -23,30 +23,72 @@
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
import org.nemomobile.voicecall 1.0
+import org.nemomobile.contacts 1.0
+import org.nemomobile.commhistory 1.0
import "pages"
ApplicationWindow
{
+ id: main
initialPage: FirstPage {
id: pageItem
}
contentOrientation: Screen.orientation
+ property Person activeVoiceCallPerson
+ property string activationReason: 'invoked'
+ property bool speedDialEditor: false
+ property alias page: pageItem
VoiceCallManager {
id: telephone
onActiveVoiceCallChanged: {
if(activeVoiceCall) {
- if (activeVoiceCall.isIncoming) {
- pageItem.callLabel.text = "Getting call from :" + activeVoiceCall.lineId
+ main.activeVoiceCallPerson = peopleModel.personByPhoneNumber(activeVoiceCall.lineId, true);
+ console.error(JSON.stringify(main.activeVoiceCallPerson))
+ pageItem.pageStack.push({
+ "item": Qt.resolvedUrl("pages/CallView.qml"),
+ "properties": {
+ "main": main,
+ "telephone": telephone
+ },
+ "immediate": true
+ })
+ __window.setTitle("Dialer")
+ if(!__window.visible)
+ {
+ main.activationReason = "activeVoiceCallChanged"
+ __window.showFullScreen()
} else {
- pageItem.callLabel.text = "Calling number: " + activeVoiceCall.lineId
+ __window.raise()
}
- __window.showFullScreen()
} else {
- pageItem.callLabel.text = ""
+ pageItem.pageStack.pop({"immediate":true})
+ main.activeVoiceCallPerson = null
+ if (main.activationReason != "invoked") {
+ main.activationReason = "invoked"
+ __window.close()
+ }
}
}
}
+ function secondsToTimeString(seconds) {
+ var h = Math.floor(seconds / 3600);
+ var m = Math.floor((seconds - (h * 3600)) / 60);
+ var s = seconds - h * 3600 - m * 60;
+ if(h < 10) h = '0' + h;
+ if(m < 10) m = '0' + m;
+ if(s < 10) s = '0' + s;
+ return '' + h + ':' + m + ':' + s;
+ }
+ PeopleModel {
+ id: peopleModel
+ filterType: PeopleModel.FilterAll
+ }
+ CommCallModel {
+ id: commCallModel
+ groupBy: CommCallModel.GroupByContact
+ resolveContacts: true
+ }
}
|
[-]
[+]
|
Changed |
_service:tar_git:glacier-dialer-0.0.2.tar.bz2/qml/pages/CallLogPage.qml
^
|
@@ -32,15 +32,15 @@
title: "Call log"
showBackButton: true;
}
- CommCallModel {
- id: commCallModel
- groupBy: CommCallModel.GroupByContact
- }
ListView {
+ id: list
anchors.fill: parent
+ anchors.topMargin: 20
clip: true
model: commCallModel
- delegate: LogDelegate {}
+ delegate: LogDelegate {
+ contact: model.contactIds.length ? peopleModel.personById(model.contactIds[0]) : null
+ }
}
}
|
[-]
[+]
|
Added |
_service:tar_git:glacier-dialer-0.0.2.tar.bz2/qml/pages/CallView.qml
^
|
@@ -0,0 +1,112 @@
+/*
+ * 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
+import org.nemomobile.commhistory 1.0
+
+Page {
+ id: call
+ headerTools: HeaderToolsLayout {
+ id: tools
+ title: "Call"
+ }
+ state: telephone.activeVoiceCall ? telephone.activeVoiceCall.statusText : 'disconnected'
+ states: [
+ State {name:'active'},
+ State {name:'held'},
+ State {name:'dialing'},
+ State {name:'alerting'},
+ State {name:'incoming'},
+ State {name:'waiting'},
+ State {name:'disconnected'}
+ ]
+ ColumnLayout {
+ anchors.fill: parent
+ spacing: 30
+ Image {
+ id: avatar
+ anchors.horizontalCenter: parent.horizontalCenter
+ source: main.activeVoiceCallPerson
+ ? main.activeVoiceCallPerson.avatarPath
+ : 'image://theme/icon-m-telephony-contact-avatar';
+ Layout.fillWidth: false
+ Layout.fillHeight: false
+ Layout.preferredHeight: 280
+ Layout.preferredWidth: 280
+ }
+ Text {
+ id:tLineId
+ width:parent.width; height:paintedHeight
+ horizontalAlignment: Text.Center
+ anchors.horizontalCenter: parent.horizontalCenter
+ font.pointSize: 56
+ color: "white"
+
+ text:main.activeVoiceCallPerson
+ ? main.activeVoiceCallPerson.displayLabel
+ : (telephone.activeVoiceCall ? telephone.activeVoiceCall.lineId : '');
+
+ onTextChanged: resizeText();
+
+ Component.onCompleted: resizeText();
+
+ function resizeText() {
+ if(paintedWidth < 0 || paintedHeight < 0) return;
+ while(paintedWidth > width)
+ if(--font.pixelSize <= 0) break;
+
+ while(paintedWidth < width)
+ if(++font.pixelSize >= 38) break;
+ }
+ }
+ Text {
+ id:tVoiceCallDuration
+ anchors.horizontalCenter: parent.horizontalCenter
+ font.pointSize: 56
+ color: "white"
+ visible: call.state == "active"
+ text: telephone.activeVoiceCall ? main.secondsToTimeString(telephone.activeVoiceCall.duration) : '00:00:00'
+ }
+ RowLayout {
+ spacing: 40
+ anchors.horizontalCenter: parent.horizontalCenter
+ Button {
+ text: "Answer"
+ Layout.fillWidth: true
+ Layout.fillHeight: false
+ onClicked: if (telephone.activeVoiceCall) telephone.activeVoiceCall.answer()
+ visible: call.state == "incoming"
+ }
+ Button {
+ text: "Hang up"
+ Layout.fillWidth: true
+ Layout.fillHeight: false
+ onClicked: {
+ if(telephone.activeVoiceCall) {
+ telephone.activeVoiceCall.hangup();
+ }
+ }
+ }
+ }
+ }
+}
|
[-]
[+]
|
Added |
_service:tar_git:glacier-dialer-0.0.2.tar.bz2/qml/pages/ContactDelegate.qml
^
|
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2015 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
+
+Item {
+ height: 145
+ width: parent.width
+ property alias person: row.person
+ RowLayout {
+ id: row
+ spacing: 15
+ anchors.fill: parent
+ 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
+ Layout.preferredHeight: 140
+ Layout.preferredWidth: 140
+ }
+ Label {
+ text: model.displayLabel
+ Layout.fillWidth: true
+ }
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ telephone.dial(telephone.defaultProviderId, person.phoneDetails[0].normalizedNumber)
+ }
+ onPressAndHold: {
+ var comp = Qt.createComponent("ContactDetails.qml")
+ if (comp.status === Component.Ready) {
+ first.pageStack.push({
+ "item": comp,
+ "properties": {
+ "person": person
+ },
+ "destroyOnPop": true
+ })
+ }
+ }
+ }
+ }
+}
|
[-]
[+]
|
Added |
_service:tar_git:glacier-dialer-0.0.2.tar.bz2/qml/pages/ContactDetails.qml
^
|
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2015 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
+
+Page {
+ id: contactdetails
+ property Person person
+ headerTools: HeaderToolsLayout { showBackButton: true; title: person.displayLabel}
+ 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
+ }
+ Flickable {
+ anchors.fill: parent
+ contentHeight: rootColumn.height
+ ColumnLayout {
+ id: rootColumn
+ anchors.fill: parent
+ spacing: 20
+ Image {
+ id: contactImage
+ Layout.preferredHeight: 240
+ Layout.preferredWidth: 240
+ anchors.horizontalCenter: parent.horizontalCenter
+ }
+ Label {
+ text: "First name"
+ }
+ TextField {
+ text: person.firstName
+ }
+ Label {
+ text: "Last name"
+ }
+ TextField {
+ text: person.lastName
+ }
+ Label {
+ text: "Phone number"
+ }
+ TextField {
+ text: person.phoneDetails[0].normalizedNumber
+ }
+ }
+ }
+}
|
[-]
[+]
|
Added |
_service:tar_git:glacier-dialer-0.0.2.tar.bz2/qml/pages/ContactsPage.qml
^
|
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2015 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
+
+Page {
+ id: contacts
+ ListView {
+ model: peopleModel
+ anchors.fill: parent
+ anchors.topMargin: 20
+ delegate: ContactDelegate {
+ person: peopleModel.personByRow(index)
+ }
+ }
+}
|
[-]
[+]
|
Changed |
_service:tar_git:glacier-dialer-0.0.2.tar.bz2/qml/pages/DialerButton.qml
^
|
@@ -22,12 +22,65 @@
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
import QtQuick.Layouts 1.0
+import org.nemomobile.contacts 1.0
-Button {
+Rectangle {
id: btn
Layout.fillWidth: true
Layout.fillHeight: true
- onClicked: {
- dialedNumber.text += btn.text
+ 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)
+ }
}
}
|
[-]
[+]
|
Added |
_service:tar_git:glacier-dialer-0.0.2.tar.bz2/qml/pages/DialerPage.qml
^
|
@@ -0,0 +1,102 @@
+/*
+ * 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
+
+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
+ }
+ }
+ GridLayout {
+ width: rootColumn.width
+ anchors {
+ leftMargin: 10
+ rightMargin: 10
+ topMargin: 5
+ bottomMargin: 10
+ }
+
+ 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
+ }
+ }
+ }
+ }
+ }
+ 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
+ }
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ var normalizedNumber = Person.normalizePhoneNumber(dialedNumber.text)
+ telephone.dial(telephone.defaultProviderId, normalizedNumber)
+ }
+ }
+ }
+ }
+}
|
[-]
[+]
|
Changed |
_service:tar_git:glacier-dialer-0.0.2.tar.bz2/qml/pages/FirstPage.qml
^
|
@@ -27,132 +27,69 @@
import org.nemomobile.contacts 1.0
Page {
+ id: first
headerTools: HeaderToolsLayout {
id: tools
title: "Glacier Dialer"
- }
- property alias callLabel: callLabel
- ColumnLayout {
- id: rootColumn
- spacing: 20
- anchors.centerIn: parent
- anchors.fill: parent
- anchors.topMargin: 30
-
- RowLayout {
- spacing: 20
- TextEdit {
- Layout.fillWidth: true
- Layout.preferredWidth: 240
- Layout.preferredHeight: 40
- font.pointSize: 52
- color: "steelblue"
- id: dialedNumber
- }
- Button {
- id: clearer
- text: "Clear"
- Layout.fillWidth: true
- Layout.preferredHeight: 40
+ tools: [
+ ToolButton {
+ iconSource: "image://theme/icon-m-toolbar-callhistory-white"
onClicked: {
- dialedNumber.text = ""
+ dialer_page.visible = false
+ call_log_page.visible = true
+ contacts_page.visible = false
}
- }
- }
- RowLayout {
- Label {
- id: callLabel
- Layout.fillHeight: true
- }
- }
-
- RowLayout {
- Button {
- id: callLogBtn
- text: "Call log"
- Layout.fillWidth: true
+ },
+ ToolButton {
+ iconSource: "image://theme/icon-m-toolbar-view-menu-white-selected"
onClicked: {
- pageItem.pageStack.push({item: Qt.resolvedUrl("CallLogPage.qml"), properties: {telephone: telephone}})
+ call_log_page.visible = false
+ dialer_page.visible = true
+ contacts_page.visible = false
+ }
+ },
+ ToolButton {
+ iconSource: "image://theme/icon-m-telephony-contact-avatar"
+ onClicked: {
+ call_log_page.visible = false
+ dialer_page.visible = false
+ contacts_page.visible = true
}
}
- }
-
- GridLayout {
- width: rootColumn.width
- anchors {
- leftMargin: 10
- rightMargin: 10
- topMargin: 5
- bottomMargin: 10
- }
-
- columnSpacing: 20
- rowSpacing: 20
- columns: 3
- DialerButton {
- text: "1"
- }
- DialerButton {
- text: "2"
- }
- DialerButton {
- text: "3"
- }
- DialerButton {
- text: "4"
- }
- DialerButton {
- text: "5"
- }
- DialerButton {
- text: "6"
- }
- DialerButton {
- text: "7"
- }
- DialerButton {
- text: "8"
- }
- DialerButton {
- text: "9"
- }
- DialerButton {
- text: "+"
- }
- DialerButton {
- text: "0"
- }
- DialerButton {
- text: "#"
- }
- }
- RowLayout {
- spacing: 20
+ ]
+ drawerLevels: [
Button {
- Layout.fillWidth: true
- Layout.fillHeight: true
- text: "Call / Answer"
+ visible: dialer_page.visible
+ text: "Edit speed dial"
onClicked: {
- var normalizedNumber = Person.normalizePhoneNumber(dialedNumber.text)
-
- if (!telephone.activeVoiceCall) {
- telephone.dial(telephone.defaultProviderId, normalizedNumber)
- } else {
- telephone.activeVoiceCall.answer()
- }
+ main.speedDialEditor = true
}
- }
+ },
Button {
- Layout.fillWidth: true
- Layout.fillHeight: true
- text: "Hang up"
+ visible: call_log_page.visible
+ text: "Mark all as read"
onClicked: {
- if (telephone.activeVoiceCall) {
- telephone.activeVoiceCall.hangup()
- }
+ commCallModel.markAllRead()
}
}
- }
+
+ ]
+ }
+ 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.0.2.tar.bz2/qml/pages/LogDelegate.qml
^
|
@@ -26,32 +26,39 @@
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: model.remoteUid
+ text: contact ? contact.displayLabel.substring(0,10): model.remoteUid
}
- Button {
- Layout.fillWidth: false
+ Label {
+ id: dateLabel
+ Layout.fillWidth: true
Layout.fillHeight: true
- width: 40
- text: "Delete"
- onClicked: {
- pageItem.pageStack.pop()
- commCallModel.deleteAt(model.index)
- telephone.dial(telephone.defaultProviderId, model.remoteUid)
- }
+ 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.0.2.tar.bz2/src/glacier-dialer.cpp
^
|
@@ -41,6 +41,7 @@
#include <QDBusConnection>
#include <QCoreApplication>
+
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
@@ -56,6 +57,7 @@
QQuickWindow *window = qobject_cast<QQuickWindow *>(topLevel);
setenv("QT_QUICK_CONTROLS_STYLE", "Nemo", 1);
engine->rootContext()->setContextProperty("__window", window);
+ window->setTitle("Dialer");
if ( !window ) {
qWarning("Error: Your root item has to be a Window.");
return -1;
|