From: Brian Jones Date: Tue, 24 Apr 2012 20:42:07 +0000 (-0700) Subject: Added icons for bluetooth items. Also adding hfdialer.conf X-Git-Tag: 061412173448~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3c466c93f5e851aba275f3a5d6fb73a2b9f21d6d;p=profile%2Fivi%2Fhfdialer.git Added icons for bluetooth items. Also adding hfdialer.conf file which allows hfdialer to have access to the DBUS. This is used to make it a singleton. --- diff --git a/hfdialer.conf b/hfdialer.conf new file mode 100644 index 0000000..9be7fa2 --- /dev/null +++ b/hfdialer.conf @@ -0,0 +1,10 @@ + + + + + + + + diff --git a/projects.pro b/projects.pro index 21f7a7c..7991e43 100644 --- a/projects.pro +++ b/projects.pro @@ -16,6 +16,9 @@ desktop_entry.CONFIG += no_check_exist dbus_service.files = dialer.service dbus_service.path += $$INSTALL_ROOT/usr/share/dbus-1/services +dbus_conf.files = hfdialer.conf +dbus_conf.path += $$INSTALL_ROOT/etc/dbus-1/system.d + # Documentation documentation.files = AUTHORS ChangeLog LICENSE README TODO documentation.path = $$INSTALL_ROOT/usr/share/hfdialer/ @@ -23,6 +26,7 @@ documentation.path = $$INSTALL_ROOT/usr/share/hfdialer/ INSTALLS += \ desktop_entry \ dbus_service \ + dbus_conf \ documentation \ PROJECT_NAME = hfdialer diff --git a/qml/DeviceDelegate.qml b/qml/DeviceDelegate.qml index b10730e..a4cc51c 100644 --- a/qml/DeviceDelegate.qml +++ b/qml/DeviceDelegate.qml @@ -26,10 +26,19 @@ Item { source: "/usr/share/hfdialer/images/ivi_btn-list-inactive.png" anchors {fill: parent; leftMargin: 8; rightMargin: 8; topMargin: 8} + Image { + id: iconImg + source: icon == "phone" ? "/usr/share/hfdialer/images/bluetooth-smartphone.png" : + "/usr/share/hfdialer/images/computer.png" + height: availableBluetoothItem.containerHeight * 0.75 + width: height + anchors {left: parent.left; verticalCenter: parent.verticalCenter; leftMargin: icon == "phone"? 10 : 10;} + } + Text { id: mainText - anchors {fill: parent; leftMargin: 15} + anchors {left: iconImg.right; right: parent.right; top: parent.top; bottom: parent.bottom; rightMargin: 10; leftMargin: icon == "phone"? 18 : 18;} verticalAlignment: Text.AlignVCenter height: availableBluetoothItem.containerHeight font.pixelSize: parent.height / 2 diff --git a/qml/DialPage.qml b/qml/DialPage.qml index e987d33..272dee6 100644 --- a/qml/DialPage.qml +++ b/qml/DialPage.qml @@ -30,16 +30,28 @@ Item dialPage.state = 'noCall' } + Timer { + id: reconnectTimer + interval: 3000 + repeat: false + running: false + + onTriggered: + { + adapter.modemOnline = true + } + } + Connections { target: adapter onModemOnlineChanged: { - //If the modem gets powered down for any reason, attempt to power it again to maintain connection + //If the modem gets powered down for any reason, attempt to power it again to maintain connection if (!adapter.modemOnline) { - adapter.modemOnline = true + reconnectTimer.running = true; } - } + } } Image @@ -213,15 +225,15 @@ Item Component.onCompleted: { - //Once model is completed, check if the modem is powered. If not, power it - if (!adapter.modemOnline) + //Once model is completed, check if the modem is powered. If not, power it + if (!adapter.modemOnline) { adapter.modemOnline = true } } delegate: DeviceDelegateActive { - + id: deligateItem deviceName: model.name address: model.address dbuspath: model.path @@ -244,6 +256,7 @@ Item onClose: { console.log("unparing ..."); device.unpair(); + btDevicesModel.deviceRemoved(device.path); } } }