this, SIGNAL(findFriend(GeoCoordinate)));
connect(m_clearFilterButton, SIGNAL(clicked()),
- this, SLOT(clearFiltering()));
+ this, SLOT(clearFriendGroupFiltering()));
connect(m_routeButton, SIGNAL(clicked()),
this, SLOT(routeToSelectedFriend()));
filteringLayout->addWidget(m_filterField);
connect(m_filterField, SIGNAL(returnPressed()),
- this, SLOT(clearFiltering()));
+ this, SLOT(clearTextFiltering()));
connect(m_filterField, SIGNAL(textChanged(QString)),
this, SLOT(filterTextChanged(QString)));
m_filterClearButton->setIcon(QIcon::fromTheme(QLatin1String("general_close")));
connect(m_filterClearButton, SIGNAL(clicked()),
- this, SLOT(clearFiltering()));
+ this, SLOT(clearTextFiltering()));
connect(qApp, SIGNAL(topmostWindowChanged(bool)),
this, SLOT(topmostWindowChanged(bool)));
m_somePanelIsOpen = false;
updateKeyboardGrabbing();
- clearFiltering();
+ clearFriendGroupFiltering();
}
void FriendListPanel::anyPanelOpened()
updateKeyboardGrabbing();
}
-void FriendListPanel::clearFiltering()
+void FriendListPanel::clearFriendGroupFiltering()
{
- qWarning() << __PRETTY_FUNCTION__;
-
m_friendListHeaderWidget->hide();
m_friendListView->clearFilter();
+ clearTextFiltering();
+}
+
+void FriendListPanel::clearTextFiltering()
+{
+ qWarning() << __PRETTY_FUNCTION__;
// clearing the filtering text field does cause also hiding the filtering layout
m_filterField->clear();
QWidget::hideEvent(event);
updateKeyboardGrabbing();
- clearFiltering();
+ clearFriendGroupFiltering();
}
void FriendListPanel::routeToSelectedFriend()
m_friendListHeaderWidget->show();
m_friendListView->filter(userIDs);
- // hide the text filtering fields
- setFilteringLayoutVisibility(false);
+ clearTextFiltering();
emit showPanelRequested(this);
}
/**
* @brief Re-implemented from QWidget::hideEvent()
*
- * Calls updateKeyboardGrabbing().
+ * Calls updateKeyboardGrabbing() and clearFriendGroupFiltering().
*
* @param event
*/
/**
* @brief Called when any of the panel tabs is closed
*
- * Does clear the filtering. Calls updateKeyboardGrabbing() for releasing the grabbing when
- * FriendListPanel is closed, not changed to other panel. In this case the hideEvent() is
- * not triggered.
+ * Does call clearFriendGroupFiltering().
+ *
+ * Calls updateKeyboardGrabbing() for releasing the grabbing when FriendListPanel is closed, not
+ * changed to other panel. In this case the hideEvent() is not triggered.
*/
void anyPanelClosed();
void anyPanelOpened();
/**
- * @brief Slot for clearing the friend list filtering.
+ * @brief Slot for clearing the friend group filtering
+ *
+ * Does also call clearTextFiltering().
+ */
+ void clearFriendGroupFiltering();
+
+ /**
+ * @brief Slot for clearing the text based filtering.
+ *
+ * Does clear only the text based filtering. Friend group based filtering is not affected.
*/
- void clearFiltering();
+ void clearTextFiltering();
/**
* @brief Updates the filtering when filtering text value is changed