Floating panel showing an enlarged user card, quick action buttons, and a live scrollable games list.
More...
#include <user_info_popup.h>
|
| | UserInfoPopup (TabSupervisor *_ts, AbstractClient *_client, const QMap< QString, QPixmap > *_avatarCache, const QMap< QString, QPixmap > *_cardArtCache, const QMap< QString, CardArtParams > *_cardArtParamsMap, QWidget *parent) |
| void | showForUser (const QString &userName, const ServerInfo_User &userInfo, bool online, bool isBuddy, bool isIgnored) |
| void | fetchGames () |
| QString | getCurrentUser () const |
| void | updateActionButtons (const ServerInfo_User &userInfo, bool online, bool isBuddy, bool isIgnored) |
| void | refreshHeader () |
| void | setGameInviteAvailable (std::function< bool(const QString &userName)> available) |
Floating panel showing an enlarged user card, quick action buttons, and a live scrollable games list.
Lifecycle (mirrors DeckEditorDeckDockWidget):
- showForUser() — populate, position externally, call show()
- mouseEnteredPopup / mouseLeftPopup — caller manages hide timer
- closeRequested() — emitted by the internal close button
The popup is a Qt::Tool frameless child so windowOpacity animations and move() in screen coordinates work identically to CardInfoPictureEnlargedWidget.
Action signals map 1-to-1 to UserContextMenu::exec*() methods so all action logic stays in one place.
◆ UserInfoPopup()
| UserInfoPopup::UserInfoPopup |
( |
TabSupervisor * | _ts, |
|
|
AbstractClient * | _client, |
|
|
const QMap< QString, QPixmap > * | _avatarCache, |
|
|
const QMap< QString, QPixmap > * | _cardArtCache, |
|
|
const QMap< QString, CardArtParams > * | _cardArtParamsMap, |
|
|
QWidget * | parent ) |
|
explicit |
◆ addBuddyRequested
| void UserInfoPopup::addBuddyRequested |
( |
const QString & | userName | ) |
|
|
signal |
◆ addIgnoreRequested
| void UserInfoPopup::addIgnoreRequested |
( |
const QString & | userName | ) |
|
|
signal |
◆ adminNotesRequested
| void UserInfoPopup::adminNotesRequested |
( |
const QString & | userName | ) |
|
|
signal |
◆ applyTheme()
| void UserInfoPopup::applyTheme |
( |
| ) |
|
|
private |
◆ banHistoryRequested
| void UserInfoPopup::banHistoryRequested |
( |
const QString & | userName | ) |
|
|
signal |
◆ banRequested
| void UserInfoPopup::banRequested |
( |
const QString & | userName | ) |
|
|
signal |
◆ buildUi()
| void UserInfoPopup::buildUi |
( |
| ) |
|
|
private |
◆ chatRequested
| void UserInfoPopup::chatRequested |
( |
const QString & | userName | ) |
|
|
signal |
◆ closeRequested
| void UserInfoPopup::closeRequested |
( |
| ) |
|
|
signal |
◆ demoteFromJudgeRequested
| void UserInfoPopup::demoteFromJudgeRequested |
( |
const QString & | userName | ) |
|
|
signal |
◆ demoteFromModRequested
| void UserInfoPopup::demoteFromModRequested |
( |
const QString & | userName | ) |
|
|
signal |
◆ detailsRequested
| void UserInfoPopup::detailsRequested |
( |
const QString & | userName | ) |
|
|
signal |
◆ enterEvent()
| void UserInfoPopup::enterEvent |
( |
QEnterEvent * | e | ) |
|
|
overrideprotected |
◆ fetchGames()
| void UserInfoPopup::fetchGames |
( |
| ) |
|
◆ getCurrentUser()
| QString UserInfoPopup::getCurrentUser |
( |
| ) |
const |
|
inlinenodiscard |
◆ inviteRequested
| void UserInfoPopup::inviteRequested |
( |
const QString & | userName | ) |
|
|
signal |
◆ joinGameRequested
| void UserInfoPopup::joinGameRequested |
( |
int | gameId, |
|
|
int | roomId, |
|
|
bool | asSpectator ) |
|
signal |
Emitted when the user requests joining or spectating a game in the list.
◆ leaveEvent()
| void UserInfoPopup::leaveEvent |
( |
QEvent * | e | ) |
|
|
overrideprotected |
◆ mouseEnteredPopup
| void UserInfoPopup::mouseEnteredPopup |
( |
| ) |
|
|
signal |
◆ mouseLeftPopup
| void UserInfoPopup::mouseLeftPopup |
( |
| ) |
|
|
signal |
◆ onGamesContextMenu
| void UserInfoPopup::onGamesContextMenu |
( |
const QPoint & | pos | ) |
|
|
privateslot |
◆ onGamesReceived
| void UserInfoPopup::onGamesReceived |
( |
const Response & | r, |
|
|
const QString & | forUser ) |
|
privateslot |
◆ promoteToJudgeRequested
| void UserInfoPopup::promoteToJudgeRequested |
( |
const QString & | userName | ) |
|
|
signal |
◆ promoteToModRequested
| void UserInfoPopup::promoteToModRequested |
( |
const QString & | userName | ) |
|
|
signal |
◆ rebuildActionButtons()
| void UserInfoPopup::rebuildActionButtons |
( |
const ServerInfo_User & | userInfo, |
|
|
bool | online, |
|
|
bool | isBuddy, |
|
|
bool | isIgnored ) |
|
private |
◆ refreshGames
| void UserInfoPopup::refreshGames |
( |
| ) |
|
|
privateslot |
◆ refreshHeader()
| void UserInfoPopup::refreshHeader |
( |
| ) |
|
Re-pulls the avatar/card art for the currently shown user (e.g. after it loads).
◆ removeBuddyRequested
| void UserInfoPopup::removeBuddyRequested |
( |
const QString & | userName | ) |
|
|
signal |
◆ removeIgnoreRequested
| void UserInfoPopup::removeIgnoreRequested |
( |
const QString & | userName | ) |
|
|
signal |
◆ setGameInviteAvailable()
| void UserInfoPopup::setGameInviteAvailable |
( |
std::function< bool(const QString &userName)> | available | ) |
|
|
inline |
Sets a predicate evaluated on every action-button rebuild. It receives the name of the user the popup currently shows; when it returns true an "Invite" button is shown. The popup itself never resolves the invite link, it just forwards the request.
◆ showForUser()
| void UserInfoPopup::showForUser |
( |
const QString & | userName, |
|
|
const ServerInfo_User & | userInfo, |
|
|
bool | online, |
|
|
bool | isBuddy, |
|
|
bool | isIgnored ) |
Populate the popup for userName and kick off a game list fetch. Call show() / move() externally after this.
◆ showGamesRequested
| void UserInfoPopup::showGamesRequested |
( |
const QString & | userName | ) |
|
|
signal |
◆ updateActionButtons()
| void UserInfoPopup::updateActionButtons |
( |
const ServerInfo_User & | userInfo, |
|
|
bool | online, |
|
|
bool | isBuddy, |
|
|
bool | isIgnored ) |
Called when buddy/ignore status changes externally while popup is open.
◆ warnHistoryRequested
| void UserInfoPopup::warnHistoryRequested |
( |
const QString & | userName | ) |
|
|
signal |
◆ warnRequested
| void UserInfoPopup::warnRequested |
( |
const QString & | userName | ) |
|
|
signal |
◆ actionArea
| QWidget* UserInfoPopup::actionArea |
|
private |
◆ avatarCache
| const QMap<QString, QPixmap>* UserInfoPopup::avatarCache |
|
private |
◆ cardArtCache
| const QMap<QString, QPixmap>* UserInfoPopup::cardArtCache |
|
private |
◆ cardArtParamsMap
| const QMap<QString, CardArtParams>* UserInfoPopup::cardArtParamsMap |
|
private |
◆ client
◆ closeBtn
| QPushButton* UserInfoPopup::closeBtn |
|
private |
◆ currentOnline
| bool UserInfoPopup::currentOnline = false |
|
private |
◆ currentUser
| QString UserInfoPopup::currentUser |
|
private |
◆ currentUserInfo
◆ gameInviteAvailable
| std::function<bool(const QString &userName)> UserInfoPopup::gameInviteAvailable |
|
private |
◆ gamesLabel
| QLabel* UserInfoPopup::gamesLabel |
|
private |
◆ gamesModel
| QStandardItemModel* UserInfoPopup::gamesModel |
|
private |
◆ gamesStatus
| QLabel* UserInfoPopup::gamesStatus |
|
private |
◆ gamesView
| QListView* UserInfoPopup::gamesView |
|
private |
◆ header
◆ PopupWidth
| int UserInfoPopup::PopupWidth = 316 |
|
staticconstexprprivate |
◆ refreshBtn
| QPushButton* UserInfoPopup::refreshBtn |
|
private |
◆ separator
| QFrame* UserInfoPopup::separator |
|
private |
◆ theme
◆ ts
The documentation for this class was generated from the following files: