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

Paints the enlarged banner card art + circular avatar section at the top of the UserInfoPopup. More...

#include <user_info_popup.h>

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

Public Member Functions

 UserInfoHeaderWidget (QWidget *parent=nullptr)
void setUserData (const ServerInfo_User &user, bool online, const QPixmap &avatar, const QPixmap &cardArt, const CardArtParams &params)

Protected Member Functions

void paintEvent (QPaintEvent *e) override

Private Attributes

ServerInfo_User m_user
bool m_online = false
QPixmap m_avatar
QPixmap m_cardArt
CardArtParams m_params

Static Private Attributes

static constexpr int HeaderHeight = 130
static constexpr int AvatarSize = 68
static constexpr int AvatarPawnSize = 46
static constexpr int LeftPad = 14
static constexpr int AvatarToTextGap = 10

Detailed Description

Paints the enlarged banner card art + circular avatar section at the top of the UserInfoPopup.

Layout mirrors UserListPainter but at a larger scale: the card art fills the full width as a semi-transparent background, a bottom gradient ensures the avatar and username text remain legible, and the status ring colour matches the UserListPainter convention.

Constructor & Destructor Documentation

◆ UserInfoHeaderWidget()

UserInfoHeaderWidget::UserInfoHeaderWidget ( QWidget * parent = nullptr)
explicit

Member Function Documentation

◆ paintEvent()

void UserInfoHeaderWidget::paintEvent ( QPaintEvent * e)
overrideprotected
Here is the call graph for this function:

◆ setUserData()

void UserInfoHeaderWidget::setUserData ( const ServerInfo_User & user,
bool online,
const QPixmap & avatar,
const QPixmap & cardArt,
const CardArtParams & params )

Member Data Documentation

◆ AvatarPawnSize

int UserInfoHeaderWidget::AvatarPawnSize = 46
staticconstexprprivate

◆ AvatarSize

int UserInfoHeaderWidget::AvatarSize = 68
staticconstexprprivate

◆ AvatarToTextGap

int UserInfoHeaderWidget::AvatarToTextGap = 10
staticconstexprprivate

◆ HeaderHeight

int UserInfoHeaderWidget::HeaderHeight = 130
staticconstexprprivate

◆ LeftPad

int UserInfoHeaderWidget::LeftPad = 14
staticconstexprprivate

◆ m_avatar

QPixmap UserInfoHeaderWidget::m_avatar
private

◆ m_cardArt

QPixmap UserInfoHeaderWidget::m_cardArt
private

◆ m_online

bool UserInfoHeaderWidget::m_online = false
private

◆ m_params

CardArtParams UserInfoHeaderWidget::m_params
private

◆ m_user

ServerInfo_User UserInfoHeaderWidget::m_user
private

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