contact edition : add mouse area to loose focus when click outside sip address
force expand contact list when becomes visible hide preview sticker when ringing
This commit is contained in:
parent
06d6af29c7
commit
ee6680b253
7 changed files with 32 additions and 15 deletions
|
|
@ -129,7 +129,7 @@ void CallList::setSelf(QSharedPointer<CallList> me) {
|
||||||
});
|
});
|
||||||
|
|
||||||
mModelConnection->makeConnectToModel(&CoreModel::firstCallStarted,
|
mModelConnection->makeConnectToModel(&CoreModel::firstCallStarted,
|
||||||
[this]() { mModelConnection->invokeToCore([this]() { setHaveCall(true); }); });
|
[this]() { mModelConnection->invokeToCore([this]() { lUpdate(); }); });
|
||||||
mModelConnection->makeConnectToModel(&CoreModel::lastCallEnded, [this]() {
|
mModelConnection->makeConnectToModel(&CoreModel::lastCallEnded, [this]() {
|
||||||
mModelConnection->invokeToCore([this]() {
|
mModelConnection->invokeToCore([this]() {
|
||||||
setHaveCall(false);
|
setHaveCall(false);
|
||||||
|
|
|
||||||
|
|
@ -130,10 +130,10 @@ std::shared_ptr<linphone::Friend> ToolModel::findFriendByAddress(std::shared_ptr
|
||||||
auto friendsManager = FriendsManager::getInstance();
|
auto friendsManager = FriendsManager::getInstance();
|
||||||
QString key = Utils::coreStringToAppString(linphoneAddr->asStringUriOnly());
|
QString key = Utils::coreStringToAppString(linphoneAddr->asStringUriOnly());
|
||||||
if (friendsManager->isInKnownFriends(key)) {
|
if (friendsManager->isInKnownFriends(key)) {
|
||||||
qDebug() << "Friend have been found in known friend, return it";
|
// qDebug() << "Friend have been found in known friend, return it";
|
||||||
return friendsManager->getKnownFriendAtKey(key);
|
return friendsManager->getKnownFriendAtKey(key);
|
||||||
} else if (friendsManager->isInUnknownFriends(key)) {
|
} else if (friendsManager->isInUnknownFriends(key)) {
|
||||||
qDebug() << "Friend have been found in unknown friend, return it";
|
// qDebug() << "Friend have been found in unknown friend, return it";
|
||||||
return friendsManager->getUnknownFriendAtKey(key);
|
return friendsManager->getUnknownFriendAtKey(key);
|
||||||
}
|
}
|
||||||
auto f = CoreModel::getInstance()->getCore()->findFriend(linphoneAddr);
|
auto f = CoreModel::getInstance()->getCore()->findFriend(linphoneAddr);
|
||||||
|
|
@ -141,16 +141,16 @@ std::shared_ptr<linphone::Friend> ToolModel::findFriendByAddress(std::shared_ptr
|
||||||
if (friendsManager->isInUnknownFriends(key)) {
|
if (friendsManager->isInUnknownFriends(key)) {
|
||||||
friendsManager->removeUnknownFriend(key);
|
friendsManager->removeUnknownFriend(key);
|
||||||
}
|
}
|
||||||
qDebug() << "found friend, add to known map";
|
// qDebug() << "found friend, add to known map";
|
||||||
friendsManager->appendKnownFriend(linphoneAddr, f);
|
friendsManager->appendKnownFriend(linphoneAddr, f);
|
||||||
}
|
}
|
||||||
if (!f) {
|
if (!f) {
|
||||||
if (friendsManager->isInOtherAddresses(key)) {
|
if (friendsManager->isInOtherAddresses(key)) {
|
||||||
qDebug() << "A magic search has already be done for this address and nothing was found, return";
|
// qDebug() << "A magic search has already be done for address" << key << "and nothing was found, return";
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
friendsManager->appendOtherAddress(key);
|
friendsManager->appendOtherAddress(key);
|
||||||
qDebug() << "Couldn't find friend" << linphoneAddr->asStringUriOnly() << "in core, use magic search";
|
// qDebug() << "Couldn't find friend" << linphoneAddr->asStringUriOnly() << "in core, use magic search";
|
||||||
CoreModel::getInstance()->searchInMagicSearch(Utils::coreStringToAppString(linphoneAddr->asStringUriOnly()),
|
CoreModel::getInstance()->searchInMagicSearch(Utils::coreStringToAppString(linphoneAddr->asStringUriOnly()),
|
||||||
(int)linphone::MagicSearch::Source::LdapServers
|
(int)linphone::MagicSearch::Source::LdapServers
|
||||||
| (int)linphone::MagicSearch::Source::RemoteCardDAV
|
| (int)linphone::MagicSearch::Source::RemoteCardDAV
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,9 @@ Item {
|
||||||
id: preview
|
id: preview
|
||||||
qmlName: 'P'
|
qmlName: 'P'
|
||||||
previewEnabled: true
|
previewEnabled: true
|
||||||
visible: !sideStickers.visible
|
visible: !sideStickers.visible && mainItem.callState !== LinphoneEnums.CallState.OutgoingProgress
|
||||||
|
&& mainItem.callState !== LinphoneEnums.CallState.OutgoingRinging
|
||||||
|
&& mainItem.callState !== LinphoneEnums.CallState.OutgoingInit
|
||||||
onVisibleChanged: console.log(visible + " : " +allDevices.count)
|
onVisibleChanged: console.log(visible + " : " +allDevices.count)
|
||||||
height: Math.round(180 * DefaultStyle.dp)
|
height: Math.round(180 * DefaultStyle.dp)
|
||||||
width: Math.round(300 * DefaultStyle.dp)
|
width: Math.round(300 * DefaultStyle.dp)
|
||||||
|
|
|
||||||
|
|
@ -24,5 +24,11 @@ ColumnLayout {
|
||||||
color: mainItem.panelColor
|
color: mainItem.panelColor
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
onClicked: {
|
||||||
|
rightPanelContent.forceActiveFocus()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,8 @@ ListView {
|
||||||
cacheBuffer: 400
|
cacheBuffer: 400
|
||||||
implicitHeight: contentHeight
|
implicitHeight: contentHeight
|
||||||
spacing: expanded ? Math.round(4 * DefaultStyle.dp) : 0
|
spacing: expanded ? Math.round(4 * DefaultStyle.dp) : 0
|
||||||
|
|
||||||
|
onVisibleChanged: if (visible && !expanded) expanded = true
|
||||||
|
|
||||||
property var _currentItemY: currentItem?.y
|
property var _currentItemY: currentItem?.y
|
||||||
on_CurrentItemYChanged: if(_currentItemY){
|
on_CurrentItemYChanged: if(_currentItemY){
|
||||||
|
|
|
||||||
|
|
@ -202,13 +202,12 @@ Item {
|
||||||
triggeredOnStart: true
|
triggeredOnStart: true
|
||||||
onTriggered: {cameraLoader.reset = !cameraLoader.reset}
|
onTriggered: {cameraLoader.reset = !cameraLoader.reset}
|
||||||
}
|
}
|
||||||
active: mainItem.visible && !mainItem.remoteIsPaused
|
active: mainItem.visible && !mainItem.remoteIsPaused
|
||||||
&& mainItem.callState != LinphoneEnums.CallState.End
|
&& mainItem.videoEnabled
|
||||||
&& mainItem.callState != LinphoneEnums.CallState.Released
|
&& mainItem.callState !== LinphoneEnums.CallState.End
|
||||||
&& mainItem.callState != LinphoneEnums.CallState.Paused
|
&& mainItem.callState !== LinphoneEnums.CallState.Released
|
||||||
&& mainItem.callState != LinphoneEnums.CallState.PausedByRemote
|
&& !cameraLoader.reset
|
||||||
&& mainItem.videoEnabled && !cameraLoader.reset
|
onActiveChanged: console.log("("+mainItem.qmlName+") Camera active " + active +", visible="+mainItem.visible +", videoEnabled="+mainItem.videoEnabled +", reset="+cameraLoader.reset)
|
||||||
onActiveChanged: console.log("("+mainItem.qmlName+") Camera active " + active +", visible="+mainItem.visible +", videoEnabled="+mainItem.videoEnabled +", reset="+cameraLoader.reset)
|
|
||||||
sourceComponent: cameraComponent
|
sourceComponent: cameraComponent
|
||||||
}
|
}
|
||||||
Component{
|
Component{
|
||||||
|
|
|
||||||
|
|
@ -164,9 +164,17 @@ MainRightPanel {
|
||||||
]
|
]
|
||||||
content: Flickable {
|
content: Flickable {
|
||||||
id: editionLayout
|
id: editionLayout
|
||||||
contentWidth: Math.round(421 * DefaultStyle.dp)
|
contentWidth: Math.round(Math.min(parent.width, 421 * DefaultStyle.dp))
|
||||||
|
width: parent.width
|
||||||
contentY: 0
|
contentY: 0
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
onClicked: {
|
||||||
|
editionLayout.forceActiveFocus()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
signal ensureVisibleRequested(Item item)
|
signal ensureVisibleRequested(Item item)
|
||||||
|
|
||||||
function ensureVisible(r) {
|
function ensureVisible(r) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue