xbmc
|
Skin timers are skin objects that dependent on time and can be fully controlled from skins either using boolean conditions or builtin functions. This class represents the Skin Timer object. More...
#include <SkinTimer.h>
Public Member Functions | |
CSkinTimer (const std::string &name, const INFO::InfoPtr &startCondition, const INFO::InfoPtr &resetCondition, const INFO::InfoPtr &stopCondition, const CGUIAction &startActions, const CGUIAction &stopActions, bool resetOnStart) | |
Skin timer constructor. More... | |
virtual | ~CSkinTimer ()=default |
Default skin timer destructor. | |
void | Start () |
Start the skin timer. | |
void | Reset () |
Resets the skin timer so that the elapsed time of the timer is 0. | |
void | Stop () |
stops the skin timer | |
INFO::InfoPtr | GetStartCondition () const |
Getter for the timer start boolean condition/expression. More... | |
INFO::InfoPtr | GetResetCondition () const |
Getter for the timer reset boolean condition/expression. More... | |
INFO::InfoPtr | GetStopCondition () const |
Getter for the timer start boolean condition/expression. More... | |
bool | VerifyStartCondition () const |
Evaluates the timer start boolean info expression returning the respective result. More... | |
bool | VerifyResetCondition () const |
Evaluates the timer reset boolean info expression returning the respective result. More... | |
bool | VerifyStopCondition () const |
Evaluates the timer stop boolean info expression returning the respective result. More... | |
![]() | |
bool | IsRunning () const |
Retrieve the running state of the stopwatch. More... | |
void | StartZero () |
Record start time and change state to running. | |
void | Start () |
Record start time and change state to running, only if the stopwatch is stopped. | |
void | Stop () |
Record stop time and change state to not running. | |
void | Reset () |
Set the start time such that time elapsed is now zero. | |
float | GetElapsedSeconds () const |
Retrieve time elapsed between the last call to Start(), StartZero() or Reset() and; if running, now; if stopped, the last call to Stop(). More... | |
float | GetElapsedMilliseconds () const |
Retrieve time elapsed between the last call to Start(), StartZero() or Reset() and; if running, now; if stopped, the last call to Stop(). More... | |
Skin timers are skin objects that dependent on time and can be fully controlled from skins either using boolean conditions or builtin functions. This class represents the Skin Timer object.
CSkinTimer::CSkinTimer | ( | const std::string & | name, |
const INFO::InfoPtr & | startCondition, | ||
const INFO::InfoPtr & | resetCondition, | ||
const INFO::InfoPtr & | stopCondition, | ||
const CGUIAction & | startActions, | ||
const CGUIAction & | stopActions, | ||
bool | resetOnStart | ||
) |
Skin timer constructor.
name | - the name of the timer |
startCondition | - the boolean info expression to start the timer (may be null) |
resetCondition | - the boolean info expression to reset the timer (may be null) |
stopCondition | - the boolean info expression to stop the timer (may be null) |
startActions | - the builtin functions to execute on timer start (actions may be empty) |
stopActions | - the builtin functions to execute on timer stop (actions may be empty) |
resetOnStart | - if the timer should be reset when started (i.e. start from zero if true or resumed if false) |
INFO::InfoPtr CSkinTimer::GetResetCondition | ( | ) | const |
Getter for the timer reset boolean condition/expression.
INFO::InfoPtr CSkinTimer::GetStartCondition | ( | ) | const |
Getter for the timer start boolean condition/expression.
INFO::InfoPtr CSkinTimer::GetStopCondition | ( | ) | const |
Getter for the timer start boolean condition/expression.
bool CSkinTimer::VerifyResetCondition | ( | ) | const |
Evaluates the timer reset boolean info expression returning the respective result.
Called from the skin timer manager to check if the timer should be reset to 0
bool CSkinTimer::VerifyStartCondition | ( | ) | const |
Evaluates the timer start boolean info expression returning the respective result.
Called from the skin timer manager to check if the timer should be started
bool CSkinTimer::VerifyStopCondition | ( | ) | const |
Evaluates the timer stop boolean info expression returning the respective result.
Called from the skin timer manager to check if the timer should be stopped