From 8efc8808f78a1eef1c216ff4444e3468053ccfec Mon Sep 17 00:00:00 2001 From: defnax Date: Thu, 18 Oct 2012 22:30:32 +0000 Subject: [PATCH] Added Search Filter for the FriendsList git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5691 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/gui/FriendsDialog.cpp | 5 ++++ retroshare-gui/src/gui/FriendsDialog.ui | 33 ++++++++++++++++-------- 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/retroshare-gui/src/gui/FriendsDialog.cpp b/retroshare-gui/src/gui/FriendsDialog.cpp index 4ec399fec..74131769d 100644 --- a/retroshare-gui/src/gui/FriendsDialog.cpp +++ b/retroshare-gui/src/gui/FriendsDialog.cpp @@ -95,6 +95,11 @@ FriendsDialog::FriendsDialog(QWidget *parent) connect( ui.actionAdd_Friend, SIGNAL(triggered()), this, SLOT(addFriend())); connect( ui.actionCreate_new_Chat_lobby, SIGNAL(triggered()), this, SLOT(createChatLobby())); connect( ui.actionFriendRecommendations, SIGNAL(triggered()), this, SLOT(recommendFriends())); + connect( ui.filter_lineEdit, SIGNAL(textChanged(QString)), ui.friendList, SLOT(filterItems(QString))); + +#if QT_VERSION >= 0x040700 + ui.filter_lineEdit->setPlaceholderText(tr("Search")) ; +#endif ui.avatar->setFrameType(AvatarWidget::STATUS_FRAME); ui.avatar->setOwnId(); diff --git a/retroshare-gui/src/gui/FriendsDialog.ui b/retroshare-gui/src/gui/FriendsDialog.ui index 09028003b..c79506aa3 100644 --- a/retroshare-gui/src/gui/FriendsDialog.ui +++ b/retroshare-gui/src/gui/FriendsDialog.ui @@ -6,25 +6,22 @@ 0 0 - 764 - 428 + 755 + 491 - + Qt::Horizontal - - - 6 + + + 1 - - 0 - - + QFrame::Box @@ -137,7 +134,10 @@ - + + + + @@ -151,6 +151,12 @@ 0 + + + 16777215 + 16777215 + + @@ -903,6 +909,11 @@
gui/chat/ChatTabWidget.h
1 + + LineEditClear + QLineEdit +
gui/common/LineEditClear.h
+