1#ifndef MYTHUI_STATETYPE_H_
2#define MYTHUI_STATETYPE_H_
27 {
None = 0, Off, Half, Full };
34 bool AddImage(
const QString &name,
MythImage *image);
37 bool AddObject(
const QString &name,
MythUIType *
object);
40 bool DisplayState(
const QString &name);
41 bool DisplayState(StateType
type);
47 void Reset(
void)
override;
50 void EnsureStateLoaded(
const QString &name);
51 void EnsureStateLoaded(StateType
type);
60 bool showWarnings)
override;
64 virtual void AdjustDependence(
void);
72 bool m_showEmpty {
true};
Wrapper around QRect allowing us to handle percentage and other relative values for areas in mythui.
virtual void SetTextFromMap(const InfoMap &infoMap)
This widget is used for grouping other widgets for display when a particular named state is called.
MythUIType * GetCurrentState()
~MythUIStateType() override=default
QMap< QString, MythUIType * > m_objectsByName
QMap< int, MythUIType * > m_objectsByState
void SetShowEmpty(bool showempty)
The base class on which all widgets and screens are based.
virtual void RecalculateArea(bool recurse=true)
virtual void LoadNow(void)
Cause images in this and child widgets to be loaded.
virtual void CopyFrom(MythUIType *base)
Copy this widgets state from another.
virtual void Finalize(void)
Perform any post-xml parsing initialisation tasks.
virtual void CreateCopy(MythUIType *parent)
Copy the state of this widget to the one given, it must be of the same type.
virtual void Reset(void)
Reset the widget to it's original state, should not reset changes made by the theme.
virtual bool ParseElement(const QString &filename, QDomElement &element, bool showWarnings)
Parse the xml definition of this widget setting the state of the object accordingly.
QHash< QString, QString > InfoMap