Cockatrice 2026-09-01-Development-3.1.0-beta.10
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 user
bool online = false
QPixmap avatar
QPixmap cardArt
CardArtParams params
QString attribution

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 )
Here is the call graph for this function:

Member Data Documentation

◆ attribution

QString UserInfoHeaderWidget::attribution
private

◆ avatar

QPixmap UserInfoHeaderWidget::avatar
private

◆ AvatarPawnSize

int UserInfoHeaderWidget::AvatarPawnSize = 46
staticconstexprprivate

◆ AvatarSize

int UserInfoHeaderWidget::AvatarSize = 68
staticconstexprprivate

◆ AvatarToTextGap

int UserInfoHeaderWidget::AvatarToTextGap = 10
staticconstexprprivate

◆ cardArt

QPixmap UserInfoHeaderWidget::cardArt
private

◆ HeaderHeight

int UserInfoHeaderWidget::HeaderHeight = 130
staticconstexprprivate

◆ LeftPad

int UserInfoHeaderWidget::LeftPad = 14
staticconstexprprivate

◆ online

bool UserInfoHeaderWidget::online = false
private

◆ params

CardArtParams UserInfoHeaderWidget::params
private

◆ user

ServerInfo_User UserInfoHeaderWidget::user
private

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