Cockatrice 2026-06-27-Development-3.1.0-beta.3
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
UserListWidget Class Reference

#include <user_list_widget.h>

Inheritance diagram for UserListWidget:
[legend]
Collaboration diagram for UserListWidget:
[legend]

Public Types

enum  UserListType { AllUsersList , RoomList , BuddyList , IgnoreList }

Signals

void openMessageDialog (const QString &userName, bool focus)
void addBuddy (const QString &userName)
void removeBuddy (const QString &userName)
void addIgnore (const QString &userName)
void removeIgnore (const QString &userName)
void joinGameRequested (int gameId, int roomId, bool asSpectator)

Public Member Functions

 UserListWidget (TabSupervisor *_tabSupervisor, AbstractClient *_client, UserListType _type, QWidget *parent=nullptr)
void bind (UserListManager *mgr)
void applyDisplayMode ()
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)
const QMap< QString, UserListTWI * > & getUsers () const
void showContextMenu (const QPoint &pos, const QModelIndex &index)
void sortItems ()

Protected Member Functions

void hideEvent (QHideEvent *e) override

Private Slots

void userClicked (QTreeWidgetItem *item, int column)

Private Member Functions

void showPopupForUser (const QString &userName)
void hidePopup (bool immediate=false)
void positionPopup (const QString &userName)
void connectPopupSignals ()
void updateCount ()
void refreshPopupButtons (const QString &userName)

Private Attributes

UserListManagermanager = nullptr
UserAvatarProvideravatarProvider = nullptr
UserCardArtProvidercardArtProvider = nullptr
QMap< QString, CardArtParamscardArtParamsMap
UserInfoPopupm_userInfoPopup = nullptr
QTimer * m_showPopupTimer = nullptr
QTimer * m_hidePopupTimer = nullptr
QString m_hoveredUser
bool m_popupPinned = false
QMap< QString, UserListTWI * > users
TabSupervisortabSupervisor
AbstractClientclient
UserListType type
QTreeWidget * userTree
UserListItemDelegateitemDelegate
UserContextMenuuserContextMenu
int onlineCount
QString titleStr

Member Enumeration Documentation

◆ UserListType

Enumerator
AllUsersList 
RoomList 
BuddyList 
IgnoreList 

Constructor & Destructor Documentation

◆ UserListWidget()

UserListWidget::UserListWidget ( TabSupervisor * _tabSupervisor,
AbstractClient * _client,
UserListType _type,
QWidget * parent = nullptr )
Here is the call graph for this function:

Member Function Documentation

◆ addBuddy

void UserListWidget::addBuddy ( const QString & userName)
signal

◆ addIgnore

void UserListWidget::addIgnore ( const QString & userName)
signal

◆ applyDisplayMode()

void UserListWidget::applyDisplayMode ( )
Here is the call graph for this function:

◆ bind()

void UserListWidget::bind ( UserListManager * mgr)
Here is the call graph for this function:

◆ connectPopupSignals()

void UserListWidget::connectPopupSignals ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ deleteUser()

bool UserListWidget::deleteUser ( const QString & userName)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ eventFilter()

bool UserListWidget::eventFilter ( QObject * obj,
QEvent * event )
override
Here is the call graph for this function:

◆ getUsers()

const QMap< QString, UserListTWI * > & UserListWidget::getUsers ( ) const
inlinenodiscard

◆ hideEvent()

void UserListWidget::hideEvent ( QHideEvent * e)
overrideprotected
Here is the call graph for this function:

◆ hidePopup()

void UserListWidget::hidePopup ( bool immediate = false)
private
Here is the caller graph for this function:

◆ joinGameRequested

void UserListWidget::joinGameRequested ( int gameId,
int roomId,
bool asSpectator )
signal

◆ openMessageDialog

void UserListWidget::openMessageDialog ( const QString & userName,
bool focus )
signal
Here is the caller graph for this function:

◆ positionPopup()

void UserListWidget::positionPopup ( const QString & userName)
private
Here is the caller graph for this function:

◆ processUserInfo()

void UserListWidget::processUserInfo ( const ServerInfo_User & user,
bool online )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rebuild()

void UserListWidget::rebuild ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ refreshPopupButtons()

void UserListWidget::refreshPopupButtons ( const QString & userName)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeBuddy

void UserListWidget::removeBuddy ( const QString & userName)
signal

◆ removeIgnore

void UserListWidget::removeIgnore ( const QString & userName)
signal

◆ retranslateUi()

void UserListWidget::retranslateUi ( )
Here is the call graph for this function:

◆ setUserOnline()

void UserListWidget::setUserOnline ( const QString & userName,
bool online )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ showContextMenu()

void UserListWidget::showContextMenu ( const QPoint & pos,
const QModelIndex & index )
Here is the call graph for this function:

◆ showPopupForUser()

void UserListWidget::showPopupForUser ( const QString & userName)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sortItems()

void UserListWidget::sortItems ( )
Here is the caller graph for this function:

◆ updateCount()

void UserListWidget::updateCount ( )
private
Here is the caller graph for this function:

◆ userClicked

void UserListWidget::userClicked ( QTreeWidgetItem * item,
int column )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ avatarProvider

UserAvatarProvider* UserListWidget::avatarProvider = nullptr
private

◆ cardArtParamsMap

QMap<QString, CardArtParams> UserListWidget::cardArtParamsMap
private

◆ cardArtProvider

UserCardArtProvider* UserListWidget::cardArtProvider = nullptr
private

◆ client

AbstractClient* UserListWidget::client
private

◆ itemDelegate

UserListItemDelegate* UserListWidget::itemDelegate
private

◆ m_hidePopupTimer

QTimer* UserListWidget::m_hidePopupTimer = nullptr
private

◆ m_hoveredUser

QString UserListWidget::m_hoveredUser
private

◆ m_popupPinned

bool UserListWidget::m_popupPinned = false
private

◆ m_showPopupTimer

QTimer* UserListWidget::m_showPopupTimer = nullptr
private

◆ m_userInfoPopup

UserInfoPopup* UserListWidget::m_userInfoPopup = nullptr
private

◆ manager

UserListManager* UserListWidget::manager = nullptr
private

◆ onlineCount

int UserListWidget::onlineCount
private

◆ tabSupervisor

TabSupervisor* UserListWidget::tabSupervisor
private

◆ titleStr

QString UserListWidget::titleStr
private

◆ type

UserListType UserListWidget::type
private

◆ userContextMenu

UserContextMenu* UserListWidget::userContextMenu
private

◆ users

QMap<QString, UserListTWI *> UserListWidget::users
private

◆ userTree

QTreeWidget* UserListWidget::userTree
private

The documentation for this class was generated from the following files: