25class QInputMethodEvent;
59template <
typename Return,
typename Class,
typename... Args>
101 MythUIType(QObject *parent,
const QString &name);
103 virtual void Reset(
void);
106 MythUIType *GetChild(
const QString &name)
const;
107 MythUIType *GetChildAt(QPoint
p,
bool recursive=
true,
108 bool focusable=
true)
const;
109 QList<MythUIType *> *GetAllChildren(
void);
110 QList<MythUIType *> GetAllDescendants(
void);
112 void DeleteChild(
const QString &name);
114 void DeleteAllChildren(
void);
117 bool NeedsRedraw(
void)
const;
118 void ResetNeedsRedraw(
void);
119 void SetRedraw(
void);
124 bool CanTakeFocus(
void)
const;
125 void SetCanTakeFocus(
bool set =
true);
126 void SetFocusOrder(
int order);
127 void SetFocusedName(
const QString & widgetname);
131 void SetEnabled(
bool enable);
133 bool MoveToTop(
void);
140 virtual void Pulse(
void);
142 void Draw(
MythPainter *
p,
int xoffset,
int yoffset,
int alphaMod = 255,
143 QRect clipRect = QRect());
147 void SetPosition(
int x,
int y);
148 void SetPosition(QPoint point);
149 virtual void SetPosition(
const MythPoint &point);
150 virtual MythPoint GetPosition(
void)
const;
151 virtual void SetSize(QSize size);
152 virtual void SetMinSize(
const MythPoint &size);
153 virtual QSize GetMinSize(
void)
const;
154 virtual void SetArea(
const MythRect &rect);
155 virtual void AdjustMinArea(
int delta_x,
int delta_y,
156 int delta_w,
int delta_h);
157 virtual void VanishSibling(
void);
160 virtual void SetMinArea(
const MythRect & rect);
161 virtual MythRect GetArea(
void)
const;
162 virtual MythRect GetFullArea(
void)
const;
163 virtual void RecalculateArea(
bool recurse =
true);
164 void ExpandArea(QRect rect);
166 virtual QRegion GetDirtyArea(
void)
const;
168 bool IsVisible(
bool recurse =
false)
const;
169 virtual void SetVisible(
bool visible);
171 void MoveTo(QPoint destXY, QPoint speedXY);
173 void AdjustAlpha(
int mode,
int alphachange,
int minalpha = 0,
175 void SetAlpha(
int newalpha);
176 int GetAlpha(
void)
const;
180 virtual bool keyPressEvent(QKeyEvent *event);
181 virtual bool inputMethodEvent(QInputMethodEvent *event);
192 { m_xmlLocation = QString(
"%1:%2").arg(
filename).arg(where); }
198 bool IsDeferredLoading(
bool recurse =
false)
const;
200 virtual void LoadNow(
void);
202 bool ContainsPoint(QPoint point)
const;
208 void SetZoom(
float zoom);
209 void SetHorizontalZoom(
float zoom);
210 void SetVerticalZoom(
float zoom);
211 void SetAngle(
float angle);
212 void SetDependIsDefault(
bool isDefault);
213 void SetReverseDependence(
MythUIType *dependee,
bool reverse);
214 void SetDependsMap(QMap<QString, QString> dependsMap);
219 void customEvent(QEvent *event)
override;
222 void LoseFocus(
void);
223 bool TakeFocus(
void);
228 void UpdateDependState(
bool isDefault);
229 void UpdateDependState(
MythUIType *dependee,
bool isDefault);
246 virtual void DrawSelf(
MythPainter *
p,
int xoffset,
int yoffset,
247 int alphaMod, QRect clipRect);
250 void HandleAlphaPulse();
251 void HandleMovementPulse();
253 int CalcAlpha(
int alphamod)
const;
255 static int NormX(
int width);
256 static int NormY(
int height);
260 virtual bool ParseElement(
261 const QString &
filename, QDomElement &element,
bool showWarnings);
264 virtual void Finalize(
void);
274 bool m_visible {
true};
275 bool m_hasFocus {
false};
276 bool m_canHaveFocus {
false};
277 bool m_enabled {
true};
278 bool m_enableInitiator {
false};
279 bool m_initiator {
false};
280 bool m_vanish {
false};
281 bool m_vanished {
false};
282 bool m_isDependDefault {
false};
286 int m_focusOrder {0};
292 QRegion m_dirtyRegion {0,0,0,0};
293 bool m_needsRedraw {
false};
297 int m_alphaChangeMode {0};
298 int m_alphaChange {0};
300 int m_alphaMax {255};
302 bool m_moving {
false};
303 QPoint m_xyDestination {0,0};
304 QPoint m_xySpeed {0,0};
317 bool m_deferload {
false};
319 QColor m_borderColor {Qt::black};
A custom event that represents a mouse gesture.
Wrapper around QPoint allowing us to handle percentage and other relative values for positioning in m...
Wrapper around QRect allowing us to handle percentage and other relative values for areas in mythui.
Screen in which all other widgets are contained and rendered.
A checkbox widget supporting three check states - on,off,half and two conditions - selected and unsel...
Image widget, displays a single image or multiple images in sequence.
A widget for offering a range of numerical values where only the the bounding values and interval are...
A text entry and edit widget.
All purpose text widget, displays a text string.
The base class on which all widgets and screens are based.
bool IsEnabled(void) const
QString GetFocusedName(void) const
void VisibilityChanged(bool Visible)
void RequestRegionUpdate(const QRect &)
QString GetXMLLocation(void) const
void SetPainter(MythPainter *painter)
QList< int > m_dependOperator
QMap< MythUIType *, bool > m_reverseDepend
void SetXMLName(const QString &name)
void SetHelpText(const QString &text)
QMap< QString, QString > m_dependsMap
QMap< QString, QString > GetDependsMap() const
QString GetHelpText(void) const
QList< MythUIAnimation * > * GetAnimations(void)
QList< MythUIAnimation * > m_animations
QString GetXMLName(void) const
void DependChanged(bool isDefault)
void FinishedMoving(void)
QList< MythUIType * > m_childrenList
void FinishedFading(void)
void SetDeferLoad(bool defer)
QList< QPair< MythUIType *, bool > > m_dependsValue
void SetXMLLocation(const QString &filename, int where)
static void ConnectDependants(MythUIType *parent, QMap< QString, QString > &dependsMap)
Q_DECLARE_METATYPE(std::chrono::seconds)
void(QObject::*)(void) const MythUICallbackMFc
void(QObject::*)(void) MythUICallbackMF
QMultiMap< int, MythUIType * > FocusInfoType
constexpr bool is_nonconst_member_func_v
constexpr bool is_const_member_func_v
std::function< void(void)> MythUICallbackNMF