mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-07-31 08:44:45 +00:00
show directly call ui if server was already calling
This commit is contained in:
parent
dd1301b522
commit
0d8ce02d1a
1 changed files with 25 additions and 11 deletions
|
|
@ -30,6 +30,8 @@ ApplicationWindow {
|
||||||
visible: true
|
visible: true
|
||||||
color: Qt.rgba(0, 0, 0, 0.9)
|
color: Qt.rgba(0, 0, 0, 0.9)
|
||||||
|
|
||||||
|
property int status: voiceCallmanager.activeVoiceCall ? voiceCallmanager.activeVoiceCall.status : 0
|
||||||
|
|
||||||
OfonoManager {
|
OfonoManager {
|
||||||
id: ofonoManager
|
id: ofonoManager
|
||||||
onAvailableChanged: {
|
onAvailableChanged: {
|
||||||
|
|
@ -66,12 +68,6 @@ ApplicationWindow {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
property OfonoSimManager simManager: ofonoSimManager
|
|
||||||
OfonoSimManager {
|
|
||||||
id: ofonoSimManager
|
|
||||||
modemPath: ofonoManager.modems.length > 0 ? ofonoManager.modems[0] : ""
|
|
||||||
}
|
|
||||||
|
|
||||||
OfonoNetworkRegistration {
|
OfonoNetworkRegistration {
|
||||||
id: netreg
|
id: netreg
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
|
|
@ -87,17 +83,25 @@ ApplicationWindow {
|
||||||
OfonoNetworkOperator {
|
OfonoNetworkOperator {
|
||||||
id: netop
|
id: netop
|
||||||
}
|
}
|
||||||
|
Button {
|
||||||
|
z: 99
|
||||||
|
text: "bah"
|
||||||
|
onClicked: {
|
||||||
|
print(voiceCallmanager.activeVoiceCall)
|
||||||
|
print(voiceCallmanager.voiceCalls.count)
|
||||||
|
print(voiceCallmanager.activeVoiceCall.status)
|
||||||
|
}
|
||||||
|
}
|
||||||
VoiceCallManager {
|
VoiceCallManager {
|
||||||
id: voiceCallmanager
|
id: voiceCallmanager
|
||||||
|
|
||||||
onActiveVoiceCallChanged: {
|
onActiveVoiceCallChanged: {
|
||||||
if (activeVoiceCall) {
|
if (activeVoiceCall) {
|
||||||
//main.activeVoiceCallPerson = people.personByPhoneNumber(activeVoiceCall.lineId);
|
//main.activeVoiceCallPerson = people.personByPhoneNumber(activeVoiceCall.lineId);
|
||||||
dialerOverlay.item.numberEntryText = activeVoiceCall.lineId;
|
// dialerOverlay.item.numberEntryText = activeVoiceCall.lineId;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
dialerOverlay.item.numberEntryText = '';
|
// dialerOverlay.item.numberEntryText = '';
|
||||||
|
|
||||||
//main.activeVoiceCallPerson = null;
|
//main.activeVoiceCallPerson = null;
|
||||||
}
|
}
|
||||||
|
|
@ -107,8 +111,18 @@ ApplicationWindow {
|
||||||
console.log('*** QML *** VCM ERROR: ' + message);
|
console.log('*** QML *** VCM ERROR: ' + message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Dialer {
|
|
||||||
id: dialerOverlay
|
StackView {
|
||||||
|
id: stackView
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
//HACK: make sure activeVoiceCall is the proper one
|
||||||
|
voiceCallmanager.voiceCalls.onVoiceCallsChanged();
|
||||||
|
voiceCallmanager.onActiveVoiceCallChanged();
|
||||||
|
|
||||||
|
//start with the dialer view
|
||||||
|
stackView.push(Qt.resolvedUrl("Dialer.qml"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue