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

First-run theme step. Reuses the same building blocks as Appearance settings and the Palette Editor (ThemeManager, PaletteConfig, PaletteGenerator, and the QuickSetupPanel widget itself) rather than reimplementing palette generation or preview here. More...

#include <theme_setup_page.h>

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

Public Member Functions

 ThemeSetupPage (QWidget *parent=nullptr)
void initializePage () override
 Called every time the page becomes visible, including navigating back to it.
bool validatePage () override
 Called before advancing past this page. Return false to block navigation; the page itself is responsible for telling the user why.
bool isSkippable () const override
 Whether the wizard's "Skip" button should be offered on this page.
QString stepTitle () const override
QString stepSubtitle () const override
void retranslateUi () override
Public Member Functions inherited from FirstRunWizardPage
 FirstRunWizardPage (QWidget *parent=nullptr)
virtual bool isComplete () const
 Whether Next/Finish should currently be enabled. Pages doing async work can flip this mid-step; emit completeChanged() when they do.
virtual QString nextButtonText () const
 Override to replace the "Next"/"Finish" button text on this page. Return an empty string to use the default label.
virtual bool handleNextClick ()
 Called when the user presses the Next button. Return true to allow advancing to the next page, false to stay on this page (e.g. to trigger an async action first).

Private Slots

void onThemeChanged (int index)
void onSchemeChanged ()
void onGenerateFromAccent (const QColor &accent, int intensity)
void onHomeTabBackgroundChanged (int index)

Private Member Functions

QString currentScheme () const
QString resolvedScheme () const
void maybeAutoGeneratePalette ()
QString writableThemeDir () const

Private Attributes

QComboBox * themeCombo
QComboBox * schemeCombo
QGroupBox * accentGroup
QuickSetupPanelquickSetupPanel
QComboBox * homeTabBackgroundCombo
bool paletteDirty = false

Additional Inherited Members

Signals inherited from FirstRunWizardPage
void completeChanged ()
void advanceRequested ()

Detailed Description

First-run theme step. Reuses the same building blocks as Appearance settings and the Palette Editor (ThemeManager, PaletteConfig, PaletteGenerator, and the QuickSetupPanel widget itself) rather than reimplementing palette generation or preview here.

Behavior specific to this page (deliberately not pushed down into ThemeManager, to avoid changing app-wide behaviour for existing installs):

  • Opening the page never changes the running palette; previews and auto-generation only happen when the user actually changes a control.
  • If a theme+scheme the user selects has no saved palette and no shipped default, one is generated from the QuickSetupPanel's current accent so the preview doesn't fall back to a flat, unstyled look.

Constructor & Destructor Documentation

◆ ThemeSetupPage()

ThemeSetupPage::ThemeSetupPage ( QWidget * parent = nullptr)
explicit
Here is the call graph for this function:

Member Function Documentation

◆ currentScheme()

QString ThemeSetupPage::currentScheme ( ) const
private
Here is the caller graph for this function:

◆ initializePage()

void ThemeSetupPage::initializePage ( )
overridevirtual

Called every time the page becomes visible, including navigating back to it.

Reimplemented from FirstRunWizardPage.

Here is the call graph for this function:

◆ isSkippable()

bool ThemeSetupPage::isSkippable ( ) const
overridevirtual

Whether the wizard's "Skip" button should be offered on this page.

Reimplemented from FirstRunWizardPage.

◆ maybeAutoGeneratePalette()

void ThemeSetupPage::maybeAutoGeneratePalette ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ onGenerateFromAccent

void ThemeSetupPage::onGenerateFromAccent ( const QColor & accent,
int intensity )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ onHomeTabBackgroundChanged

void ThemeSetupPage::onHomeTabBackgroundChanged ( int index)
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ onSchemeChanged

void ThemeSetupPage::onSchemeChanged ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ onThemeChanged

void ThemeSetupPage::onThemeChanged ( int index)
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ resolvedScheme()

QString ThemeSetupPage::resolvedScheme ( ) const
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ retranslateUi()

void ThemeSetupPage::retranslateUi ( )
overridevirtual

Implements FirstRunWizardPage.

Here is the caller graph for this function:

◆ stepSubtitle()

QString ThemeSetupPage::stepSubtitle ( ) const
overridevirtual

Reimplemented from FirstRunWizardPage.

◆ stepTitle()

QString ThemeSetupPage::stepTitle ( ) const
overridevirtual

Implements FirstRunWizardPage.

◆ validatePage()

bool ThemeSetupPage::validatePage ( )
overridevirtual

Called before advancing past this page. Return false to block navigation; the page itself is responsible for telling the user why.

Reimplemented from FirstRunWizardPage.

Here is the call graph for this function:

◆ writableThemeDir()

QString ThemeSetupPage::writableThemeDir ( ) const
private
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ accentGroup

QGroupBox* ThemeSetupPage::accentGroup
private

◆ homeTabBackgroundCombo

QComboBox* ThemeSetupPage::homeTabBackgroundCombo
private

◆ paletteDirty

bool ThemeSetupPage::paletteDirty = false
private

◆ quickSetupPanel

QuickSetupPanel* ThemeSetupPage::quickSetupPanel
private

◆ schemeCombo

QComboBox* ThemeSetupPage::schemeCombo
private

◆ themeCombo

QComboBox* ThemeSetupPage::themeCombo
private

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