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

#include <user_list_painter.h>

Classes

struct  Badge

Static Public Member Functions

static void paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index, const ServerInfo_User &userInfo, const QMap< QString, QPixmap > *avatarCache, const QMap< QString, QPixmap > *cardArtCache, const QMap< QString, CardArtParams > *cardArtParamsMap)
static QSize sizeHint ()
static void drawCardArt (QPainter *painter, const QRect &rect, int cardRight, const QString &userName, const QMap< QString, QPixmap > *cardArtCache, const CardArtParams &params, const QPixmap *overridePixmap)

Static Private Member Functions

static QColor getAccentColor (const UserLevelFlags &userLevel, bool online)
static int getCardRight (const QStyleOptionViewItem &option, const QRect &rect)
static void drawBackground (QPainter *painter, const QRectF &cardRect, const QColor &accentColor, bool selected)
static QRect getAvatarRect (const QRect &rect)
static void drawAvatar (QPainter *painter, const QRect &avatarRect, const QString &userName, const QColor &accentColor, const UserLevelFlags &userLevel, const ServerInfo_User &userInfo, const QString &privLevel, const QMap< QString, QPixmap > *avatarCache)
static void drawStatusRing (QPainter *painter, const QRect &avatarRect, bool online)
static void drawUserName (QPainter *painter, const QStyleOptionViewItem &option, const QRect &rect, int cardRight, int textX, const QString &userName, bool online, bool selected)
static void drawCountryFlag (QPainter *painter, const QRect &rect, int textX, const ServerInfo_User &userInfo)
static QList< BadgebuildBadges (const UserLevelFlags &userLevel, const QString &privLevel)
static void drawBadges (QPainter *painter, const QStyleOptionViewItem &option, const QRect &rect, int cardRight, const QList< Badge > &badges, bool online)

Member Function Documentation

◆ buildBadges()

QList< UserListPainter::Badge > UserListPainter::buildBadges ( const UserLevelFlags & userLevel,
const QString & privLevel )
staticprivate
Here is the caller graph for this function:

◆ drawAvatar()

void UserListPainter::drawAvatar ( QPainter * painter,
const QRect & avatarRect,
const QString & userName,
const QColor & accentColor,
const UserLevelFlags & userLevel,
const ServerInfo_User & userInfo,
const QString & privLevel,
const QMap< QString, QPixmap > * avatarCache )
staticprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawBackground()

void UserListPainter::drawBackground ( QPainter * painter,
const QRectF & cardRect,
const QColor & accentColor,
bool selected )
staticprivate
Here is the caller graph for this function:

◆ drawBadges()

void UserListPainter::drawBadges ( QPainter * painter,
const QStyleOptionViewItem & option,
const QRect & rect,
int cardRight,
const QList< Badge > & badges,
bool online )
staticprivate
Here is the caller graph for this function:

◆ drawCardArt()

void UserListPainter::drawCardArt ( QPainter * painter,
const QRect & rect,
int cardRight,
const QString & userName,
const QMap< QString, QPixmap > * cardArtCache,
const CardArtParams & params,
const QPixmap * overridePixmap = nullptr )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawCountryFlag()

void UserListPainter::drawCountryFlag ( QPainter * painter,
const QRect & rect,
int textX,
const ServerInfo_User & userInfo )
staticprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawStatusRing()

void UserListPainter::drawStatusRing ( QPainter * painter,
const QRect & avatarRect,
bool online )
staticprivate
Here is the caller graph for this function:

◆ drawUserName()

void UserListPainter::drawUserName ( QPainter * painter,
const QStyleOptionViewItem & option,
const QRect & rect,
int cardRight,
int textX,
const QString & userName,
bool online,
bool selected )
staticprivate
Here is the caller graph for this function:

◆ getAccentColor()

QColor UserListPainter::getAccentColor ( const UserLevelFlags & userLevel,
bool online )
staticprivate
Here is the caller graph for this function:

◆ getAvatarRect()

QRect UserListPainter::getAvatarRect ( const QRect & rect)
staticprivate
Here is the caller graph for this function:

◆ getCardRight()

int UserListPainter::getCardRight ( const QStyleOptionViewItem & option,
const QRect & rect )
staticprivate
Here is the caller graph for this function:

◆ paint()

void UserListPainter::paint ( QPainter * painter,
const QStyleOptionViewItem & option,
const QModelIndex & index,
const ServerInfo_User & userInfo,
const QMap< QString, QPixmap > * avatarCache,
const QMap< QString, QPixmap > * cardArtCache,
const QMap< QString, CardArtParams > * cardArtParamsMap )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sizeHint()

QSize UserListPainter::sizeHint ( )
static
Here is the caller graph for this function:

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