#include <SolarTimer.h>
Public Types | |
| enum | EventType { Official, Civil, Nautical, Astronomical } |
Public Member Functions | |
| SolarTimer () | |
| SolarTimer (wxEvtHandler *owner, double fLong, double fLat, EventType type) | |
| Constructor. | |
| void | SetOwner (wxEvtHandler *owner, double fLong, double fLat, EventType type) |
| Constructor. | |
| void | SetPosition (double fLong, double fLat) |
| Sets the position for which sunrise/sunset events are to occur. | |
| void | Start () |
| Starts the solar timer. | |
| void | Stop () |
| Stops the solar timer. | |
| bool | IsDaytime () |
| Returns true if it is daytime. | |
| bool | Valid () |
| void | GetPosition (double &fLong, double &fLat) const |
| Returns the coordinates for which sunrise/sunset are computed. | |
| EventType | GetEventType () const |
| Returns the type of solar event. | |
| wxDateTime | GetSunrise () const |
| Returns the sunrise time, adjusted for DST as necessary, for the current position. | |
| wxDateTime | GetSunset () const |
| Returns the sunset time, adjusted for DST as necessary, for the current position. | |
| virtual void | Notify () |
| Virtual function called at sunrise and sunset. | |
Private Member Functions | |
| void | Init () |
| void | OnTimer (wxTimerEvent &event) |
| void | OnTimeChange (wxTimeChangeEvent &event) |
| void | ComputeSunriset () |
| bool | IsNewDay () |
| void | NotifyIfNeeded () |
Private Attributes | |
| wxEvtHandler * | m_pOwner |
| wxTimer | m_Timer |
| double | m_fLong |
| double | m_fLat |
| EventType | m_EventType |
| wxDateTime | m_Today |
| wxDateTime | m_Sunrise |
| wxDateTime | m_Sunset |
| bool | m_bIsDaytime |
Definition at line 75 of file MainPage.txt.
| SolarTimer::SolarTimer | ( | ) |
| SolarTimer::SolarTimer | ( | wxEvtHandler * | owner, | |
| double | fLong, | |||
| double | fLat, | |||
| EventType | type | |||
| ) |
| void SolarTimer::SetOwner | ( | wxEvtHandler * | owner, | |
| double | fLong, | |||
| double | fLat, | |||
| EventType | type | |||
| ) |
| void SolarTimer::SetPosition | ( | double | fLong, | |
| double | fLat | |||
| ) |
Sets the position for which sunrise/sunset events are to occur.
Definition at line 119 of file SolarTimer.cpp.
| void SolarTimer::Start | ( | ) |
| void SolarTimer::Stop | ( | ) |
| bool SolarTimer::IsDaytime | ( | ) |
| bool SolarTimer::Valid | ( | ) |
Definition at line 446 of file SolarTimer.cpp.
| void SolarTimer::GetPosition | ( | double & | fLong, | |
| double & | fLat | |||
| ) | const |
Returns the coordinates for which sunrise/sunset are computed.
Definition at line 186 of file SolarTimer.cpp.
| SolarTimer::EventType SolarTimer::GetEventType | ( | ) | const |
| wxDateTime SolarTimer::GetSunrise | ( | ) | const |
Returns the sunrise time, adjusted for DST as necessary, for the current position.
Definition at line 208 of file SolarTimer.cpp.
| wxDateTime SolarTimer::GetSunset | ( | ) | const |
Returns the sunset time, adjusted for DST as necessary, for the current position.
Definition at line 219 of file SolarTimer.cpp.
| void SolarTimer::Notify | ( | ) | [virtual] |
Virtual function called at sunrise and sunset.
Subclasses should override this method.
Definition at line 231 of file SolarTimer.cpp.
| void SolarTimer::Init | ( | ) | [private] |
Definition at line 284 of file SolarTimer.cpp.
| void SolarTimer::OnTimer | ( | wxTimerEvent & | event | ) | [private] |
Definition at line 243 of file SolarTimer.cpp.
| void SolarTimer::OnTimeChange | ( | wxTimeChangeEvent & | event | ) | [private] |
Definition at line 271 of file SolarTimer.cpp.
| void SolarTimer::ComputeSunriset | ( | ) | [private] |
Definition at line 299 of file SolarTimer.cpp.
| bool SolarTimer::IsNewDay | ( | ) | [private] |
Definition at line 278 of file SolarTimer.cpp.
| void SolarTimer::NotifyIfNeeded | ( | ) | [private] |
Definition at line 254 of file SolarTimer.cpp.
wxEvtHandler* SolarTimer::m_pOwner [private] |
Definition at line 136 of file SolarTimer.h.
wxTimer SolarTimer::m_Timer [private] |
Definition at line 137 of file SolarTimer.h.
double SolarTimer::m_fLong [private] |
Definition at line 138 of file SolarTimer.h.
double SolarTimer::m_fLat [private] |
Definition at line 139 of file SolarTimer.h.
EventType SolarTimer::m_EventType [private] |
Definition at line 140 of file SolarTimer.h.
wxDateTime SolarTimer::m_Today [private] |
Definition at line 141 of file SolarTimer.h.
wxDateTime SolarTimer::m_Sunrise [private] |
Definition at line 142 of file SolarTimer.h.
wxDateTime SolarTimer::m_Sunset [private] |
Definition at line 143 of file SolarTimer.h.
bool SolarTimer::m_bIsDaytime [private] |
Definition at line 144 of file SolarTimer.h.
1.5.5