25class QInputMethodEvent;
54{ enum : std::uint8_t {MemberFunction =
false, MemberConstFunction =
false}; };
57template<
class Obj,
typename Ret,
typename... Args>
struct FunctionPointerTest<Ret (Obj::*) (Args...) const>
90 MythUIType(QObject *parent,
const QString &name);
92 virtual void Reset(
void);
95 MythUIType *GetChild(
const QString &name)
const;
96 MythUIType *GetChildAt(QPoint
p,
bool recursive=
true,
97 bool focusable=
true)
const;
98 QList<MythUIType *> *GetAllChildren(
void);
99 QList<MythUIType *> GetAllDescendants(
void);
101 void DeleteChild(
const QString &name);
103 void DeleteAllChildren(
void);
106 bool NeedsRedraw(
void)
const;
107 void ResetNeedsRedraw(
void);
108 void SetRedraw(
void);
113 bool CanTakeFocus(
void)
const;
114 void SetCanTakeFocus(
bool set =
true);
115 void SetFocusOrder(
int order);
116 void SetFocusedName(
const QString & widgetname);
120 void SetEnabled(
bool enable);
122 bool MoveToTop(
void);
129 virtual void Pulse(
void);
131 void Draw(
MythPainter *
p,
int xoffset,
int yoffset,
int alphaMod = 255,
132 QRect clipRect = QRect());
136 void SetPosition(
int x,
int y);
137 void SetPosition(QPoint point);
138 virtual void SetPosition(
const MythPoint &point);
139 virtual MythPoint GetPosition(
void)
const;
140 virtual void SetSize(QSize size);
141 virtual void SetMinSize(
const MythPoint &size);
142 virtual QSize GetMinSize(
void)
const;
143 virtual void SetArea(
const MythRect &rect);
144 virtual void AdjustMinArea(
int delta_x,
int delta_y,
145 int delta_w,
int delta_h);
146 virtual void VanishSibling(
void);
149 virtual void SetMinArea(
const MythRect & rect);
150 virtual MythRect GetArea(
void)
const;
151 virtual MythRect GetFullArea(
void)
const;
152 virtual void RecalculateArea(
bool recurse =
true);
153 void ExpandArea(QRect rect);
155 virtual QRegion GetDirtyArea(
void)
const;
157 bool IsVisible(
bool recurse =
false)
const;
158 virtual void SetVisible(
bool visible);
160 void MoveTo(QPoint destXY, QPoint speedXY);
162 void AdjustAlpha(
int mode,
int alphachange,
int minalpha = 0,
164 void SetAlpha(
int newalpha);
165 int GetAlpha(
void)
const;
169 virtual bool keyPressEvent(QKeyEvent *event);
170 virtual bool inputMethodEvent(QInputMethodEvent *event);
181 { m_xmlLocation = QString(
"%1:%2").arg(
filename).arg(where); }
187 bool IsDeferredLoading(
bool recurse =
false)
const;
189 virtual void LoadNow(
void);
191 bool ContainsPoint(QPoint point)
const;
197 void SetZoom(
float zoom);
198 void SetHorizontalZoom(
float zoom);
199 void SetVerticalZoom(
float zoom);
200 void SetAngle(
float angle);
201 void SetDependIsDefault(
bool isDefault);
202 void SetReverseDependence(
MythUIType *dependee,
bool reverse);
203 void SetDependsMap(QMap<QString, QString> dependsMap);
208 void customEvent(QEvent *event)
override;
211 void LoseFocus(
void);
212 bool TakeFocus(
void);
217 void UpdateDependState(
bool isDefault);
218 void UpdateDependState(
MythUIType *dependee,
bool isDefault);
235 virtual void DrawSelf(
MythPainter *
p,
int xoffset,
int yoffset,
236 int alphaMod, QRect clipRect);
239 void HandleAlphaPulse();
240 void HandleMovementPulse();
242 int CalcAlpha(
int alphamod)
const;
244 static int NormX(
int width);
245 static int NormY(
int height);
249 virtual bool ParseElement(
250 const QString &
filename, QDomElement &element,
bool showWarnings);
253 virtual void Finalize(
void);
263 bool m_visible {
true};
264 bool m_hasFocus {
false};
265 bool m_canHaveFocus {
false};
266 bool m_enabled {
true};
267 bool m_enableInitiator {
false};
268 bool m_initiator {
false};
269 bool m_vanish {
false};
270 bool m_vanished {
false};
271 bool m_isDependDefault {
false};
275 int m_focusOrder {0};
281 QRegion m_dirtyRegion {0,0,0,0};
282 bool m_needsRedraw {
false};
286 int m_alphaChangeMode {0};
287 int m_alphaChange {0};
289 int m_alphaMax {255};
291 bool m_moving {
false};
292 QPoint m_xyDestination {0,0};
293 QPoint m_xySpeed {0,0};
306 bool m_deferload {
false};
308 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
std::function< void(void)> MythUICallbackNMF