11 changes: 7 additions & 4 deletions mythtv/libs/libmythui/mythrender_opengl2.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef MYTHRENDEROPENGL2_H
#define MYTHRENDEROPENGL2_H

#include <QStack>

#include "mythrender_opengl.h"
#include "mythrender_opengl_defs2.h"

Expand All @@ -16,6 +18,7 @@ typedef enum
} DefaultShaders;

class MythGLShaderObject;
class GLMatrix;

class MUI_PUBLIC MythRenderOpenGL2 : public MythRenderOpenGL
{
Expand All @@ -31,6 +34,9 @@ class MUI_PUBLIC MythRenderOpenGL2 : public MythRenderOpenGL

virtual bool RectanglesAreAccelerated(void) { return true; }

virtual void PushTransformation(const UIEffects &fx, QPointF &center) ;
virtual void PopTransformation(void);

protected:
virtual ~MythRenderOpenGL2();
virtual void DrawBitmapPriv(uint tex, const QRect *src, const QRect *dst,
Expand All @@ -54,8 +60,6 @@ class MUI_PUBLIC MythRenderOpenGL2 : public MythRenderOpenGL
virtual void DeleteOpenGLResources(void);
virtual void SetMatrixView(void);

void SetScaling(int horizontal, int vertical);
void SetRotation(int degrees);
void CreateDefaultShaders(void);
void DeleteDefaultShaders(void);
uint CreateShader(int type, const QString &source);
Expand All @@ -70,8 +74,7 @@ class MUI_PUBLIC MythRenderOpenGL2 : public MythRenderOpenGL
// State
uint m_active_obj;
float m_projection[4][4];
float m_scale[4][4];
float m_rotate[4][4];
QStack<GLMatrix> m_transforms;
float m_parameters[4][4];
QString m_qualifiers;
QString m_GLSLVersion;
Expand Down
6 changes: 5 additions & 1 deletion mythtv/libs/libmythui/mythscreentype.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,8 @@ void MythScreenType::aboutToHide(void)
GetMythMainWindow()->GetPaintWindow()->setMask(m_SavedMask);
}
}

ActivateAnimations(MythUIAnimation::AboutToHide);
}

void MythScreenType::aboutToShow(void)
Expand All @@ -253,6 +255,8 @@ void MythScreenType::aboutToShow(void)
GetMythMainWindow()->GetPaintWindow()->setMask(region);
}
}

ActivateAnimations(MythUIAnimation::AboutToShow);
}

bool MythScreenType::IsDeleting(void) const
Expand Down Expand Up @@ -546,7 +550,7 @@ bool MythScreenType::ParseElement(
}
else
{
return false;
return MythUIType::ParseElement(filename, element, showWarnings);
}

return true;
Expand Down
296 changes: 296 additions & 0 deletions mythtv/libs/libmythui/mythuianimation.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,296 @@
#include "mythuianimation.h"
#include "mythuitype.h"
#include "mythmainwindow.h"

#include <QDomDocument>

MythUIAnimation::MythUIAnimation(MythUIType* parent, Trigger trigger, Type type)
: m_parent(parent), m_type(type), m_trigger(trigger),
m_centre(UIEffects::Middle), m_active(false), m_looped(false),
m_reversible(false)
{
}

void MythUIAnimation::Activate(void)
{
m_active = true;
setCurrentTime(0);
}

void MythUIAnimation::updateCurrentValue(const QVariant& value)
{
if (!m_active)
return;

m_value = value;
if (m_parent)
{
m_parent->SetCentre(m_centre);

if (Position == m_type)
m_parent->SetPosition(m_value.toPoint());
else if (Alpha == m_type)
m_parent->SetAlpha(m_value.toInt());
else if (Zoom == m_type)
m_parent->SetZoom(m_value.toFloat());
else if (HorizontalZoom == m_type)
m_parent->SetHorizontalZoom(m_value.toFloat());
else if (VerticalZoom == m_type)
m_parent->SetVerticalZoom(m_value.toFloat());
else if (Angle == m_type)
m_parent->SetAngle(m_value.toFloat());
}
}

void MythUIAnimation::CopyFrom(const MythUIAnimation* animation)
{
m_type = animation->m_type;
m_value = animation->m_value;
m_trigger = animation->m_trigger;
m_looped = animation->m_looped;
m_reversible = animation->m_reversible;
m_centre = animation->m_centre;

setStartValue(animation->startValue());
setEndValue(animation->endValue());
setEasingCurve(animation->easingCurve());
setDuration(animation->duration());
if (m_looped)
setLoopCount(-1);
}

void MythUIAnimation::IncrementCurrentTime(void)
{
if (!m_active)
return;

int time = currentTime();
if (direction() == Forward)
time += GetMythMainWindow()->GetDrawInterval();
else
time -= GetMythMainWindow()->GetDrawInterval();

setCurrentTime(time);

if (endValue() == currentValue())
{
if (direction() == Forward)
{
if (m_reversible)
setDirection(Backward);
else if (!m_looped)
m_active = false;
}
}
else if (startValue() == currentValue())
{
if (direction() == Backward)
{
if (m_reversible)
setDirection(Forward);
else if (!m_looped)
m_active = false;
}
}
}

void MythUIAnimation::SetEasingCurve(const QString& curve)
{
if (curve == "Linear") setEasingCurve(QEasingCurve::Linear);
else if (curve == "InQuad") setEasingCurve(QEasingCurve::InQuad);
else if (curve == "OutQuad") setEasingCurve(QEasingCurve::OutQuad);
else if (curve == "InOutQuad") setEasingCurve(QEasingCurve::InOutQuad);
else if (curve == "OutInQuad") setEasingCurve(QEasingCurve::OutInQuad);
else if (curve == "InCubic") setEasingCurve(QEasingCurve::InCubic);
else if (curve == "OutCubic") setEasingCurve(QEasingCurve::OutCubic);
else if (curve == "InOutCubic") setEasingCurve(QEasingCurve::InOutCubic);
else if (curve == "OutInCubic") setEasingCurve(QEasingCurve::OutInCubic);
else if (curve == "InQuart") setEasingCurve(QEasingCurve::InQuart);
else if (curve == "OutQuart") setEasingCurve(QEasingCurve::OutQuart);
else if (curve == "InOutQuart") setEasingCurve(QEasingCurve::InOutQuart);
else if (curve == "OutInQuart") setEasingCurve(QEasingCurve::OutInQuart);
else if (curve == "InQuint") setEasingCurve(QEasingCurve::InQuint);
else if (curve == "OutQuint") setEasingCurve(QEasingCurve::OutQuint);
else if (curve == "InOutQuint") setEasingCurve(QEasingCurve::InOutQuint);
else if (curve == "OutInQuint") setEasingCurve(QEasingCurve::OutInQuint);
else if (curve == "InSine") setEasingCurve(QEasingCurve::InSine);
else if (curve == "OutSine") setEasingCurve(QEasingCurve::OutSine);
else if (curve == "InOutSine") setEasingCurve(QEasingCurve::InOutSine);
else if (curve == "OutInSine") setEasingCurve(QEasingCurve::OutInSine);
else if (curve == "InExpo") setEasingCurve(QEasingCurve::InExpo);
else if (curve == "OutExpo") setEasingCurve(QEasingCurve::OutExpo);
else if (curve == "InOutExpo") setEasingCurve(QEasingCurve::InOutExpo);
else if (curve == "OutInExpo") setEasingCurve(QEasingCurve::OutInExpo);
else if (curve == "InCirc") setEasingCurve(QEasingCurve::InCirc);
else if (curve == "OutCirc") setEasingCurve(QEasingCurve::OutCirc);
else if (curve == "InOutCirc") setEasingCurve(QEasingCurve::InOutCirc);
else if (curve == "OutInCirc") setEasingCurve(QEasingCurve::OutInCirc);
else if (curve == "InElastic") setEasingCurve(QEasingCurve::InElastic);
else if (curve == "OutElastic") setEasingCurve(QEasingCurve::OutElastic);
else if (curve == "InOutElastic") setEasingCurve(QEasingCurve::InOutElastic);
else if (curve == "OutInElastic") setEasingCurve(QEasingCurve::OutInElastic);
else if (curve == "InOutBack") setEasingCurve(QEasingCurve::InOutBack);
else if (curve == "OutInBack") setEasingCurve(QEasingCurve::OutInBack);
else if (curve == "InBounce") setEasingCurve(QEasingCurve::InBounce);
else if (curve == "OutBounce") setEasingCurve(QEasingCurve::OutBounce);
else if (curve == "InOutBounce") setEasingCurve(QEasingCurve::InOutBounce);
else if (curve == "OutInBounce") setEasingCurve(QEasingCurve::OutInBounce);
else if (curve == "InCurve") setEasingCurve(QEasingCurve::InCurve);
else if (curve == "OutCurve") setEasingCurve(QEasingCurve::OutCurve);
else if (curve == "SineCurve") setEasingCurve(QEasingCurve::SineCurve);
else if (curve == "CosineCurve") setEasingCurve(QEasingCurve::CosineCurve);
}

void MythUIAnimation::SetCentre(const QString &centre)
{
if (centre == "topleft") m_centre = UIEffects::TopLeft;
else if (centre == "top") m_centre = UIEffects::Top;
else if (centre == "topright") m_centre = UIEffects::TopRight;
else if (centre == "left") m_centre = UIEffects::Left;
else if (centre == "middle") m_centre = UIEffects::Middle;
else if (centre == "right") m_centre = UIEffects::Right;
else if (centre == "bottomleft") m_centre = UIEffects::BottomLeft;
else if (centre == "bottom") m_centre = UIEffects::Bottom;
else if (centre == "bottomright") m_centre = UIEffects::BottomRight;
}

void MythUIAnimation::ParseElement(const QDomElement &element,
MythUIType* parent)
{
QString t = element.attribute("trigger", "AboutToShow");
Trigger trigger = AboutToShow;
if ("AboutToHide" == t)
trigger = AboutToHide;

for (QDomNode child = element.firstChild(); !child.isNull();
child = child.nextSibling())
{
QDomElement section = child.toElement();
if (section.isNull())
continue;
if (section.tagName() == "section")
ParseSection(section, parent, trigger);
}
}

void MythUIAnimation::ParseSection(const QDomElement &element,
MythUIType* parent, Trigger trigger)
{
int duration = element.attribute("duration", "500").toInt();
QString centre = element.attribute("centre", "Middle");
for (QDomNode child = element.firstChild(); !child.isNull();
child = child.nextSibling())
{
QDomElement effect = child.toElement();
if (effect.isNull())
continue;

Type type = Alpha;
int effectduration = duration;
// override individual durations
QString effect_duration = effect.attribute("duration", "");
if (!effect_duration.isEmpty())
effectduration = effect_duration.toInt();

bool looped = parseBool(effect.attribute("looped", "false"));
bool reversible = parseBool(effect.attribute("reversible", "false"));
QString easingcurve = effect.attribute("easingcurve", "Linear");
QVariant start;
QVariant end;

QString fxtype = effect.tagName();
if (fxtype == "alpha")
{
type = Alpha;
parseAlpha(effect, start, end);
}
else if (fxtype == "position")
{
type = Position;
parsePosition(effect, start, end, parent);
}
else if (fxtype == "angle")
{
type = Angle;
parseAngle(effect, start, end);
}
else if (fxtype == "zoom")
{
type = Zoom;
parseZoom(effect, start, end);
}
else if (fxtype == "horizontalzoom")
{
type = HorizontalZoom;
parseZoom(effect, start, end);
}
else if (fxtype == "verticalzoom")
{
type = VerticalZoom;
parseZoom(effect, start, end);
}
else
continue;

MythUIAnimation* a = new MythUIAnimation(parent, trigger, type);
a->setStartValue(start);
a->setEndValue(end);
a->setDuration(effectduration);
a->SetEasingCurve(easingcurve);
a->SetCentre(centre);
a->SetLooped(looped);
a->SetReversible(reversible);
if (looped)
a->setLoopCount(-1);
parent->GetAnimations()->append(a);
}
}

void MythUIAnimation::parseAlpha(const QDomElement& element,
QVariant& startValue, QVariant& endValue)
{
startValue = element.attribute("start", "0").toInt();
endValue = element.attribute("end", "0").toInt();
}

void MythUIAnimation::parsePosition(const QDomElement& element,
QVariant& startValue, QVariant& endValue,
MythUIType *parent)
{
MythPoint start = parsePoint(element.attribute("start", "0,0"), false);
MythPoint startN = parsePoint(element.attribute("start", "0,0"));
MythPoint end = parsePoint(element.attribute("end", "0,0"), false);
MythPoint endN = parsePoint(element.attribute("end", "0,0"));

if (start.x() == -1)
startN.setX(parent->GetArea().x());

if (start.y() == -1)
startN.setY(parent->GetArea().y());

if (end.x() == -1)
endN.setX(parent->GetArea().x());

if (end.y() == -1)
endN.setY(parent->GetArea().y());

startN.CalculatePoint(parent->GetArea());
endN.CalculatePoint(parent->GetArea());

startValue = startN.toQPoint();
endValue = endN.toQPoint();
}

void MythUIAnimation::parseZoom(const QDomElement& element,
QVariant& startValue, QVariant& endValue)
{
startValue = element.attribute("start", "0").toFloat() / 100.0;
endValue = element.attribute("end", "0").toFloat() /100.0;
}

void MythUIAnimation::parseAngle(const QDomElement& element,
QVariant& startValue, QVariant& endValue)
{
startValue = element.attribute("start", "0").toFloat();
endValue = element.attribute("end", "0").toFloat();
}
86 changes: 86 additions & 0 deletions mythtv/libs/libmythui/mythuianimation.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
#ifndef MYTHUIANIMATION_H
#define MYTHUIANIMATION_H

#include "xmlparsebase.h"
#include <QVariantAnimation>

class MythUIType;

class UIEffects
{
public:
enum Centre { TopLeft, Top, TopRight,
Left, Middle, Right,
BottomLeft, Bottom, BottomRight };

UIEffects()
: alpha(255), hzoom(1.0), vzoom(1.0), angle(0.0), centre(Middle) { }

QPointF GetCentre(const QRect &rect, int xoff, int yoff)
{
float x = xoff + rect.left();
float y = yoff + rect.top();
if (Middle == centre || Top == centre || Bottom == centre)
x += rect.width() / 2.0;
if (Middle == centre || Left == centre || Right == centre)
y += rect.height() / 2.0;
if (Right == centre || TopRight == centre || BottomRight == centre)
x += rect.width();
if (Bottom == centre || BottomLeft == centre || BottomRight == centre)
y += rect.height();
return QPointF(x, y);
}

int alpha;
float hzoom;
float vzoom;
float angle;
Centre centre;
};

class MythUIAnimation : public QVariantAnimation, XMLParseBase
{
public:
enum Type { Alpha, Position, Zoom, HorizontalZoom, VerticalZoom, Angle };
enum Trigger { AboutToHide, AboutToShow };

MythUIAnimation(MythUIType* parent = NULL,
Trigger trigger = AboutToShow, Type type = Alpha);
void Activate(void);
void CopyFrom(const MythUIAnimation* animation);
Trigger GetTrigger(void) const { return m_trigger; }
QVariant Value() const { return m_value; }

virtual void updateCurrentValue(const QVariant& value);

void IncrementCurrentTime(void);
void SetEasingCurve(const QString &curve);
void SetCentre(const QString &centre);
void SetLooped(bool looped) { m_looped = looped; }
void SetReversible(bool rev) { m_reversible = rev; }

static void ParseElement(const QDomElement& element, MythUIType* parent);

private:
static void ParseSection(const QDomElement &element,
MythUIType* parent, Trigger trigger);
static void parseAlpha(const QDomElement& element, QVariant& startValue,
QVariant& endValue);
static void parsePosition(const QDomElement& element, QVariant& startValue,
QVariant& endValue, MythUIType *parent);
static void parseZoom(const QDomElement& element, QVariant& startValue,
QVariant& endValue);
static void parseAngle(const QDomElement& element, QVariant& startValue,
QVariant& endValue);

MythUIType* m_parent;
Type m_type;
Trigger m_trigger;
UIEffects::Centre m_centre;
QVariant m_value;
bool m_active;
bool m_looped;
bool m_reversible;
};

#endif // MYTHUIANIMATION_H
97 changes: 78 additions & 19 deletions mythtv/libs/libmythui/mythuitype.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ MythUIType::MythUIType(QObject *parent, const QString &name)
m_Area = MythRect(0, 0, 0, 0);
m_MinArea = MythRect(0, 0, 0, 0);
m_NeedsRedraw = false;
m_Alpha = 255;
m_AlphaChangeMode = m_AlphaChange = m_AlphaMin = 0;
m_AlphaMax = 255;
m_Moving = false;
Expand Down Expand Up @@ -71,6 +70,7 @@ MythUIType::MythUIType(QObject *parent, const QString &name)
MythUIType::~MythUIType()
{
delete m_Fonts;
qDeleteAll(m_animations);
}

/**
Expand Down Expand Up @@ -272,6 +272,16 @@ MythUIType *MythUIType::GetChildAt(const QPoint &p, bool recursive,
return NULL;
}

void MythUIType::ActivateAnimations(MythUIAnimation::Trigger trigger)
{
foreach (MythUIAnimation* animation, m_animations)
if (animation->GetTrigger() == trigger)
animation->Activate();

foreach (MythUIType* uiType, m_ChildrenList)
uiType->ActivateAnimations(trigger);
}

bool MythUIType::NeedsRedraw(void) const
{
return m_NeedsRedraw;
Expand Down Expand Up @@ -402,16 +412,16 @@ void MythUIType::HandleAlphaPulse(void)
if (m_AlphaChangeMode == 0)
return;

m_Alpha += m_AlphaChange;
m_Effects.alpha += m_AlphaChange;

if (m_Alpha > m_AlphaMax)
m_Alpha = m_AlphaMax;
if (m_Effects.alpha > m_AlphaMax)
m_Effects.alpha = m_AlphaMax;

if (m_Alpha < m_AlphaMin)
m_Alpha = m_AlphaMin;
if (m_Effects.alpha < m_AlphaMin)
m_Effects.alpha = m_AlphaMin;

// Reached limits so change direction
if (m_Alpha == m_AlphaMax || m_Alpha == m_AlphaMin)
if (m_Effects.alpha == m_AlphaMax || m_Effects.alpha == m_AlphaMin)
{
if (m_AlphaChangeMode == 2)
{
Expand Down Expand Up @@ -441,6 +451,10 @@ void MythUIType::Pulse(void)
HandleMovementPulse();
HandleAlphaPulse();

QList<MythUIAnimation*>::Iterator i;
for (i = m_animations.begin(); i != m_animations.end(); ++i)
(*i)->IncrementCurrentTime();

QList<MythUIType *>::Iterator it;

for (it = m_ChildrenList.begin(); it != m_ChildrenList.end(); ++it)
Expand All @@ -449,7 +463,7 @@ void MythUIType::Pulse(void)

int MythUIType::CalcAlpha(int alphamod)
{
return (int)(m_Alpha * (alphamod / 255.0));
return (int)(m_Effects.alpha * (alphamod / 255.0));
}

void MythUIType::DrawSelf(MythPainter *, int, int, int, QRect)
Expand All @@ -470,6 +484,8 @@ void MythUIType::Draw(MythPainter *p, int xoffset, int yoffset, int alphaMod,
if (!realArea.intersects(clipRect))
return;

p->PushTransformation(m_Effects, m_Effects.GetCentre(m_Area, xoffset, yoffset));

DrawSelf(p, xoffset, yoffset, alphaMod, clipRect);

QList<MythUIType *>::Iterator it;
Expand All @@ -494,6 +510,8 @@ void MythUIType::Draw(MythPainter *p, int xoffset, int yoffset, int alphaMod,
p->DrawText(realArea, objectName(), 0, font, 255, realArea);
}
}

p->PopTransformation();
}

void MythUIType::SetPosition(int x, int y)
Expand Down Expand Up @@ -894,25 +912,54 @@ void MythUIType::AdjustAlpha(int mode, int alphachange, int minalpha,
m_AlphaMin = minalpha;
m_AlphaMax = maxalpha;

if (m_Alpha > m_AlphaMax)
m_Alpha = m_AlphaMax;
if (m_Effects.alpha > m_AlphaMax)
m_Effects.alpha = m_AlphaMax;

if (m_Alpha < m_AlphaMin)
m_Alpha = m_AlphaMin;
if (m_Effects.alpha < m_AlphaMin)
m_Effects.alpha = m_AlphaMin;
}

void MythUIType::SetAlpha(int newalpha)
{
if (m_Alpha == newalpha)
if (m_Effects.alpha == newalpha)
return;

m_Alpha = newalpha;
m_Effects.alpha = newalpha;
SetRedraw();
}

int MythUIType::GetAlpha(void) const
{
return m_Alpha;
return m_Effects.alpha;
}

void MythUIType::SetCentre(UIEffects::Centre centre)
{
m_Effects.centre = centre;
}

void MythUIType::SetZoom(float zoom)
{
SetHorizontalZoom(zoom);
SetVerticalZoom(zoom);
}

void MythUIType::SetHorizontalZoom(float zoom)
{
m_Effects.hzoom = zoom;
SetRedraw();
}

void MythUIType::SetVerticalZoom(float zoom)
{
m_Effects.vzoom = zoom;
SetRedraw();
}

void MythUIType::SetAngle(float angle)
{
m_Effects.angle = angle;
SetRedraw();
}

/** \brief Key event handler
Expand Down Expand Up @@ -1052,7 +1099,7 @@ void MythUIType::CopyFrom(MythUIType *base)
m_MinSize = base->m_MinSize;
m_Vanish = base->m_Vanish;
m_Vanished = false;
m_Alpha = base->m_Alpha;
m_Effects = base->m_Effects;
m_AlphaChangeMode = base->m_AlphaChangeMode;
m_AlphaChange = base->m_AlphaChange;
m_AlphaMin = base->m_AlphaMin;
Expand All @@ -1063,6 +1110,14 @@ void MythUIType::CopyFrom(MythUIType *base)
m_XYSpeed = base->m_XYSpeed;
m_deferload = base->m_deferload;

QList<MythUIAnimation*>::Iterator i;
for (i = base->m_animations.begin(); i != base->m_animations.end(); ++i)
{
MythUIAnimation* animation = new MythUIAnimation(this);
animation->CopyFrom(*i);
m_animations.push_back(animation);
}

QList<MythUIType *>::Iterator it;

for (it = base->m_ChildrenList.begin(); it != base->m_ChildrenList.end();
Expand Down Expand Up @@ -1116,17 +1171,17 @@ bool MythUIType::ParseElement(
}
else if (element.tagName() == "alpha")
{
m_Alpha = getFirstText(element).toInt();
m_Effects.alpha = getFirstText(element).toInt();
m_AlphaChangeMode = 0;
}
else if (element.tagName() == "alphapulse")
{
m_AlphaChangeMode = 2;
m_AlphaMin = element.attribute("min", "0").toInt();
m_Alpha = m_AlphaMax = element.attribute("max", "255").toInt();
m_Effects.alpha = m_AlphaMax = element.attribute("max", "255").toInt();

if (m_AlphaMax > 255)
m_Alpha = m_AlphaMax = 255;
m_Effects.alpha = m_AlphaMax = 255;

if (m_AlphaMin < 0)
m_AlphaMin = 0;
Expand All @@ -1146,6 +1201,10 @@ bool MythUIType::ParseElement(
{
m_helptext = getFirstText(element);
}
else if (element.tagName() == "animation")
{
MythUIAnimation::ParseElement(element, this);
}
else
return false;

Expand Down
14 changes: 13 additions & 1 deletion mythtv/libs/libmythui/mythuitype.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <QColor>

#include "xmlparsebase.h"
#include "mythuianimation.h"
#include "mythrect.h"
#include "mythgesture.h"
#include "mythmedia.h"
Expand Down Expand Up @@ -98,6 +99,9 @@ class MUI_PUBLIC MythUIType : public QObject, public XMLParseBase
bool MoveToTop(void);
bool MoveChildToTop(MythUIType *child);

void ActivateAnimations(MythUIAnimation::Trigger trigger);
QList<MythUIAnimation*>* GetAnimations(void) { return &m_animations; }

// Called each draw pulse. Will redraw automatically if dirty afterwards
virtual void Pulse(void);

Expand Down Expand Up @@ -153,6 +157,12 @@ class MUI_PUBLIC MythUIType : public QObject, public XMLParseBase
virtual MythPainter *GetPainter(void);
void SetPainter(MythPainter *painter) { m_Painter = painter; }

void SetCentre(UIEffects::Centre centre);
void SetZoom(float zoom);
void SetHorizontalZoom(float zoom);
void SetVerticalZoom(float zoom);
void SetAngle(float angle);

protected:
virtual void customEvent(QEvent *);

Expand Down Expand Up @@ -217,7 +227,8 @@ class MUI_PUBLIC MythUIType : public QObject, public XMLParseBase
QRegion m_DirtyRegion;
bool m_NeedsRedraw;

int m_Alpha;
UIEffects m_Effects;

int m_AlphaChangeMode; // 0 - none, 1 - once, 2 - cycle
int m_AlphaChange;
int m_AlphaMin;
Expand All @@ -232,6 +243,7 @@ class MUI_PUBLIC MythUIType : public QObject, public XMLParseBase
MythUIType *m_Parent;
MythPainter *m_Painter;

QList<MythUIAnimation*> m_animations;
QString m_helptext;

bool m_deferload;
Expand Down