From 3fc7fd8473e545265c705504ee0d5f2a70268282 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 31 May 2015 20:50:14 +0300 Subject: Move function getGradientType, getGradientDelay, getColorWithAlpha from palette to userpalette. --- src/gui/palette.h | 27 --------------------------- src/gui/userpalette.h | 27 +++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 27 deletions(-) (limited to 'src/gui') diff --git a/src/gui/palette.h b/src/gui/palette.h index fcfa40360..aa7d2ecc8 100644 --- a/src/gui/palette.h +++ b/src/gui/palette.h @@ -65,23 +65,6 @@ class Palette notfinal const Color &getCharColor(const signed char c, bool &valid) const A_WARN_UNUSED; - inline const Color &getColorWithAlpha(const int type) A_WARN_UNUSED - { - Color *const col = &mColors[type].color; - col->a = mColors[type].delay; - return *col; - } - - /** - * Gets the GradientType associated with the specified type. - * - * @param type the color type of the color - * - * @return the gradient type of the color with the given index - */ - inline GradientTypeT getGradientType(const int type) const A_WARN_UNUSED - { return mColors[type].grad; } - /** * Get the character used by the specified color. * @@ -92,16 +75,6 @@ class Palette notfinal inline char getColorChar(const int type) const A_WARN_UNUSED { return mColors[type].ch; } - /** - * Gets the gradient delay for the specified type. - * - * @param type the color type of the color - * - * @return the gradient delay of the color with the given index - */ - inline int getGradientDelay(const int type) const A_WARN_UNUSED - { return mColors[type].delay; } - /** * Updates all colors, that are non-static. */ diff --git a/src/gui/userpalette.h b/src/gui/userpalette.h index 744c8441d..525a18492 100644 --- a/src/gui/userpalette.h +++ b/src/gui/userpalette.h @@ -166,6 +166,33 @@ class UserPalette final : public Palette, public ListModel int getIdByChar(const signed char c, bool &valid) const A_WARN_UNUSED; + /** + * Gets the GradientType associated with the specified type. + * + * @param type the color type of the color + * + * @return the gradient type of the color with the given index + */ + inline GradientTypeT getGradientType(const int type) const A_WARN_UNUSED + { return mColors[type].grad; } + + /** + * Gets the gradient delay for the specified type. + * + * @param type the color type of the color + * + * @return the gradient delay of the color with the given index + */ + inline int getGradientDelay(const int type) const A_WARN_UNUSED + { return mColors[type].delay; } + + inline const Color &getColorWithAlpha(const int type) A_WARN_UNUSED + { + Color *const col = &mColors[type].color; + col->a = mColors[type].delay; + return *col; + } + private: /** * Define a color replacement. -- cgit v1.2.3-60-g2f50