Provides a compact "Quick Setup" interface for generating theme palettes.
More...
#include <quick_setup_panel.h>
|
| | 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.
|
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.
◆ QuickSetupPanel()
| QuickSetupPanel::QuickSetupPanel |
( |
QWidget * | parent = nullptr | ) |
|
|
explicit |
Constructs the quick setup panel.
- Parameters
-
| parent | Optional parent widget. |
◆ 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
-
| accent | The selected accent color. |
| intensity | The selected intensity value. |
◆ intensity()
| int QuickSetupPanel::intensity |
( |
| ) |
const |
Returns the current intensity slider value.
- Returns
- The selected intensity value.
◆ retranslateUi()
| void QuickSetupPanel::retranslateUi |
( |
| ) |
|
Retranslates all user-visible strings.
Intended to be called when the application language changes.
◆ 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
-
◆ accentButton
◆ 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: