16 #define DEFAULT_REFRESH_RATE 70 // Hz
37 QRect displayRect, QRect altDisplayRect,
41 void Reset(
void)
override;
42 void ResetMap(
const InfoMap &map);
44 virtual void SetText(
const QString &text);
45 QString
GetText(
void)
const {
return m_message; }
48 void SetTextFromMap(
const InfoMap &map);
53 #if 0 // Not currently used
54 void UseAlternateArea(
bool useAlt);
57 void Pulse(
void)
override;
58 QPoint CursorPosition(
int text_offset);
59 int MoveCursor(
int lines);
67 void SetFontState(
const QString &state);
68 void SetJustification(
int just);
72 int alphaMod, QRect clipRect)
override;
75 bool showWarnings)
override;
83 void CycleColor(
const QColor& startColor,
const QColor& endColor,
int numSteps);
86 int GetJustification(
void)
const;
87 void SetCutDown(Qt::TextElideMode mode);
88 Qt::TextElideMode
GetCutDown(
void)
const {
return m_cutdown; }
89 void SetMultiLine(
bool multiline);
96 void SetCanvasPosition(
int x,
int y);
97 void ShiftCanvas(
int x,
int y);
99 bool FormatTemplate(QString & paragraph, QTextLayout *layout);
100 bool Layout(QString & paragraph, QTextLayout *layout,
bool final,
101 bool & overflow, qreal width, qreal & height,
bool force,
102 qreal & last_line_width, QRectF & min_rect,
int & num_lines);
103 bool LayoutParagraphs(
const QStringList & paragraphs,
104 const QTextOption & textoption,
105 qreal width, qreal & height, QRectF & min_rect,
106 qreal & last_line_width,
int & num_lines,
bool final);
107 bool GetNarrowWidth(
const QStringList & paragraphs,
108 const QTextOption & textoption, qreal & width);
109 void FillCutMessage(
void);
111 int m_justification {Qt::AlignLeft | Qt::AlignTop};
116 QPoint m_cursorPos {-1,-1};
123 #if 0 // Not currently used
124 bool m_usingAltArea {
false};
126 bool m_shrinkNarrow {
true};
127 Qt::TextElideMode m_cutdown {Qt::ElideRight};
128 bool m_multiLine {
false};
131 int m_leftBearing {0};
132 int m_rightBearing {0};
134 int m_extraLeading {0};
135 int m_lineHeight {0};
136 int m_textCursor {-1};
143 bool m_colorCycling {
false};
158 ScrollHorizontal, ScrollVertical};
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()};
173 enum TextCase {CaseNormal, CaseUpper, CaseLower, CaseCapitaliseFirst,
181 friend class MythThemedMenuPrivate;