/* * Copyright 2014 Marco Martin * * 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 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.0 import QtQuick.Controls 1.3 import QtQuick.Layouts 1.1 import org.nemomobile.voicecall 1.0 import MeeGo.QOfono 0.2 ApplicationWindow { id: root width: 600 height: 800 visible: true color: Qt.rgba(0, 0, 0, 0.9) OfonoManager { id: ofonoManager onAvailableChanged: { console.log("Ofono is " + available) } onModemAdded: { console.log("modem added " + modem) } onModemRemoved: console.log("modem removed") } OfonoConnMan { id: ofono1 Component.onCompleted: { console.log(ofonoManager.modems) } modemPath: ofonoManager.modems.length > 0 ? ofonoManager.modems[0] : "" } OfonoModem { id: modem1 modemPath: ofonoManager.modems.length > 0 ? ofonoManager.modems[0] : "" } OfonoContextConnection { id: context1 contextPath : ofono1.contexts.length > 0 ? ofono1.contexts[0] : "" Component.onCompleted: { print("Context Active: " + context1.active) } onActiveChanged: { print("Context Active: " + context1.active) } } property OfonoSimManager simManager: ofonoSimManager OfonoSimManager { id: ofonoSimManager modemPath: ofonoManager.modems.length > 0 ? ofonoManager.modems[0] : "" } OfonoNetworkRegistration { id: netreg Component.onCompleted: { netreg.scan() } onNetworkOperatorsChanged : { console.log("operators :"+netreg.currentOperator["Name"].toString()) } modemPath: ofonoManager.modems.length ? ofonoManager.modems[0] : "" } OfonoNetworkOperator { id: netop } property VoiceCallManager manager: VoiceCallManager { id: manager onActiveVoiceCallChanged: { if (activeVoiceCall) { //main.activeVoiceCallPerson = people.personByPhoneNumber(activeVoiceCall.lineId); dialerOverlay.item.numberEntryText = activeVoiceCall.lineId; } else { dialerOverlay.item.numberEntryText = ''; //main.activeVoiceCallPerson = null; } } onError: { console.log('*** QML *** VCM ERROR: ' + message); } } Dialer { id: dialerOverlay anchors.fill: parent } }