35 QRect displayRect, QRect altDisplayRect,
39 void Reset(
void)
override;
40 void ResetMap(
const InfoMap &map);
42 virtual void SetText(
const QString &text);
43 QString
GetText(
void)
const {
return m_message; }
46 void SetTextFromMap(
const InfoMap &map);
52 void UseAlternateArea(
bool useAlt);
55 void Pulse(
void)
override;
56 QPoint CursorPosition(
int text_offset);
57 int MoveCursor(
int lines);
65 void SetFontState(
const QString &state);
66 void SetJustification(
int just);
70 int alphaMod, QRect clipRect)
override;
73 bool showWarnings)
override;
81 void CycleColor(
const QColor& startColor,
const QColor& endColor,
int numSteps);
84 int GetJustification(
void)
const;
85 void SetCutDown(Qt::TextElideMode mode);
86 Qt::TextElideMode
GetCutDown(
void)
const {
return m_cutdown; }
87 void SetMultiLine(
bool multiline);
94 void SetCanvasPosition(
int x,
int y);
95 void ShiftCanvas(
int x,
int y);
97 bool FormatTemplate(QString & paragraph, QTextLayout *layout);
98 bool Layout(QString & paragraph, QTextLayout *layout,
bool final,
99 bool & overflow, qreal width, qreal & height,
bool force,
100 qreal & last_line_width, QRectF & min_rect,
int & num_lines);
101 bool LayoutParagraphs(
const QStringList & paragraphs,
102 const QTextOption & textoption,
103 qreal width, qreal & height, QRectF & min_rect,
104 qreal & last_line_width,
int & num_lines,
bool final);
105 bool GetNarrowWidth(
const QStringList & paragraphs,
106 const QTextOption & textoption, qreal & width);
107 void FillCutMessage(
void);
109 int m_justification {Qt::AlignLeft | Qt::AlignTop};
114 QPoint m_cursorPos {-1,-1};
122 bool m_usingAltArea {
false};
124 bool m_shrinkNarrow {
true};
125 Qt::TextElideMode m_cutdown {Qt::ElideRight};
126 bool m_multiLine {
false};
129 int m_leftBearing {0};
130 int m_rightBearing {0};
132 int m_extraLeading {0};
133 int m_lineHeight {0};
134 int m_textCursor {-1};
141 bool m_colorCycling {
false};
160 int m_scrollStartDelay {ScrollBounceDelay};
161 int m_scrollReturnDelay {ScrollBounceDelay};
162 float m_scrollPause {0.0};
163 float m_scrollForwardRate {1.0};
164 float m_scrollReturnRate {1.0};
165 bool m_scrollBounce {
false};
166 int m_scrollOffset {0};
167 float m_scrollPos {0};
168 int m_scrollPosWhole {0};
170 bool m_scrolling {
false};
171 int64_t m_lastUpdate {QDateTime::currentMSecsSinceEpoch()};
182 friend class MythThemedMenuPrivate;
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.
A text entry and edit widget.
All purpose text widget, displays a text string.
QString GetDBValue(void) const override
QString GetText(void) const
void SetDBValue(const QString &text) override
Qt::TextElideMode GetCutDown(void) const
MythRect GetDrawRect(void)
MythRect m_altDisplayRect
QString GetTemplateText(void) const
MythRect m_origDisplayRect
void SetTemplateText(const QString &text)
const MythFontProperties * GetFontProperties()
QString GetDefaultText(void) const
QVector< QTextLayout * > m_layouts
bool GetMultiLine(void) const
QMap< QString, MythFontProperties > FontStates
The base class on which all widgets and screens are based.
virtual void DrawSelf(MythPainter *p, int xoffset, int yoffset, int alphaMod, QRect clipRect)
virtual void SetArea(const MythRect &rect)
virtual void CopyFrom(MythUIType *base)
Copy this widgets state from another.
virtual void Finalize(void)
Perform any post-xml parsing initialisation tasks.
virtual void Pulse(void)
Pulse is called 70 times a second to trigger a single frame of an animation.
virtual void CreateCopy(MythUIType *parent)
Copy the state of this widget to the one given, it must be of the same type.
void SetPosition(int x, int y)
Convenience method, calls SetPosition(const MythPoint&) Override that instead to change functionality...
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
static constexpr uint8_t DEFAULT_REFRESH_RATE