|
std::string | GetLocation (int iLocation) |
| Retrieve the city name for the specified location from the settings. More...
|
|
const std::string & | GetLastUpdateTime () const |
|
const ForecastDay & | GetForecast (int day) const |
|
bool | IsFetched () |
|
void | Reset () |
|
void | SetArea (int iLocation) |
| Saves the specified location index to the settings. Call Refresh() afterwards to update weather info for the new location. More...
|
|
int | GetArea () const |
| Retrieves the current location index from the settings. More...
|
|
| CInfoLoader (unsigned int timeToRefresh=5 *60 *1000) |
|
std::string | GetInfo (int info) |
|
void | Refresh () |
|
virtual | ~IJobCallback ()=default |
| Destructor for job call back objects. More...
|
|
virtual void | OnJobAbort (unsigned int jobID, CJob *job) |
| An optional callback function used when a job will be aborted. More...
|
|
virtual void | OnJobProgress (unsigned int jobID, unsigned int progress, unsigned int total, const CJob *job) |
| An optional callback function that a job may call while processing. More...
|
|
virtual bool | OnSettingChanging (const std::shared_ptr< const CSetting > &setting) |
| The value of the given setting is being changed. More...
|
|
virtual bool | OnSettingUpdate (const std::shared_ptr< CSetting > &setting, const char *oldSettingId, const TiXmlNode *oldSettingNode) |
| The given setting needs to be updated. More...
|
|
virtual void | OnSettingPropertyChanged (const std::shared_ptr< const CSetting > &setting, const char *propertyName) |
| The given property of the given setting has changed. More...
|
|
|
static bool | GetSearchResults (const std::string &strSearch, std::string &strResult) |
|
|
CJob * | GetJob () const override |
|
std::string | TranslateInfo (int info) const override |
|
std::string | BusyInfo (int info) const override |
|
void | OnJobComplete (unsigned int jobID, bool success, CJob *job) override |
| The callback used when a job completes. More...
|
|
void | OnSettingChanged (const std::shared_ptr< const CSetting > &setting) override |
| The value of the given setting has changed. More...
|
|
void | OnSettingAction (const std::shared_ptr< const CSetting > &setting) override |
| The given setting has been activated. More...
|
|
◆ 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])
◆ 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)
◆ 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.
◆ 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]) |
The documentation for this class was generated from the following files: