mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-30 10:29:24 +00:00
unstable
This commit is contained in:
parent
c8a7651b99
commit
5d575b4b75
9 changed files with 45 additions and 23 deletions
|
|
@ -127,6 +127,7 @@
|
|||
<file>ui/modules/Linphone/Presence/PresenceString.qml</file>
|
||||
<file>ui/modules/Linphone/qmldir</file>
|
||||
<file>ui/modules/Linphone/Select/SelectContact.qml</file>
|
||||
<file>ui/modules/Linphone/SmartSearchBar.qml</file>
|
||||
<file>ui/modules/Linphone/Styles/Account/AccountStatusStyle.qml</file>
|
||||
<file>ui/modules/Linphone/Styles/ChatStyle.qml</file>
|
||||
<file>ui/modules/Linphone/Styles/Contact/AvatarStyle.qml</file>
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
// ===================================================================
|
||||
|
||||
class ContactModel : public QObject {
|
||||
friend class ContactsListModel;
|
||||
friend class ContactsListProxyModel;
|
||||
|
||||
Q_OBJECT;
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ bool ContactsListModel::removeRows (int row, int count, const QModelIndex &paren
|
|||
ContactModel *contact = m_list[row];
|
||||
|
||||
m_list.removeAt(row);
|
||||
m_linphone_friends->removeFriend(contact->m_linphone_friend);
|
||||
contact->deleteLater();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ public:
|
|||
bool removeRow (int row, const QModelIndex &parent = QModelIndex());
|
||||
bool removeRows (int row, int count, const QModelIndex &parent = QModelIndex());
|
||||
|
||||
|
||||
public slots:
|
||||
// See: http://doc.qt.io/qt-5/qtqml-cppintegration-data.html#data-ownership
|
||||
// The returned value must have a explicit parent or a QQmlEngine::CppOwnership.
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
#include "SmartSearchBarModel.hpp"
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
#ifndef SMART_SEARCH_BAR_MODEL_H_
|
||||
#define SMART_SEARCH_BAR_MODEL_H_
|
||||
|
||||
class SmartSearchBarModel {
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
25
tests/ui/modules/Linphone/SmartSearchBar.qml
Normal file
25
tests/ui/modules/Linphone/SmartSearchBar.qml
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
import Common 1.0
|
||||
import Linphone 1.0
|
||||
|
||||
// ===================================================================
|
||||
|
||||
SearchBox {
|
||||
id: searchBox
|
||||
|
||||
delegate: Contact {
|
||||
contact: $contact
|
||||
width: parent.width
|
||||
|
||||
actions: [
|
||||
ActionButton {
|
||||
icon: 'call'
|
||||
onClicked: CallsWindow.show()
|
||||
},
|
||||
|
||||
ActionButton {
|
||||
icon: 'video_call'
|
||||
onClicked: CallsWindow.show()
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -27,5 +27,8 @@ PresenceString 1.0 Presence/PresenceString.qml
|
|||
# Select
|
||||
SelectContact 1.0 Select/SelectContact.qml
|
||||
|
||||
# SmartSearchBar
|
||||
SmartSearchBar 1.0 SmartSearchBar.qml
|
||||
|
||||
# Timeline
|
||||
Timeline 1.0 Timeline.qml
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ ApplicationWindow {
|
|||
visible: true
|
||||
|
||||
onActiveFocusItemChanged: activeFocusItem == null &&
|
||||
searchBox.hideMenu()
|
||||
smartSearchBar.hideMenu()
|
||||
|
||||
// -----------------------------------------------------------------
|
||||
// Toolbar properties.
|
||||
|
|
@ -82,32 +82,14 @@ ApplicationWindow {
|
|||
}
|
||||
}
|
||||
|
||||
SearchBox {
|
||||
id: searchBox
|
||||
SmartSearchBar {
|
||||
id: smartSearchBar
|
||||
|
||||
Layout.fillWidth: true
|
||||
entryHeight: MainWindowStyle.searchBox.entryHeight
|
||||
maxMenuHeight: MainWindowStyle.searchBox.maxHeight
|
||||
placeholderText: qsTr('mainSearchBarPlaceholder')
|
||||
|
||||
model: ContactsListProxyModel {}
|
||||
|
||||
delegate: Contact {
|
||||
contact: $contact
|
||||
width: parent.width
|
||||
|
||||
actions: [
|
||||
ActionButton {
|
||||
icon: 'call'
|
||||
onClicked: CallsWindow.show()
|
||||
},
|
||||
|
||||
ActionButton {
|
||||
icon: 'video_call'
|
||||
onClicked: CallsWindow.show()
|
||||
}
|
||||
]
|
||||
}
|
||||
placeholderText: qsTr('mainSearchBarPlaceholder')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue