Cockatrice 2026-09-01-Development-3.1.0-beta.10
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
SettingsSearchDelegate Class Reference

Custom paint delegate for settings search result items. More...

#include <settings_search_delegate.h>

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

Public Member Functions

 SettingsSearchDelegate (QObject *parent=nullptr)
void paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override
QSize sizeHint (const QStyleOptionViewItem &option, const QModelIndex &index) const override
void setPageNames (const QStringList &names)
 Sets the translated page names for breadcrumb display.
void setPageIcons (const QStringList &iconResources)
 Sets the icons shown in front of results, indexed by page position.

Private Attributes

QStringList pageNames
 Translated page names indexed by page position.
QList< QPixmap > pageIcons
 Icons of the related settings pages.

Detailed Description

Custom paint delegate for settings search result items.

Renders each search result with a breadcrumb line ("Page > Group"), the setting label, and a subtle separator. Supports selected/hovered states.

Constructor & Destructor Documentation

◆ SettingsSearchDelegate()

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

Member Function Documentation

◆ paint()

void SettingsSearchDelegate::paint ( QPainter * painter,
const QStyleOptionViewItem & option,
const QModelIndex & index ) const
override

◆ setPageIcons()

void SettingsSearchDelegate::setPageIcons ( const QStringList & iconResources)

Sets the icons shown in front of results, indexed by page position.

◆ setPageNames()

void SettingsSearchDelegate::setPageNames ( const QStringList & names)

Sets the translated page names for breadcrumb display.

◆ sizeHint()

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

Member Data Documentation

◆ pageIcons

QList<QPixmap> SettingsSearchDelegate::pageIcons
private

Icons of the related settings pages.

◆ pageNames

QStringList SettingsSearchDelegate::pageNames
private

Translated page names indexed by page position.


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