game_launcher 1.1.0
Modern Linux game launcher with Steam / Proton / Wine integration
Loading...
Searching...
No Matches
GameListDelegate Class Reference

#include <game_list_delegate.h>

Inheritance diagram for GameListDelegate:
Collaboration diagram for GameListDelegate:

Public Member Functions

 GameListDelegate (QObject *parent=nullptr)
const ThemeColors & colors () const
bool editorEvent (QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index) override
void paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override
void setViewMode (ViewMode mode)
void setZoomLevel (int level)
QSize sizeHint (const QStyleOptionViewItem &option, const QModelIndex &index) const override
void updateCachedColors ()
void updateCachedFonts ()
ViewMode viewMode () const
double zoomFactor () const
int zoomLevel () const

Static Public Member Functions

static QColor getProtonDBTierColor (const QString &tier)

Detailed Description

Definition at line 52 of file game_list_delegate.h.

Constructor & Destructor Documentation

◆ GameListDelegate()

GameListDelegate::GameListDelegate ( QObject * parent = nullptr)
explicit

Definition at line 28 of file game_list_delegate.cpp.

References updateCachedColors(), and updateCachedFonts().

Member Function Documentation

◆ colors()

const ThemeColors & GameListDelegate::colors ( ) const
inline

Definition at line 77 of file game_list_delegate.h.

Referenced by paint().

◆ editorEvent()

bool GameListDelegate::editorEvent ( QEvent * event,
QAbstractItemModel * model,
const QStyleOptionViewItem & option,
const QModelIndex & index )
override

Definition at line 820 of file game_list_delegate.cpp.

References Grid.

◆ getProtonDBTierColor()

QColor GameListDelegate::getProtonDBTierColor ( const QString & tier)
static

Definition at line 857 of file game_list_delegate.cpp.

◆ paint()

◆ setViewMode()

void GameListDelegate::setViewMode ( ViewMode mode)
inline

Definition at line 57 of file game_list_delegate.h.

◆ setZoomLevel()

void GameListDelegate::setZoomLevel ( int level)

Definition at line 35 of file game_list_delegate.cpp.

References updateCachedFonts().

◆ sizeHint()

QSize GameListDelegate::sizeHint ( const QStyleOptionViewItem & option,
const QModelIndex & index ) const
override

Definition at line 64 of file game_list_delegate.cpp.

References Compact, Grid, List, and zoomFactor().

◆ updateCachedColors()

void GameListDelegate::updateCachedColors ( )
inline

Definition at line 73 of file game_list_delegate.h.

References ThemeManager::colors(), and ThemeManager::instance().

Referenced by GameListDelegate().

◆ updateCachedFonts()

void GameListDelegate::updateCachedFonts ( )

Definition at line 44 of file game_list_delegate.cpp.

References zoomFactor().

Referenced by GameListDelegate(), and setZoomLevel().

◆ viewMode()

ViewMode GameListDelegate::viewMode ( ) const
inline

Definition at line 61 of file game_list_delegate.h.

◆ zoomFactor()

double GameListDelegate::zoomFactor ( ) const
inline

Definition at line 83 of file game_list_delegate.h.

Referenced by sizeHint(), and updateCachedFonts().

◆ zoomLevel()

int GameListDelegate::zoomLevel ( ) const
inline

Definition at line 67 of file game_list_delegate.h.


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