lmms
Cross-platform music production software
Loading...
Searching...
No Matches
lmms::gui::ColorChooser Class Reference

#include <ColorChooser.h>

Inheritance diagram for lmms::gui::ColorChooser:

Public Types

enum class  Palette { Default , Track , Mixer }

Public Member Functions

 ColorChooser (const QColor &initial, QWidget *parent)
 ColorChooser (QWidget *parent)
 ColorChooser ()=default
 For getting a color without having to initialise a color dialog.
void setPalette (QVector< QColor >)
 Set global palette via array, checking bounds.
void setPalette (Palette)
 Set global paletter via enum.
ColorChooser * withPalette (Palette)
 Set palette via enum, return self pointer for chaining.

Static Public Member Functions

static QVector< QColor > getPalette (Palette)
 Return a certain palette.

Protected Member Functions

void keyReleaseEvent (QKeyEvent *event) override
 Forward key events to the parent to prevent stuck notes when the dialog gets focus.

Static Private Member Functions

static QVector< QColor > defaultPalette ()
 Copy the current QColorDialog palette into an array.
static QVector< QColor > nicePalette (int)
 Generate a nice palette, with adjustable value.

Member Enumeration Documentation

◆ Palette

Enumerator
Default 
Track 
Mixer 

Constructor & Destructor Documentation

◆ ColorChooser() [1/3]

lmms::gui::ColorChooser::ColorChooser ( const QColor & initial,
QWidget * parent )
inline

◆ ColorChooser() [2/3]

lmms::gui::ColorChooser::ColorChooser ( QWidget * parent)
inline

◆ ColorChooser() [3/3]

lmms::gui::ColorChooser::ColorChooser ( )
default

For getting a color without having to initialise a color dialog.

Member Function Documentation

◆ defaultPalette()

QVector< QColor > lmms::gui::ColorChooser::defaultPalette ( )
staticprivate

Copy the current QColorDialog palette into an array.

◆ getPalette()

QVector< QColor > lmms::gui::ColorChooser::getPalette ( Palette palette)
static

Return a certain palette.

◆ keyReleaseEvent()

void lmms::gui::ColorChooser::keyReleaseEvent ( QKeyEvent * event)
inlineoverrideprotected

Forward key events to the parent to prevent stuck notes when the dialog gets focus.

◆ nicePalette()

QVector< QColor > lmms::gui::ColorChooser::nicePalette ( int base)
staticprivate

Generate a nice palette, with adjustable value.

◆ setPalette() [1/2]

void lmms::gui::ColorChooser::setPalette ( Palette palette)

Set global paletter via enum.

◆ setPalette() [2/2]

void lmms::gui::ColorChooser::setPalette ( QVector< QColor > colors)

Set global palette via array, checking bounds.

◆ withPalette()

ColorChooser * lmms::gui::ColorChooser::withPalette ( Palette palette)

Set palette via enum, return self pointer for chaining.


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