#include <WeatherManager.h>
◆ CWeatherManager()
CWeatherManager::CWeatherManager |
( |
void | | ) |
|
◆ ~CWeatherManager()
CWeatherManager::~CWeatherManager |
( |
void | | ) |
|
|
override |
◆ BusyInfo()
std::string CWeatherManager::BusyInfo |
( |
int | info | ) |
const |
|
overrideprotectedvirtual |
◆ GetArea()
int CWeatherManager::GetArea |
( |
| ) |
const |
Retrieves the current location index from the settings.
- Returns
- the active location index (will be in the range [1..MAXLOCATION])
◆ GetForecast()
◆ GetJob()
CJob * CWeatherManager::GetJob |
( |
| ) |
const |
|
overrideprotectedvirtual |
◆ GetLastUpdateTime()
const std::string & CWeatherManager::GetLastUpdateTime |
( |
| ) |
const |
|
inline |
◆ GetLocation()
std::string CWeatherManager::GetLocation |
( |
int | iLocation | ) |
|
Retrieve the city name for the specified location from the settings.
- Parameters
-
iLocation | the location index (can be in the range [1..MAXLOCATION]) |
- Returns
- the city name (without the accompanying region area code)
◆ GetSearchResults()
static bool CWeatherManager::GetSearchResults |
( |
const std::string & | strSearch, |
|
|
std::string & | strResult ) |
|
static |
◆ IsFetched()
bool CWeatherManager::IsFetched |
( |
| ) |
|
◆ OnJobComplete()
void CWeatherManager::OnJobComplete |
( |
unsigned int | jobID, |
|
|
bool | success, |
|
|
CJob * | job ) |
|
overrideprotectedvirtual |
The callback used when a job completes.
OnJobComplete is called at the completion of the job's DoWork() function, and is used to return information to the caller on the result of the job. On returning form this function the CJobManager will destroy this job.
- Parameters
-
jobID | the unique id of the job (as retrieved from CJobManager::AddJob) |
success | the result from the DoWork call |
job | the job that has been processed. The job will be destroyed after this function returns |
- See also
- CJobManager and CJob
Reimplemented from CInfoLoader.
◆ OnSettingAction()
void CWeatherManager::OnSettingAction |
( |
const std::shared_ptr< const CSetting > & | setting | ) |
|
|
overrideprotectedvirtual |
The given setting has been activated.
This callback is triggered whenever the given setting has been activated. This callback is only fired for CSettingAction settings.
- Parameters
-
setting | The setting which has been activated. |
- Todo
- maybe have ShowAndGetInput return a bool if settings changed, then only reset weather if true.
Reimplemented from ISettingCallback.
◆ OnSettingChanged()
void CWeatherManager::OnSettingChanged |
( |
const std::shared_ptr< const CSetting > & | setting | ) |
|
|
overrideprotectedvirtual |
The value of the given setting has changed.
This callback is triggered whenever the value of a setting has been successfully changed (i.e. none of the OnSettingChanging() handlers) has reverted the change.
- Parameters
-
setting | The setting whose value has been changed |
Reimplemented from ISettingCallback.
◆ Reset()
void CWeatherManager::Reset |
( |
| ) |
|
◆ SetArea()
void CWeatherManager::SetArea |
( |
int | iLocation | ) |
|
Saves the specified location index to the settings. Call Refresh() afterwards to update weather info for the new location.
- Parameters
-
iLocation | the new location index (can be in the range [1..MAXLOCATION]) |
◆ TranslateInfo()
std::string CWeatherManager::TranslateInfo |
( |
int | info | ) |
const |
|
overrideprotectedvirtual |
The documentation for this class was generated from the following files: