MythTV  master
Classes | Typedefs | Functions | Variables
weatherUtils.h File Reference
#include <utility>
#include <QDomElement>
#include <QFile>
#include <QMap>
#include <QMetaType>
#include <QMultiHash>
#include <QString>
#include <libmyth/mythcontext.h>
Include dependency graph for weatherUtils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  TypeListInfo
 
class  ScreenListInfo
 

Typedefs

using units_t = unsigned char
 
using DataMap = QMap< QString, QString >
 
using TypeListMap = QMultiHash< QString, TypeListInfo >
 
using ScreenListMap = QMap< QString, ScreenListInfo >
 

Functions

 Q_DECLARE_METATYPE (ScreenListInfo *)
 
ScreenListMap loadScreens ()
 
QStringList loadScreen (const QDomElement &ScreenListInfo)
 
bool doLoadScreens (const QString &filename, ScreenListMap &screens)
 

Variables

static constexpr uint8_t SI_UNITS { 0 }
 
static constexpr uint8_t ENG_UNITS { 1 }
 
static constexpr std::chrono::minutes DEFAULT_UPDATE_TIMEOUT { 5min }
 
static constexpr std::chrono::seconds DEFAULT_SCRIPT_TIMEOUT { 60s }
 

Typedef Documentation

◆ units_t

using units_t = unsigned char

Definition at line 25 of file weatherUtils.h.

◆ DataMap

using DataMap = QMap<QString, QString>

Definition at line 26 of file weatherUtils.h.

◆ TypeListMap

using TypeListMap = QMultiHash<QString, TypeListInfo>

Definition at line 46 of file weatherUtils.h.

◆ ScreenListMap

using ScreenListMap = QMap<QString, ScreenListInfo>

Definition at line 71 of file weatherUtils.h.

Function Documentation

◆ Q_DECLARE_METATYPE()

Q_DECLARE_METATYPE ( ScreenListInfo )

◆ loadScreens()

ScreenListMap loadScreens ( )

Definition at line 41 of file weatherUtils.cpp.

Referenced by ScreenSetup::loadData(), and Weather::Weather().

◆ loadScreen()

QStringList loadScreen ( const QDomElement &  ScreenListInfo)

Definition at line 115 of file weatherUtils.cpp.

Referenced by doLoadScreens().

◆ doLoadScreens()

bool doLoadScreens ( const QString &  filename,
ScreenListMap screens 
)

Definition at line 74 of file weatherUtils.cpp.

Referenced by loadScreens().

Variable Documentation

◆ SI_UNITS

constexpr uint8_t SI_UNITS { 0 }
staticconstexpr

Definition at line 18 of file weatherUtils.h.

Referenced by ScreenSetup::customEvent(), and WeatherSource::startUpdate().

◆ ENG_UNITS

constexpr uint8_t ENG_UNITS { 1 }
staticconstexpr

◆ DEFAULT_UPDATE_TIMEOUT

constexpr std::chrono::minutes DEFAULT_UPDATE_TIMEOUT { 5min }
staticconstexpr

Definition at line 20 of file weatherUtils.h.

Referenced by WeatherSource::ProbeTimeouts().

◆ DEFAULT_SCRIPT_TIMEOUT

constexpr std::chrono::seconds DEFAULT_SCRIPT_TIMEOUT { 60s }
staticconstexpr

Definition at line 21 of file weatherUtils.h.

Referenced by WeatherSource::ProbeTimeouts().