drumstick 2.9.0
C++ MIDI libraries using Qt objects, idioms, and style.
|
The PianoPalette class. More...
#include <pianopalette.h>
Public Member Functions | |
PianoPalette (const int id) | |
PianoPalette::PianoPalette Constructor. More... | |
void | resetColors () |
PianoPalette::resetColors resets the colors to the standard values according to the palette policy identifier. | |
void | retranslateStrings () |
PianoPalette::retranslateStrings retranslates the names and description texts according to the palette policy. | |
int | paletteId () const |
PianoPalette::paletteId palette policy. More... | |
int | getNumColors () const |
PianoPalette::getNumColors palette policy colors size. More... | |
bool | isHighLight () const |
PianoPalette::isHighLight palette function. More... | |
bool | isBackground () const |
PianoPalette::isBackground palette function. More... | |
bool | isForeground () const |
PianoPalette::isForeground palette function. More... | |
QString | paletteName () const |
PianoPalette::paletteName palette policy name. More... | |
void | setPaletteName (const QString &name) |
PianoPalette::setPaletteName changes the palette name. More... | |
QString | paletteText () const |
PianoPalette::paletteText gets the palette description. More... | |
void | setPaletteText (const QString &text) |
PianoPalette::setPaletteText changes the palette description. More... | |
QColor | getColor (const int i) const |
PianoPalette::getColor gets a palette color. More... | |
void | setColor (const int n, const QString &s, const QColor &c) |
PianoPalette::setColor changes a palette color. More... | |
void | setColor (const int n, const QColor &c) |
PianoPalette::setColor changes a palette color. More... | |
QString | getColorName (const int i) const |
PianoPalette::getColorName gets a palette color name. More... | |
void | setColorName (const int n, const QString &s) |
PianoPalette::setColorName changes a palette color name. More... | |
void | saveColors () const |
PianoPalette::saveColors stores the set of colors as persistent settings. | |
void | loadColors () |
PianoPalette::loadColors loads the set of colors from persistent settings. | |
bool | operator== (const PianoPalette &other) const |
PianoPalette::operator == compares two palettes. More... | |
bool | operator!= (const PianoPalette &other) const |
PianoPalette::operator != compares two palettes. More... | |
Static Public Attributes | |
static const QString | QSTR_PALETTEPREFIX = QStringLiteral("Palette_") |
PianoPalette::QSTR_PALETTEPREFIX is the string prefix for all the settings stored as persisting settings. | |
Protected Member Functions | |
void | initialize () |
PianoPalette::initialize reserves and initializes space to store colors according to the palette policy identifier. | |
void | resetPaletteSingle () |
PianoPalette::resetPaletteSingle resets the colors to the standard values for the PAL_SINGLE palette policy. | |
void | resetPaletteDouble () |
PianoPalette::resetPaletteDouble resets the colors to the standard values for the PAL_DOUBLE palette policy. | |
void | resetPaletteChannels () |
PianoPalette::resetPaletteChannels resets the colors to the standard values for the PAL_CHANNELS palette policy. | |
void | resetPaletteScale () |
PianoPalette::resetPaletteScale resets the colors to the standard values for the PAL_SCALE palette policy. | |
void | resetPaletteKeys () |
PianoPalette::resetPaletteKeys resets the colors to the standard values for the PAL_KEYS palette policy. | |
void | resetPaletteFont () |
PianoPalette::resetPaletteFont resets the colors to the standard values for the PAL_FONT palette policy. | |
void | retranslatePaletteSingle () |
PianoPalette::retranslatePaletteSingle retranslates the color names for the PAL_SINGLE palette policy. | |
void | retranslatePaletteDouble () |
PianoPalette::retranslatePaletteDouble retranslates the color names for the PAL_DOUBLE palette policy. | |
void | retranslatePaletteChannels () |
PianoPalette::retranslatePaletteChannels retranslates the color names for the PAL_CHANNELS palette policy. | |
void | retranslatePaletteScale () |
PianoPalette::retranslatePaletteScale retranslates the color names for the PAL_SCALE palette policy. | |
void | retranslatePaletteKeys () |
PianoPalette::retranslatePaletteKeys retranslates the color names for the PAL_KEYS palette policy. | |
void | retranslatePaletteFont () |
PianoPalette::retranslatePaletteFont retranslates the color names for the PAL_FONT palette policy. | |
Friends | |
QDataStream & | operator<< (QDataStream &stream, const PianoPalette &palette) |
Serialize a PianoPalette instance into a QDataStream. More... | |
QDataStream & | operator>> (QDataStream &stream, PianoPalette &palette) |
Deserialize a PianoPalette instance from a QDataStream. More... | |
The PianoPalette class.
PianoPalette represents a set of colors used to paint the PianoKeybd widgets
Definition at line 70 of file pianopalette.h.
|
explicit |
PianoPalette::PianoPalette Constructor.
id | The Palette Policy identifier |
Definition at line 43 of file pianopalette.cpp.
References PianoPalette::initialize(), PianoPalette::resetColors(), and PianoPalette::retranslateStrings().
QColor getColor | ( | const int | i | ) | const |
PianoPalette::getColor gets a palette color.
i | the color number |
Definition at line 460 of file pianopalette.cpp.
QString getColorName | ( | const int | i | ) | const |
PianoPalette::getColorName gets a palette color name.
i | the color number |
Definition at line 473 of file pianopalette.cpp.
int getNumColors | ( | ) | const |
PianoPalette::getNumColors palette policy colors size.
Definition at line 485 of file pianopalette.cpp.
bool isBackground | ( | ) | const |
PianoPalette::isBackground palette function.
Definition at line 389 of file pianopalette.cpp.
References drumstick::widgets::PAL_KEYS, and drumstick::widgets::PAL_SCALE.
bool isForeground | ( | ) | const |
PianoPalette::isForeground palette function.
Definition at line 400 of file pianopalette.cpp.
References drumstick::widgets::PAL_FONT.
bool isHighLight | ( | ) | const |
PianoPalette::isHighLight palette function.
Definition at line 376 of file pianopalette.cpp.
References drumstick::widgets::PAL_CHANNELS, drumstick::widgets::PAL_DOUBLE, drumstick::widgets::PAL_HISCALE, and drumstick::widgets::PAL_SINGLE.
bool operator!= | ( | const PianoPalette & | other | ) | const |
PianoPalette::operator != compares two palettes.
other | another palette object |
Definition at line 584 of file pianopalette.cpp.
bool operator== | ( | const PianoPalette & | other | ) | const |
PianoPalette::operator == compares two palettes.
other | another palette object |
Definition at line 572 of file pianopalette.cpp.
int paletteId | ( | ) | const |
PianoPalette::paletteId palette policy.
Definition at line 410 of file pianopalette.cpp.
QString paletteName | ( | ) | const |
PianoPalette::paletteName palette policy name.
Definition at line 495 of file pianopalette.cpp.
QString paletteText | ( | ) | const |
PianoPalette::paletteText gets the palette description.
Definition at line 517 of file pianopalette.cpp.
void setColor | ( | const int | n, |
const QColor & | c | ||
) |
PianoPalette::setColor changes a palette color.
n | the color number |
c | the color value |
Definition at line 436 of file pianopalette.cpp.
void setColor | ( | const int | n, |
const QString & | s, | ||
const QColor & | c | ||
) |
PianoPalette::setColor changes a palette color.
n | the color number |
s | the color name |
c | the color value |
Definition at line 422 of file pianopalette.cpp.
Referenced by PianoPalette::loadColors(), PianoPalette::resetPaletteChannels(), PianoPalette::resetPaletteDouble(), PianoPalette::resetPaletteFont(), PianoPalette::resetPaletteKeys(), PianoPalette::resetPaletteScale(), and PianoPalette::resetPaletteSingle().
void setColorName | ( | const int | n, |
const QString & | s | ||
) |
PianoPalette::setColorName changes a palette color name.
n | the color number |
s | the color name |
Definition at line 448 of file pianopalette.cpp.
Referenced by PianoPalette::retranslatePaletteChannels(), PianoPalette::retranslatePaletteDouble(), PianoPalette::retranslatePaletteFont(), PianoPalette::retranslatePaletteKeys(), PianoPalette::retranslatePaletteScale(), and PianoPalette::retranslatePaletteSingle().
void setPaletteName | ( | const QString & | name | ) |
PianoPalette::setPaletteName changes the palette name.
name | new name of the palette |
Definition at line 505 of file pianopalette.cpp.
Referenced by PianoPalette::retranslateStrings().
void setPaletteText | ( | const QString & | help | ) |
PianoPalette::setPaletteText changes the palette description.
help | new palette description string |
Definition at line 527 of file pianopalette.cpp.
Referenced by PianoPalette::retranslateStrings().
|
friend |
Serialize a PianoPalette instance into a QDataStream.
stream | a QDataStream |
palette | instance |
Definition at line 595 of file pianopalette.cpp.
|
friend |
Deserialize a PianoPalette instance from a QDataStream.
stream | a QDataStream |
palette | instance |
Definition at line 611 of file pianopalette.cpp.