2 #include <QCoreApplication>
16 if (screenName ==
"Current Conditions")
17 return QCoreApplication::translate(
"(Weather Screens)",
18 "Current Conditions");
19 if (screenName ==
"Three Day Forecast")
20 return QCoreApplication::translate(
"(Weather Screens)",
21 "Three Day Forecast");
22 if (screenName ==
"18 Hour Forecast")
23 return QCoreApplication::translate(
"(Weather Screens)",
25 if (screenName ==
"Severe Weather Alerts")
26 return QCoreApplication::translate(
"(Weather Screens)",
27 "Severe Weather Alerts");
28 if (screenName ==
"Six Day Forecast")
29 return QCoreApplication::translate(
"(Weather Screens)",
31 if (screenName ==
"Static Map")
32 return QCoreApplication::translate(
"(Weather Screens)",
34 if (screenName ==
"Animated Map")
35 return QCoreApplication::translate(
"(Weather Screens)",
48 QStringList::iterator it;
49 for (it = searchpath.begin(); it != searchpath.end(); ++it)
51 QString
filename = (*it) +
"weather-screens.xml";
54 LOG(VB_GENERAL, LOG_INFO,
55 QString(
"Loading from: %1").arg(
filename));
67 LOG(VB_GENERAL, LOG_ERR,
68 QString(
"Unable to parse weather-screens.xml"));
79 if (!f.open(QIODevice::ReadOnly))
84 if ( !doc.setContent( &f ) )
91 QDomElement docElem = doc.documentElement();
93 for (QDomNode n = docElem.firstChild(); !n.isNull();
96 QDomElement e = n.toElement();
99 if ( (e.tagName() ==
"screen") && !screens.contains(e.attribute(
"name")) )
101 screens[e.attribute(
"name")].m_multiLoc =
false;
102 screens[e.attribute(
"name")].m_name = e.attribute(
"name");
103 screens[e.attribute(
"name")].m_title =
105 QString hasUnits = e.attribute(
"hasunits");
106 screens[e.attribute(
"name")].m_hasUnits =
107 hasUnits.toLower() !=
"no";
108 screens[e.attribute(
"name")].m_dataTypes =
loadScreen(e);
118 QStringList typesList;
123 QDomElement e = n.toElement();
126 if (e.tagName() ==
"datum")
128 QString name = e.attribute(
"name");