22 m_screenDefn(screenDefn),
31 for (
int i = 0; i < types.size(); ++i)
44 bool foundtheme =
false;
67 if (i.key().isEmpty())
69 LOG(VB_GENERAL, LOG_DEBUG, i.key());
89 DataMap::iterator itr = data.begin();
90 while (itr != data.end())
99 LOG(VB_GENERAL, LOG_ERR,
"Theme is missing a required widget!");
107 return QString::fromUtf8(
"°") +
"F";
109 return QString::fromUtf8(
"°") +
"C";
117 QString
name = itr.key();
122 LOG(VB_GENERAL, LOG_ERR,
"Widget not found " + itr.key());
124 if (name ==
"copyright")
126 LOG(VB_GENERAL, LOG_WARNING,
127 QString(
"No copyright widget found, skipping screen %1.")
131 else if (name ==
"copyrightlogo")
133 LOG(VB_GENERAL, LOG_WARNING,
134 QString(
"No copyrightlogo widget found, skipping screen %1.")
140 if( !widget || checkOnly )
146 if (dynamic_cast<MythUIText *>(widget))
148 ((
MythUIText *) widget)->SetText(itr.value());
150 else if (dynamic_cast<MythUIImage *>(widget))
152 ((
MythUIImage *) widget)->SetFilename(itr.value());
171 if ((img = dynamic_cast<MythUIImage *>(widget)))
179 if (key.startsWith(
"relative_humidity") || key.startsWith(
"pop"))
182 if (key ==
"pressure")
183 return value + (
m_units == ENG_UNITS ?
" in" :
" mb");
185 if (key ==
"visibility")
186 return value + (m_units == ENG_UNITS ?
" mi" :
" km");
188 if (key.startsWith(
"temp") ||
189 key.startsWith(
"appt") ||
190 key.startsWith(
"low") ||
191 key.startsWith(
"high"))
193 if ((value ==
"NA") || (value ==
"N/A"))
199 if (key.startsWith(
"wind_gust") ||
200 key.startsWith(
"wind_spdgst") ||
201 key.startsWith(
"wind_speed"))
202 return value + (m_units == ENG_UNITS ?
" mph" :
" km/h");
206 if (key.startsWith(
"date"))
209 value.toInt( &isNumber);
213 int dayOfWeek = value.toInt();
224 return tr(
"Tuesday");
227 return tr(
"Wednesday");
230 return tr(
"Thursday");
236 return tr(
"Saturday");
242 if (key ==
"copyrightlogo" && value ==
"none")