Cockatrice 2026-09-01-Development-3.1.0-beta.10
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 valueChanged (QColor accent, int intensity)
 Emitted whenever the accent colour or intensity changes.

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

Detailed Description

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

The panel contains:

  • an accent color picker,
  • an intensity slider.

Whenever either value changes the panel emits valueChanged() with the current accent colour and intensity, which the parent dialog uses to auto-apply the generated palette.

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.

◆ 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.

◆ valueChanged

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

Emitted whenever the accent colour or intensity changes.

The parent dialog consumes this to auto-apply the generated palette without requiring an explicit Generate click.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ accentButton

ColorButton* QuickSetupPanel::accentButton
private

◆ accentLabel

QLabel* QuickSetupPanel::accentLabel
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: