#include <user_list_widget.h>
|
| | UserListWidget (TabSupervisor *_tabSupervisor, AbstractClient *_client, UserListType _type, QWidget *parent=nullptr, bool hasUserInfoPopup=true) |
| | ~UserListWidget () override |
| void | bind (UserListManager *mgr) |
| void | applyDisplayMode () |
| void | beginBulkLoad () |
| void | endBulkLoad () |
| bool | eventFilter (QObject *obj, QEvent *event) override |
| void | retranslateUi () |
| void | rebuild () |
| void | processUserInfo (const ServerInfo_User &user, bool online) |
| bool | deleteUser (const QString &userName) |
| void | setUserOnline (const QString &userName, bool online) |
| void | setFilterText (const QString &text) |
| void | setShowTitle (bool showTitle) |
| void | setSectioned (const QList< Section > &ids) |
| void | setSectionExpanded (Section section, bool expanded) |
| void | setUserFilter (std::function< bool(const QString &userName, bool online)> filter) |
| int | visibleUserRowCount () const |
| bool | getHasUserInfoPopup () const |
| const QList< Section > & | getSectionIds () const |
| const QMap< QString, UserListTWI * > & | getUsers () const |
| void | showContextMenu (const QPoint &pos, const QModelIndex &index) |
| void | sortItems () |
| void | setGameInviteLinkProvider (std::function< QList< GameInviteOption >()> provider) |
|
| void | showPopupForUser (UserListTWI *item) |
| void | hidePopup (bool immediate=false) |
| void | positionPopup (UserListTWI *item) |
| void | connectPopupSignals () |
| bool | isPressInsideListUi (const QWidget *widget) const |
| void | clearSelectionAndClosePopup () |
| bool | isItemNearViewport (const UserListTWI *item) const |
| void | requestVisibleItemResources () |
| void | createSectionItems () |
| QTreeWidgetItem * | createSectionItem (Section section) |
| QString | sectionTitle (Section section) const |
| void | updateSectionDivider (Section section) |
| void | handleSectionExpansion (QTreeWidgetItem *item, bool expanded) |
| void | setExpandedProgrammatically (QTreeWidgetItem *item, bool expanded) |
| void | handleOnlineChange (const ServerInfo_User &user) |
| void | handleOnlineChangeLeft (const QString &userName) |
| void | handleListAdd (Section section, const ServerInfo_User &user) |
| void | handleListRemove (Section section, const QString &userName) |
| UserListTWI * | ensureSectionMembership (Section section, const ServerInfo_User &user, bool online) |
| bool | dropSectionMembership (Section section, const QString &userName) |
| void | finishSectionedMutation () |
| void | updateCardArtParams (const ServerInfo_User &user, const QString &userName) |
| void | processUserInfo (Section section, const ServerInfo_User &user, bool online) |
| void | updateCount () |
| void | applyFilter () |
| void | refreshPopupButtons (const QString &userName) |
◆ Section
| Enumerator |
|---|
| Buddy | |
| Online | |
| Ignore | |
◆ UserListType
| Enumerator |
|---|
| AllUsersList | |
| RoomList | |
| BuddyList | |
| IgnoreList | |
◆ UserListWidget()
◆ ~UserListWidget()
| UserListWidget::~UserListWidget |
( |
| ) |
|
|
override |
◆ addBuddy
| void UserListWidget::addBuddy |
( |
const QString & | userName | ) |
|
|
signal |
◆ addIgnore
| void UserListWidget::addIgnore |
( |
const QString & | userName | ) |
|
|
signal |
◆ applyDisplayMode()
| void UserListWidget::applyDisplayMode |
( |
| ) |
|
◆ applyFilter()
| void UserListWidget::applyFilter |
( |
| ) |
|
|
private |
◆ beginBulkLoad()
| void UserListWidget::beginBulkLoad |
( |
| ) |
|
◆ bind()
◆ clearSelectionAndClosePopup()
| void UserListWidget::clearSelectionAndClosePopup |
( |
| ) |
|
|
private |
◆ connectPopupSignals()
| void UserListWidget::connectPopupSignals |
( |
| ) |
|
|
private |
◆ createSectionItem()
| QTreeWidgetItem * UserListWidget::createSectionItem |
( |
Section | section | ) |
|
|
private |
◆ createSectionItems()
| void UserListWidget::createSectionItems |
( |
| ) |
|
|
private |
◆ currentUserChanged
| void UserListWidget::currentUserChanged |
( |
const QString & | userName | ) |
|
|
signal |
Dialog mode: the current row changed; empty string means no user row.
◆ deleteUser()
| bool UserListWidget::deleteUser |
( |
const QString & | userName | ) |
|
◆ dropSectionMembership()
| bool UserListWidget::dropSectionMembership |
( |
Section | section, |
|
|
const QString & | userName ) |
|
private |
Removes and deletes the row for userName in section.
◆ endBulkLoad()
| void UserListWidget::endBulkLoad |
( |
| ) |
|
◆ ensureSectionMembership()
Creates or updates the row for user in section.
◆ eventFilter()
| bool UserListWidget::eventFilter |
( |
QObject * | obj, |
|
|
QEvent * | event ) |
|
override |
◆ finishSectionedMutation()
| void UserListWidget::finishSectionedMutation |
( |
| ) |
|
|
private |
Sorts, refilters and repaints after a sectioned mode mutation.
◆ getHasUserInfoPopup()
| bool UserListWidget::getHasUserInfoPopup |
( |
| ) |
const |
|
inlinenodiscard |
◆ getSectionIds()
| const QList< Section > & UserListWidget::getSectionIds |
( |
| ) |
const |
|
inlinenodiscard |
◆ getUsers()
| const QMap< QString, UserListTWI * > & UserListWidget::getUsers |
( |
| ) |
const |
|
inlinenodiscard |
◆ handleListAdd()
◆ handleListRemove()
| void UserListWidget::handleListRemove |
( |
Section | section, |
|
|
const QString & | userName ) |
|
private |
◆ handleOnlineChange()
◆ handleOnlineChangeLeft()
| void UserListWidget::handleOnlineChangeLeft |
( |
const QString & | userName | ) |
|
|
private |
◆ handleSectionExpansion()
| void UserListWidget::handleSectionExpansion |
( |
QTreeWidgetItem * | item, |
|
|
bool | expanded ) |
|
private |
◆ hideEvent()
| void UserListWidget::hideEvent |
( |
QHideEvent * | e | ) |
|
|
overrideprotected |
◆ hidePopup()
| void UserListWidget::hidePopup |
( |
bool | immediate = false | ) |
|
|
private |
◆ isItemNearViewport()
| bool UserListWidget::isItemNearViewport |
( |
const UserListTWI * | item | ) |
const |
|
private |
◆ isPressInsideListUi()
| bool UserListWidget::isPressInsideListUi |
( |
const QWidget * | widget | ) |
const |
|
private |
True when widget is the tree, the popup or an open menu.
◆ joinGameRequested
| void UserListWidget::joinGameRequested |
( |
int | gameId, |
|
|
int | roomId, |
|
|
bool | asSpectator ) |
|
signal |
◆ openMessageDialog
| void UserListWidget::openMessageDialog |
( |
const QString & | userName, |
|
|
bool | focus ) |
|
signal |
◆ positionPopup()
| void UserListWidget::positionPopup |
( |
UserListTWI * | item | ) |
|
|
private |
◆ processUserInfo() [1/2]
| void UserListWidget::processUserInfo |
( |
const ServerInfo_User & | user, |
|
|
bool | online ) |
◆ processUserInfo() [2/2]
◆ rebuild()
| void UserListWidget::rebuild |
( |
| ) |
|
◆ refreshPopupButtons()
| void UserListWidget::refreshPopupButtons |
( |
const QString & | userName | ) |
|
|
private |
◆ refreshVisibleUserHeader
| void UserListWidget::refreshVisibleUserHeader |
( |
const QString & | name | ) |
|
|
privateslot |
◆ removeBuddy
| void UserListWidget::removeBuddy |
( |
const QString & | userName | ) |
|
|
signal |
◆ removeIgnore
| void UserListWidget::removeIgnore |
( |
const QString & | userName | ) |
|
|
signal |
◆ requestVisibleItemResources()
| void UserListWidget::requestVisibleItemResources |
( |
| ) |
|
|
private |
◆ retranslateUi()
| void UserListWidget::retranslateUi |
( |
| ) |
|
◆ sectionExpanded
| void UserListWidget::sectionExpanded |
( |
Section | section, |
|
|
bool | expanded ) |
|
signal |
◆ sectionTitle()
| QString UserListWidget::sectionTitle |
( |
Section | section | ) |
const |
|
nodiscardprivate |
◆ setExpandedProgrammatically()
| void UserListWidget::setExpandedProgrammatically |
( |
QTreeWidgetItem * | item, |
|
|
bool | expanded ) |
|
private |
◆ setFilterText()
| void UserListWidget::setFilterText |
( |
const QString & | text | ) |
|
◆ setGameInviteLinkProvider()
| void UserListWidget::setGameInviteLinkProvider |
( |
std::function< QList< GameInviteOption >()> | provider | ) |
|
◆ setSectioned()
| void UserListWidget::setSectioned |
( |
const QList< Section > & | ids | ) |
|
◆ setSectionExpanded()
| void UserListWidget::setSectionExpanded |
( |
Section | section, |
|
|
bool | expanded ) |
◆ setShowTitle()
| void UserListWidget::setShowTitle |
( |
bool | showTitle | ) |
|
◆ setUserFilter()
| void UserListWidget::setUserFilter |
( |
std::function< bool(const QString &userName, bool online)> | filter | ) |
|
|
inline |
Dialog mode: rows that fail the predicate are never shown.
◆ setUserOnline()
| void UserListWidget::setUserOnline |
( |
const QString & | userName, |
|
|
bool | online ) |
◆ showContextMenu()
| void UserListWidget::showContextMenu |
( |
const QPoint & | pos, |
|
|
const QModelIndex & | index ) |
◆ showEvent()
| void UserListWidget::showEvent |
( |
QShowEvent * | e | ) |
|
|
overrideprotected |
◆ showPopupForUser()
| void UserListWidget::showPopupForUser |
( |
UserListTWI * | item | ) |
|
|
private |
Popup functions are anchored on the row, not the user name. In sectioned mode a user can own several rows (online + buddy), and the popup must follow the hovered/selected row rather than a lookup by name.
◆ sortItems()
| void UserListWidget::sortItems |
( |
| ) |
|
◆ updateCardArtParams()
| void UserListWidget::updateCardArtParams |
( |
const ServerInfo_User & | user, |
|
|
const QString & | userName ) |
|
private |
◆ updateCount()
| void UserListWidget::updateCount |
( |
| ) |
|
|
private |
◆ updateSectionDivider()
| void UserListWidget::updateSectionDivider |
( |
Section | section | ) |
|
|
private |
◆ userActivated
| void UserListWidget::userActivated |
( |
const QString & | userName | ) |
|
|
signal |
Dialog mode: the user activated (Enter/double-click) the given row.
◆ userClicked
| void UserListWidget::userClicked |
( |
QTreeWidgetItem * | item, |
|
|
int | column ) |
|
privateslot |
◆ userListChanged
| void UserListWidget::userListChanged |
( |
| ) |
|
|
signal |
The set of visible rows changed (filter, search or a live mutation).
◆ visibleUserRowCount()
| int UserListWidget::visibleUserRowCount |
( |
| ) |
const |
|
nodiscard |
◆ avatarProvider
◆ bulkLoading
| bool UserListWidget::bulkLoading = false |
|
private |
◆ cardArtParamsMap
◆ cardArtProvider
◆ client
◆ expandedSections
| QSet<Section> UserListWidget::expandedSections |
|
private |
◆ filterText
| QString UserListWidget::filterText |
|
private |
◆ hasUserInfoPopup
| bool UserListWidget::hasUserInfoPopup = true |
|
private |
◆ hidePopupTimer
| QTimer* UserListWidget::hidePopupTimer = nullptr |
|
private |
◆ hoveredUser
| QString UserListWidget::hoveredUser |
|
private |
◆ itemDelegate
◆ manager
◆ onlineCount
| int UserListWidget::onlineCount |
|
private |
◆ popupPinned
| bool UserListWidget::popupPinned = false |
|
private |
◆ sectioned
| bool UserListWidget::sectioned = false |
|
private |
◆ sectionIds
| QList<Section> UserListWidget::sectionIds |
|
private |
◆ sectionItems
| QMap<Section, QTreeWidgetItem *> UserListWidget::sectionItems |
|
private |
◆ sectionUsers
◆ showPopupTimer
| QTimer* UserListWidget::showPopupTimer = nullptr |
|
private |
◆ showTitle
| bool UserListWidget::showTitle = true |
|
private |
◆ tabSupervisor
◆ titleStr
| QString UserListWidget::titleStr |
|
private |
◆ type
◆ userContextMenu
◆ userFilter
| std::function<bool(const QString &userName, bool online)> UserListWidget::userFilter |
|
private |
◆ userInfoPopup
◆ users
◆ userTree
| QTreeWidget* UserListWidget::userTree = nullptr |
|
private |
The documentation for this class was generated from the following files: