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

Provides a compact "Quick Setup" interface for generating theme palettes. More...

#include <quick_setup_panel.h>

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

Signals

void generateRequested (QColor accent, int intensity)
 Emitted when the user requests palette generation.

Public Member Functions

 QuickSetupPanel (QWidget *parent=nullptr)
 Constructs the quick setup panel.
void retranslateUi ()
 Retranslates all user-visible strings.
QColor accentColor () const
 Returns the currently selected accent color.
int intensity () const
 Returns the current intensity slider value.
void setAccentColor (const QColor &c)
 Updates the displayed accent color.

Private Attributes

QHBoxLayout * layout
QLabel * heading
QLabel * accentLabel
ColorButtonaccentButton
QLabel * intensityLabel
QLabel * labelLow
QLabel * labelHigh
QSlider * intensitySlider
QLabel * intensityPercentageLabel
QPushButton * generateButton

Detailed Description

Provides a compact "Quick Setup" interface for generating theme palettes.

The panel contains:

  • an accent color picker,
  • an intensity slider,
  • and a generate button.

When the user clicks the generate button, the panel emits generateRequested() with the currently selected accent color and intensity value.

Typically used together with PaletteGenerator::fromAccent() to quickly generate color schemes from a chosen accent color.

Constructor & Destructor Documentation

◆ QuickSetupPanel()

QuickSetupPanel::QuickSetupPanel ( QWidget * parent = nullptr)
explicit

Constructs the quick setup panel.

Parameters
parentOptional parent widget.
Here is the call graph for this function:

Member Function Documentation

◆ accentColor()

QColor QuickSetupPanel::accentColor ( ) const

Returns the currently selected accent color.

Returns
The selected accent color.

◆ generateRequested

void QuickSetupPanel::generateRequested ( QColor accent,
int intensity )
signal

Emitted when the user requests palette generation.

Parameters
accentThe selected accent color.
intensityThe selected intensity value.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ intensity()

int QuickSetupPanel::intensity ( ) const

Returns the current intensity slider value.

Returns
The selected intensity value.
Here is the caller graph for this function:

◆ retranslateUi()

void QuickSetupPanel::retranslateUi ( )

Retranslates all user-visible strings.

Intended to be called when the application language changes.

Here is the caller graph for this function:

◆ setAccentColor()

void QuickSetupPanel::setAccentColor ( const QColor & c)

Updates the displayed accent color.

Used by the parent dialog when switching schemes to keep the color swatch synchronized with the active palette.

Parameters
cThe new accent color.

Member Data Documentation

◆ accentButton

ColorButton* QuickSetupPanel::accentButton
private

◆ accentLabel

QLabel* QuickSetupPanel::accentLabel
private

◆ generateButton

QPushButton* QuickSetupPanel::generateButton
private

◆ heading

QLabel* QuickSetupPanel::heading
private

◆ intensityLabel

QLabel* QuickSetupPanel::intensityLabel
private

◆ intensityPercentageLabel

QLabel* QuickSetupPanel::intensityPercentageLabel
private

◆ intensitySlider

QSlider* QuickSetupPanel::intensitySlider
private

◆ labelHigh

QLabel* QuickSetupPanel::labelHigh
private

◆ labelLow

QLabel* QuickSetupPanel::labelLow
private

◆ layout

QHBoxLayout* QuickSetupPanel::layout
private

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