1#ifndef MYTHUIGUIDEGRID_H_
2#define MYTHUIGUIDEGRID_H_
50 enum FillType : std::uint8_t { Alpha = 10, Dense, Eco, Solid };
56 void SetCategoryColors(
const QMap<QString, QString> &catColors);
59 void SetArrow(
int direction,
const QString &
file);
60 void LoadImage(
int recType,
const QString &
file);
61 void SetProgramInfo(
int row,
int col, QRect area,
62 const QString &title,
const QString &genre,
63 int arrow,
int recType,
int recStat,
bool selected);
65 void ResetRow(
int row);
66 void SetProgPast(
int ppast);
67 void SetMultiLine(
bool multiline);
69 QPoint GetRowAndColumn(QPoint position);
74 bool showWarnings)
override;
76 int alphaMod, QRect clipRect)
override;
80 static bool parseDefaultCategoryColors(QMap<QString, QString> &catColors);
88 UIGTCon(
const QRect drawArea, QString title,
89 const QString &category,
int arrow,
int recType,
int recStat) :
90 m_drawArea(drawArea), m_title(std::move(title)),
91 m_category(category.trimmed()), m_arrow(arrow),
92 m_recType(recType), m_recStat(recStat)
107 void drawBackground(
MythPainter *
p,
int xoffset,
int yoffset,
108 UIGTCon *data,
int alphaMod);
109 void drawBox(
MythPainter *
p,
int xoffset,
int yoffset, UIGTCon *data,
110 const QColor &color,
int alphaMod);
111 void drawText(
MythPainter *
p,
int xoffset,
int yoffset, UIGTCon *data,
113 void drawRecDecoration(
MythPainter *
p,
int xoffset,
int yoffset,
114 UIGTCon *data,
int alphaMod);
115 void drawCurrent(
MythPainter *
p,
int xoffset,
int yoffset, UIGTCon *data,
118 static QColor calcColor(
const QColor &color,
int alpha);
120 QList<UIGTCon*> *m_allData {
nullptr};
123 std::array<MythUIImage*,RECSTATUSSIZE> m_recImages {};
124 std::array<MythUIImage*,ARROWIMAGESIZE> m_arrowImages {};
127 int m_channelCount {5};
129 bool m_verticalLayout {
false};
133 int m_justification {Qt::AlignLeft | Qt::AlignTop |
135 bool m_multilineText {
true};
136 bool m_cutdown {
true};
138 QString m_selType {
"box"};
139 QPen m_drawSelLine {Qt::NoPen};
140 QBrush m_drawSelFill {Qt::NoBrush};
146 int m_fillType {Solid};
149 int m_progPastCol {0};
151 bool m_drawCategoryColors {
true};
152 bool m_drawCategoryText {
true};
153 int m_categoryAlpha {255};
UIGTCon(const UIGTCon &o)=default
UIGTCon & operator=(const UIGTCon &)=default
UIGTCon(const QRect drawArea, QString title, const QString &category, int arrow, int recType, int recStat)
A narrow purpose widget used to show television programs and the timeslots they occupy on channels.
int getChannelCount(void) const
bool isVerticalLayout(void) const
void SetTextOffset(const QPoint to)
QColor m_conflictingColor
QMap< QString, QColor > m_categoryColors
int getTimeCount(void) const
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 CopyFrom(MythUIType *base)
Copy this widgets state from another.
virtual void Finalize(void)
Perform any post-xml parsing initialisation tasks.
virtual void CreateCopy(MythUIType *parent)
Copy the state of this widget to the one given, it must be of the same type.
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 int MAX_DISPLAY_TIMES
static constexpr size_t ARROWIMAGESIZE
static constexpr uint8_t GridTimeNormal
static constexpr size_t RECSTATUSSIZE
static constexpr int MAX_DISPLAY_CHANS
static constexpr uint8_t GridTimeEndsAfter
static constexpr uint8_t GridTimeStartsBefore