mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-06 05:23:56 -07:00
Doxygen properly.
Took 1 minute
This commit is contained in:
parent
b26092f9cc
commit
829d1a1e9c
1 changed files with 53 additions and 4 deletions
|
|
@ -10,23 +10,72 @@ class QHBoxLayout;
|
||||||
class QLabel;
|
class QLabel;
|
||||||
class QSlider;
|
class QSlider;
|
||||||
|
|
||||||
// The "Quick Setup" bar: accent color picker + intensity slider.
|
/**
|
||||||
// Emits generateRequested() when the user clicks Generate.
|
* @class QuickSetupPanel
|
||||||
// The dialog connects that signal and calls PaletteGenerator::fromAccent().
|
* @brief 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.
|
||||||
|
*/
|
||||||
class QuickSetupPanel : public QWidget
|
class QuickSetupPanel : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* @brief Constructs the quick setup panel.
|
||||||
|
*
|
||||||
|
* @param parent Optional parent widget.
|
||||||
|
*/
|
||||||
explicit QuickSetupPanel(QWidget *parent = nullptr);
|
explicit QuickSetupPanel(QWidget *parent = nullptr);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Retranslates all user-visible strings.
|
||||||
|
*
|
||||||
|
* Intended to be called when the application language changes.
|
||||||
|
*/
|
||||||
void retranslateUi();
|
void retranslateUi();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Returns the currently selected accent color.
|
||||||
|
*
|
||||||
|
* @return The selected accent color.
|
||||||
|
*/
|
||||||
QColor accentColor() const;
|
QColor accentColor() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Returns the current intensity slider value.
|
||||||
|
*
|
||||||
|
* @return The selected intensity value.
|
||||||
|
*/
|
||||||
int intensity() const;
|
int intensity() const;
|
||||||
|
|
||||||
// Called by the dialog when switching schemes, to keep the swatch in sync
|
/**
|
||||||
|
* @brief Updates the displayed accent color.
|
||||||
|
*
|
||||||
|
* Used by the parent dialog when switching schemes to keep
|
||||||
|
* the color swatch synchronized with the active palette.
|
||||||
|
*
|
||||||
|
* @param c The new accent color.
|
||||||
|
*/
|
||||||
void setAccentColor(const QColor &c);
|
void setAccentColor(const QColor &c);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
/**
|
||||||
|
* @brief Emitted when the user requests palette generation.
|
||||||
|
*
|
||||||
|
* @param accent The selected accent color.
|
||||||
|
* @param intensity The selected intensity value.
|
||||||
|
*/
|
||||||
void generateRequested(QColor accent, int intensity);
|
void generateRequested(QColor accent, int intensity);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue