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 ()
 
bool isReady ()
 
QString getVersion ()
 
QString getName ()
 
QString getAuthor ()
 
QString getEmail ()
 
units_t getUnits ()
 
void setUnits (units_t units)
 
QStringList getLocationList (const QString &str)
 
void setLocale (const QString &locale)
 
QString getLocale ()
 
void startUpdate (bool forceUpdate=false)
 
int getScriptTimeout ()
 
void setScriptTimeout (int timeout)
 
int getUpdateTimeout ()
 
void setUpdateTimeout (int timeout)
 
void startUpdateTimer ()
 
void stopUpdateTimer ()
 
bool inUse ()
 
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, uint &updateTimeout, uint &scriptTimeout)
 
static bool ProbeInfo (ScriptInfo &scriptInfo)
 

Private Slots

void processExit (uint status=0)
 
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 33 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 325 of file weatherSource.cpp.

◆ ~WeatherSource()

WeatherSource::~WeatherSource ( )

Definition at line 345 of file weatherSource.cpp.

Member Function Documentation

◆ ProbeScript()

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

Definition at line 194 of file weatherSource.cpp.

Referenced by SourceManager::recurseDirs().

◆ ProbeTypes()

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

Definition at line 22 of file weatherSource.cpp.

Referenced by ProbeScript().

◆ ProbeTimeouts()

bool WeatherSource::ProbeTimeouts ( const QString &  workingDirectory,
const QString &  program,
uint updateTimeout,
uint scriptTimeout 
)
static

Definition at line 61 of file weatherSource.cpp.

Referenced by ProbeScript().

◆ ProbeInfo()

bool WeatherSource::ProbeInfo ( ScriptInfo scriptInfo)
static

Definition at line 129 of file weatherSource.cpp.

Referenced by ProbeScript().

◆ isReady()

bool WeatherSource::isReady ( )
inline

Definition at line 50 of file weatherSource.h.

◆ getVersion()

QString WeatherSource::getVersion ( )
inline

Definition at line 51 of file weatherSource.h.

◆ getName()

QString WeatherSource::getName ( void  )
inline

Definition at line 52 of file weatherSource.h.

◆ getAuthor()

QString WeatherSource::getAuthor ( )
inline

Definition at line 53 of file weatherSource.h.

◆ getEmail()

QString WeatherSource::getEmail ( )
inline

Definition at line 54 of file weatherSource.h.

◆ getUnits()

units_t WeatherSource::getUnits ( )
inline

Definition at line 55 of file weatherSource.h.

Referenced by SourceManager::needSourceFor().

◆ setUnits()

void WeatherSource::setUnits ( units_t  units)
inline

Definition at line 56 of file weatherSource.h.

◆ getLocationList()

QStringList WeatherSource::getLocationList ( const QString &  str)

Definition at line 374 of file weatherSource.cpp.

◆ setLocale()

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

Definition at line 58 of file weatherSource.h.

◆ getLocale()

QString WeatherSource::getLocale ( )
inline

Definition at line 59 of file weatherSource.h.

Referenced by SourceManager::needSourceFor().

◆ startUpdate()

void WeatherSource::startUpdate ( bool  forceUpdate = false)

Definition at line 418 of file weatherSource.cpp.

Referenced by SourceManager::doUpdate(), and updateTimeout().

◆ getScriptTimeout()

int WeatherSource::getScriptTimeout ( )
inline

Definition at line 63 of file weatherSource.h.

◆ setScriptTimeout()

void WeatherSource::setScriptTimeout ( int  timeout)
inline

Definition at line 64 of file weatherSource.h.

◆ getUpdateTimeout()

int WeatherSource::getUpdateTimeout ( )
inline

Definition at line 66 of file weatherSource.h.

◆ setUpdateTimeout()

void WeatherSource::setUpdateTimeout ( int  timeout)
inline

Definition at line 67 of file weatherSource.h.

◆ startUpdateTimer()

void WeatherSource::startUpdateTimer ( )
inline

Definition at line 69 of file weatherSource.h.

Referenced by SourceManager::startTimers(), and updateTimeout().

◆ stopUpdateTimer()

void WeatherSource::stopUpdateTimer ( )
inline

Definition at line 70 of file weatherSource.h.

Referenced by SourceManager::stopTimers().

◆ inUse()

bool WeatherSource::inUse ( )
inline

Definition at line 72 of file weatherSource.h.

Referenced by SourceManager::doUpdate().

◆ setInUse()

void WeatherSource::setInUse ( bool  inuse)
inline

Definition at line 73 of file weatherSource.h.

◆ getId()

int WeatherSource::getId ( )
inline

Definition at line 75 of file weatherSource.h.

Referenced by SourceManager::needSourceFor(), processExit(), and startUpdate().

◆ connectScreen()

void WeatherSource::connectScreen ( WeatherScreen ws)

Definition at line 356 of file weatherSource.cpp.

◆ disconnectScreen()

void WeatherSource::disconnectScreen ( WeatherScreen ws)

Definition at line 368 of file weatherSource.cpp.

◆ newData

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

◆ processExit

void WeatherSource::processExit ( uint  status = 0)
privateslot

Definition at line 500 of file weatherSource.cpp.

Referenced by startUpdate().

◆ updateTimeout

void WeatherSource::updateTimeout ( void  )
privateslot

Definition at line 494 of file weatherSource.cpp.

Referenced by ProbeTimeouts(), and WeatherSource().

◆ processData()

void WeatherSource::processData ( )
private

Definition at line 562 of file weatherSource.cpp.

Referenced by processExit(), and startUpdate().

Member Data Documentation

◆ m_ready

bool WeatherSource::m_ready {false}
private

Definition at line 90 of file weatherSource.h.

Referenced by isReady().

◆ m_inuse

bool WeatherSource::m_inuse {false}
private

Definition at line 91 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 93 of file weatherSource.h.

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

◆ m_dir

QString WeatherSource::m_dir
private

Definition at line 94 of file weatherSource.h.

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

◆ m_locale

QString WeatherSource::m_locale
private

Definition at line 95 of file weatherSource.h.

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

◆ m_cachefile

QString WeatherSource::m_cachefile
private

Definition at line 96 of file weatherSource.h.

Referenced by processExit(), and startUpdate().

◆ m_buffer

QByteArray WeatherSource::m_buffer
private

Definition at line 97 of file weatherSource.h.

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

◆ m_units

units_t WeatherSource::m_units {SI_UNITS}
private

Definition at line 98 of file weatherSource.h.

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

◆ m_updateTimer

QTimer* WeatherSource::m_updateTimer {nullptr}
private

Definition at line 99 of file weatherSource.h.

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

◆ m_connectCnt

int WeatherSource::m_connectCnt {0}
private

Definition at line 100 of file weatherSource.h.

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

◆ m_data

DataMap WeatherSource::m_data
private

Definition at line 101 of file weatherSource.h.

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


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