*/
FriendListPanel(QWidget *parent = 0);
+/*******************************************************************************
+ * BASE CLASS INHERITED AND REIMPLEMENTED MEMBER FUNCTIONS
+ ******************************************************************************/
protected:
+ /**
+ * @brief Used for grabbing the keyboard after the text field is fully initiated.
+ *
+ * @param event
+ */
void showEvent(QShowEvent *event);
/*******************************************************************************
void friendInfoReceived(QList<User *> &friendList);
private:
+ /**
+ * @brief Set visibility for filtering related UI elements
+ *
+ * @param visible True if items should be visible, false if not
+ */
void setFilteringLayoutVisible(bool visible);
private slots:
*/
void clearFriendListFilter();
+ /**
+ * @brief Slot for clearing the friend list filtering.
+ */
void clearFiltering();
+ /**
+ * @brief Set filtering UI elements visibility based on the filtering text value
+ *
+ * Filtering UI elements are invoked when the text becomes not empty and hidden when text
+ * becomes empty.
+ *
+ * @param text New text value
+ */
void filterTextChanged(const QString &text);
/**
* DATA MEMBERS
******************************************************************************/
private:
- QWidget *m_friendListHeaderWidget; ///< Friend list header widget
QLabel *m_friendListLabel; ///< Friend list label
+ QLineEdit *m_filterField; ///< Text field for the filter text
QPushButton *m_clearFilterButton; ///< Button to clear list filtering
- ListView *m_friendListView; ///< Friend list view
- FriendListItemDelegate *m_friendListItemDelegate; ///< Friend list item delegate
+ QPushButton *m_filterClearButton; ///< Button for clearing the filtering
+ QWidget *m_friendListHeaderWidget; ///< Friend list header widget
- QLineEdit *m_filterField;
- QPushButton *m_filterClearButton;
+ FriendListItemDelegate *m_friendListItemDelegate; ///< Friend list item delegate
+ ListView *m_friendListView; ///< Friend list view
};
#endif // FRIENDLISTPANEL_H