MythTV  master
Signals | Public Member Functions | Static Public Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
WeatherSource Class Reference

#include <weatherSource.h>

Inheritance diagram for WeatherSource:
Inheritance graph
[legend]
Collaboration diagram for WeatherSource:
Collaboration graph
[legend]

Signals

void newData (QString, units_t, DataMap)
 

Public Member Functions

 WeatherSource (ScriptInfo *info)
 Watch out, we store the parameter as a member variable, don't go deleting it, that wouldn't be good. More...
 
 ~WeatherSource () override
 
bool isReady () const
 
QString getVersion ()
 
QString getName ()
 
QString getAuthor ()
 
QString getEmail ()
 
units_t getUnits () const
 
void setUnits (units_t units)
 
QStringList getLocationList (const QString &str)
 
void setLocale (const QString &locale)
 
QString getLocale ()
 
void startUpdate (bool forceUpdate=false)
 
std::chrono::seconds getScriptTimeout ()
 
void setScriptTimeout (std::chrono::seconds timeout)
 
std::chrono::seconds getUpdateTimeout ()
 
void setUpdateTimeout (std::chrono::seconds timeout)
 
void startUpdateTimer ()
 
void stopUpdateTimer ()
 
bool inUse () const
 
void setInUse (bool inuse)
 
int getId ()
 
void connectScreen (WeatherScreen *ws)
 
void disconnectScreen (WeatherScreen *ws)
 

Static Public Member Functions

static ScriptInfoProbeScript (const QFileInfo &fi)
 
static QStringList ProbeTypes (const QString &workingDirectory, const QString &program)
 
static bool ProbeTimeouts (const QString &workingDirectory, const QString &program, std::chrono::seconds &updateTimeout, std::chrono::seconds &scriptTimeout)
 
static bool ProbeInfo (ScriptInfo &scriptInfo)
 

Private Slots

void processExit (uint status)
 
void processExit ()
 
void updateTimeout ()
 

Private Member Functions

void processData ()
 

Private Attributes

bool m_ready {false}
 
bool m_inuse {false}
 
ScriptInfom_info {nullptr}
 
MythSystemLegacym_ms {nullptr}
 
QString m_dir
 
QString m_locale
 
QString m_cachefile
 
QByteArray m_buffer
 
units_t m_units {SI_UNITS}
 
QTimer * m_updateTimer {nullptr}
 
int m_connectCnt {0}
 
DataMap m_data
 

Detailed Description

Definition at line 36 of file weatherSource.h.

Constructor & Destructor Documentation

◆ WeatherSource()

WeatherSource::WeatherSource ( ScriptInfo info)
explicit

Watch out, we store the parameter as a member variable, don't go deleting it, that wouldn't be good.

Parameters
infois a required variable.

Definition at line 328 of file weatherSource.cpp.

◆ ~WeatherSource()

WeatherSource::~WeatherSource ( )
override

Definition at line 348 of file weatherSource.cpp.

Member Function Documentation

◆ ProbeScript()

ScriptInfo * WeatherSource::ProbeScript ( const QFileInfo &  fi)
static

Definition at line 199 of file weatherSource.cpp.

Referenced by SourceManager::recurseDirs().

◆ ProbeTypes()

QStringList WeatherSource::ProbeTypes ( const QString &  workingDirectory,
const QString &  program 
)
static

Definition at line 27 of file weatherSource.cpp.

Referenced by ProbeScript().

◆ ProbeTimeouts()

bool WeatherSource::ProbeTimeouts ( const QString &  workingDirectory,
const QString &  program,
std::chrono::seconds &  updateTimeout,
std::chrono::seconds &  scriptTimeout 
)
static

Definition at line 66 of file weatherSource.cpp.

Referenced by ProbeScript().

◆ ProbeInfo()

bool WeatherSource::ProbeInfo ( ScriptInfo scriptInfo)
static

Definition at line 134 of file weatherSource.cpp.

Referenced by ProbeScript().

◆ isReady()

bool WeatherSource::isReady ( ) const
inline

Definition at line 53 of file weatherSource.h.

◆ getVersion()

QString WeatherSource::getVersion ( )
inline

Definition at line 54 of file weatherSource.h.

◆ getName()

QString WeatherSource::getName ( )
inline

Definition at line 55 of file weatherSource.h.

◆ getAuthor()

QString WeatherSource::getAuthor ( )
inline

Definition at line 56 of file weatherSource.h.

◆ getEmail()

QString WeatherSource::getEmail ( )
inline

Definition at line 57 of file weatherSource.h.

◆ getUnits()

units_t WeatherSource::getUnits ( ) const
inline

Definition at line 58 of file weatherSource.h.

◆ setUnits()

void WeatherSource::setUnits ( units_t  units)
inline

Definition at line 59 of file weatherSource.h.

◆ getLocationList()

QStringList WeatherSource::getLocationList ( const QString &  str)

Definition at line 377 of file weatherSource.cpp.

◆ setLocale()

void WeatherSource::setLocale ( const QString &  locale)
inline

Definition at line 61 of file weatherSource.h.

◆ getLocale()

QString WeatherSource::getLocale ( )
inline

Definition at line 62 of file weatherSource.h.

◆ startUpdate()

void WeatherSource::startUpdate ( bool  forceUpdate = false)

Definition at line 417 of file weatherSource.cpp.

Referenced by updateTimeout().

◆ getScriptTimeout()

std::chrono::seconds WeatherSource::getScriptTimeout ( )
inline

Definition at line 66 of file weatherSource.h.

◆ setScriptTimeout()

void WeatherSource::setScriptTimeout ( std::chrono::seconds  timeout)
inline

Definition at line 67 of file weatherSource.h.

◆ getUpdateTimeout()

std::chrono::seconds WeatherSource::getUpdateTimeout ( )
inline

Definition at line 69 of file weatherSource.h.

◆ setUpdateTimeout()

void WeatherSource::setUpdateTimeout ( std::chrono::seconds  timeout)
inline

Definition at line 70 of file weatherSource.h.

◆ startUpdateTimer()

void WeatherSource::startUpdateTimer ( )
inline

Definition at line 72 of file weatherSource.h.

Referenced by updateTimeout().

◆ stopUpdateTimer()

void WeatherSource::stopUpdateTimer ( )
inline

Definition at line 73 of file weatherSource.h.

◆ inUse()

bool WeatherSource::inUse ( ) const
inline

Definition at line 75 of file weatherSource.h.

◆ setInUse()

void WeatherSource::setInUse ( bool  inuse)
inline

Definition at line 76 of file weatherSource.h.

◆ getId()

int WeatherSource::getId ( )
inline

Definition at line 78 of file weatherSource.h.

Referenced by processExit(), and startUpdate().

◆ connectScreen()

void WeatherSource::connectScreen ( WeatherScreen ws)

Definition at line 359 of file weatherSource.cpp.

◆ disconnectScreen()

void WeatherSource::disconnectScreen ( WeatherScreen ws)

Definition at line 371 of file weatherSource.cpp.

◆ newData

void WeatherSource::newData ( QString  ,
units_t  ,
DataMap   
)
signal

◆ processExit [1/2]

void WeatherSource::processExit ( uint  status)
privateslot

Definition at line 501 of file weatherSource.cpp.

◆ processExit [2/2]

void WeatherSource::processExit ( )
privateslot

Definition at line 563 of file weatherSource.cpp.

Referenced by startUpdate().

◆ updateTimeout

void WeatherSource::updateTimeout ( )
privateslot

Definition at line 495 of file weatherSource.cpp.

Referenced by ProbeTimeouts(), and WeatherSource().

◆ processData()

void WeatherSource::processData ( )
private

Definition at line 568 of file weatherSource.cpp.

Referenced by processExit(), and startUpdate().

Member Data Documentation

◆ m_ready

bool WeatherSource::m_ready {false}
private

Definition at line 94 of file weatherSource.h.

Referenced by isReady().

◆ m_inuse

bool WeatherSource::m_inuse {false}
private

Definition at line 95 of file weatherSource.h.

Referenced by inUse(), and setInUse().

◆ m_info

ScriptInfo* WeatherSource::m_info {nullptr}
private

◆ m_ms

MythSystemLegacy* WeatherSource::m_ms {nullptr}
private

Definition at line 97 of file weatherSource.h.

Referenced by processExit(), startUpdate(), and ~WeatherSource().

◆ m_dir

QString WeatherSource::m_dir
private

Definition at line 98 of file weatherSource.h.

Referenced by processExit(), startUpdate(), and WeatherSource().

◆ m_locale

QString WeatherSource::m_locale
private

Definition at line 99 of file weatherSource.h.

Referenced by connectScreen(), getLocale(), processExit(), setLocale(), and startUpdate().

◆ m_cachefile

QString WeatherSource::m_cachefile
private

Definition at line 100 of file weatherSource.h.

Referenced by processExit(), and startUpdate().

◆ m_buffer

QByteArray WeatherSource::m_buffer
private

Definition at line 101 of file weatherSource.h.

Referenced by processData(), processExit(), and startUpdate().

◆ m_units

units_t WeatherSource::m_units {SI_UNITS}
private

Definition at line 102 of file weatherSource.h.

Referenced by connectScreen(), getUnits(), processExit(), setUnits(), and startUpdate().

◆ m_updateTimer

QTimer* WeatherSource::m_updateTimer {nullptr}
private

Definition at line 103 of file weatherSource.h.

Referenced by startUpdateTimer(), stopUpdateTimer(), WeatherSource(), and ~WeatherSource().

◆ m_connectCnt

int WeatherSource::m_connectCnt {0}
private

Definition at line 104 of file weatherSource.h.

Referenced by connectScreen(), disconnectScreen(), processExit(), and startUpdate().

◆ m_data

DataMap WeatherSource::m_data
private

Definition at line 105 of file weatherSource.h.

Referenced by connectScreen(), processData(), processExit(), and startUpdate().


The documentation for this class was generated from the following files: