Go to the documentation of this file.
9 #include <QCoreApplication>
10 #include <QDomDocument>
27 const QString &
filename, QDomElement &element,
bool showWarnings)
29 if (element.tagName() ==
"layout")
33 if (layout ==
"vertical")
38 else if (element.tagName() ==
"hidedelay")
67 value = std::max(value, 1);
98 LOG(VB_GENERAL, LOG_ERR,
"Slider element doesn't exist");
107 QPoint endPos(newSliderArea.left(), newSliderArea.top());
111 int width = std::max((
int)lroundf(fillArea.width() * relativeSize),
114 endPos.setX(lroundf((fillArea.width() - width) * percentage));
118 int height = std::max((
int)lroundf(fillArea.height() * relativeSize),
121 endPos.setY(lroundf((fillArea.height() - height) * percentage));
124 slider->
SetArea(newSliderArea);
162 scrollbar->CopyFrom(
this);
MythUIType * GetChild(const QString &name) const
Get a named child of this UIType.
virtual void SetArea(const MythRect &rect)
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Wrapper around QRect allowing us to handle percentage and other relative values for areas in mythui.
virtual MythRect GetArea(void) const
If the object has a minimum area defined, return it, other wise return the default area.
void SetPosition(int x, int y)
Convenience method, calls SetPosition(const MythPoint&) Override that instead to change functionality...
void AdjustAlpha(int mode, int alphachange, int minalpha=0, int maxalpha=255)
static QString getFirstText(QDomElement &element)
void setHeight(const QString &sHeight)
virtual void CopyFrom(MythUIType *base)
Copy this widgets state from another.
static eu8 clamp(eu8 value, eu8 low, eu8 high)
virtual void Reset(void)
Reset the widget to it's original state, should not reset changes made by the theme.
The base class on which all widgets and screens are based.
void setWidth(const QString &sWidth)
virtual bool ParseElement(const QString &filename, QDomElement &element, bool showWarnings)
Parse the xml definition of this widget setting the state of the object accordingly.