Go to the documentation of this file. 1 #ifndef MYTHUIGUIDEGRID_H_
2 #define MYTHUIGUIDEGRID_H_
51 int alphaMod, QRect clipRect)
override;
53 enum FillType : std::uint8_t { Alpha = 10, Dense, Eco, Solid };
59 void SetCategoryColors(
const QMap<QString, QString> &catColors);
62 void SetArrow(
int direction,
const QString &
file);
63 void LoadImage(
int recType,
const QString &
file);
64 void SetProgramInfo(
int row,
int col, QRect area,
65 const QString &title,
const QString &genre,
66 int arrow,
int recType,
int recStat,
bool selected);
68 void ResetRow(
int row);
69 void SetProgPast(
int ppast);
70 void SetMultiLine(
bool multiline);
72 QPoint GetRowAndColumn(QPoint position);
77 bool showWarnings)
override;
81 static bool parseDefaultCategoryColors(QMap<QString, QString> &catColors);
89 UIGTCon(
const QRect drawArea, QString title,
90 const QString &category,
int arrow,
int recType,
int recStat) :
91 m_drawArea(drawArea), m_title(std::move(title)),
92 m_category(category.trimmed()), m_arrow(arrow),
93 m_recType(recType), m_recStat(recStat)
108 void drawBackground(
MythPainter *
p,
int xoffset,
int yoffset,
109 UIGTCon *data,
int alphaMod);
110 void drawBox(
MythPainter *
p,
int xoffset,
int yoffset, UIGTCon *data,
111 const QColor &color,
int alphaMod);
112 void drawText(
MythPainter *
p,
int xoffset,
int yoffset, UIGTCon *data,
114 void drawRecDecoration(
MythPainter *
p,
int xoffset,
int yoffset,
115 UIGTCon *data,
int alphaMod);
116 void drawCurrent(
MythPainter *
p,
int xoffset,
int yoffset, UIGTCon *data,
119 static QColor calcColor(
const QColor &color,
int alpha);
121 QList<UIGTCon*> *m_allData {
nullptr};
124 std::array<MythUIImage*,RECSTATUSSIZE> m_recImages {};
125 std::array<MythUIImage*,ARROWIMAGESIZE> m_arrowImages {};
128 int m_channelCount {5};
130 bool m_verticalLayout {
false};
134 int m_justification {Qt::AlignLeft | Qt::AlignTop |
136 bool m_multilineText {
true};
137 bool m_cutdown {
true};
139 QString m_selType {
"box"};
140 QPen m_drawSelLine {Qt::NoPen};
141 QBrush m_drawSelFill {Qt::NoBrush};
147 int m_fillType {Solid};
150 int m_progPastCol {0};
152 bool m_drawCategoryColors {
true};
153 bool m_drawCategoryText {
true};
154 int m_categoryAlpha {255};
static constexpr size_t RECSTATUSSIZE
bool isVerticalLayout(void) const
QColor m_conflictingColor
static constexpr int MAX_DISPLAY_TIMES
A narrow purpose widget used to show television programs and the timeslots they occupy on channels....
virtual void CreateCopy(MythUIType *parent)
Copy the state of this widget to the one given, it must be of the same type.
static constexpr uint8_t GridTimeStartsBefore
int getChannelCount(void) const
virtual void DrawSelf(MythPainter *p, int xoffset, int yoffset, int alphaMod, QRect clipRect)
virtual void CopyFrom(MythUIType *base)
Copy this widgets state from another.
static constexpr uint8_t GridTimeNormal
The base class on which all widgets and screens are based.
static constexpr uint8_t GridTimeEndsAfter
void SetTextOffset(const QPoint to)
int getTimeCount(void) const
QMap< QString, QColor > m_categoryColors
static constexpr int MAX_DISPLAY_CHANS
UIGTCon(const QRect drawArea, QString title, const QString &category, int arrow, int recType, int recStat)
virtual bool ParseElement(const QString &filename, QDomElement &element, bool showWarnings)
Parse the xml definition of this widget setting the state of the object accordingly.
static constexpr size_t ARROWIMAGESIZE
virtual void Finalize(void)
Perform any post-xml parsing initialisation tasks.