2 #include <QCoreApplication>
17 if (screenName ==
"Current Conditions")
18 return QCoreApplication::translate(
"(Weather Screens)",
19 "Current Conditions");
20 if (screenName ==
"Three Day Forecast")
21 return QCoreApplication::translate(
"(Weather Screens)",
22 "Three Day Forecast");
23 if (screenName ==
"18 Hour Forecast")
24 return QCoreApplication::translate(
"(Weather Screens)",
26 if (screenName ==
"Severe Weather Alerts")
27 return QCoreApplication::translate(
"(Weather Screens)",
28 "Severe Weather Alerts");
29 if (screenName ==
"Six Day Forecast")
30 return QCoreApplication::translate(
"(Weather Screens)",
32 if (screenName ==
"Static Map")
33 return QCoreApplication::translate(
"(Weather Screens)",
35 if (screenName ==
"Animated Map")
36 return QCoreApplication::translate(
"(Weather Screens)",
49 QStringList::iterator it;
50 for (it = searchpath.begin(); it != searchpath.end(); ++it)
52 QString
filename = (*it) +
"weather-screens.xml";
55 LOG(VB_GENERAL, LOG_INFO,
56 QString(
"Loading from: %1").arg(
filename));
68 LOG(VB_GENERAL, LOG_ERR,
69 QString(
"Unable to parse weather-screens.xml"));
80 if (!f.open(QIODevice::ReadOnly))
85 if ( !doc.setContent( &f ) )
92 QDomElement docElem = doc.documentElement();
94 for (QDomNode n = docElem.firstChild(); !n.isNull();
97 QDomElement e = n.toElement();
100 if ( (e.tagName() ==
"screen") && !screens.contains(e.attribute(
"name")) )
102 screens[e.attribute(
"name")].m_multiLoc =
false;
103 screens[e.attribute(
"name")].m_name = e.attribute(
"name");
104 screens[e.attribute(
"name")].m_title =
106 QString hasUnits = e.attribute(
"hasunits");
107 screens[e.attribute(
"name")].m_hasUnits =
108 hasUnits.toLower() !=
"no";
109 screens[e.attribute(
"name")].m_dataTypes =
loadScreen(e);
119 QStringList typesList;
124 QDomElement e = n.toElement();
127 if (e.tagName() ==
"datum")
129 QString name = e.attribute(
"name");