Commit 5d575b4b authored by Ronan Abhamon's avatar Ronan Abhamon

unstable

parent c8a7651b
......@@ -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.
......
#include "SmartSearchBarModel.hpp"
#ifndef SMART_SEARCH_BAR_MODEL_H_
#define SMART_SEARCH_BAR_MODEL_H_
class SmartSearchBarModel {
};
#endif
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')
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment