|
Yate
|
An UI time updater. More...
#include <yatecbase.h>
Public Member Functions | |
| DurationUpdate (ClientLogic *logic, bool owner, const char *id, const char *name, unsigned int start=Time::secNow()) | |
| virtual | ~DurationUpdate () |
| virtual const String & | toString () const |
| void | setLogic (ClientLogic *logic=0, bool owner=true) |
| virtual unsigned int | update (unsigned int secNow, const String *table=0, Window *wnd=0, Window *skip=0, bool force=false) |
| virtual unsigned int | buildTimeParam (NamedList &dest, unsigned int secNow, bool force=false) |
| virtual unsigned int | buildTimeString (String &dest, unsigned int secNow, bool force=false) |
Static Public Member Functions | |
| static unsigned int | buildTimeParam (NamedList &dest, const char *param, unsigned int secStart, unsigned int secNow, bool force=false) |
| static unsigned int | buildTimeString (String &dest, unsigned int secStart, unsigned int secNow, bool force=false) |
Protected Member Functions | |
| virtual void | destroyed () |
Protected Attributes | |
| String | m_id |
| ClientLogic * | m_logic |
| String | m_name |
| unsigned int | m_startTime |
An UI time updater.
Class used to update UI durations. The string keeps the object's id. This object can be used to keep additional data associated with a client channel
| DurationUpdate | ( | ClientLogic * | logic, |
| bool | owner, | ||
| const char * | id, | ||
| const char * | name, | ||
| unsigned int | start = Time::secNow() |
||
| ) | [inline] |
Constructor. Add itself to logic's list
| logic | The client logic used to update this duration object |
| owner | True if the logic is owning this object |
| id | Object id |
| name | Object name (widget or column name) |
| start | Start time in seconds |
| virtual ~DurationUpdate | ( | ) | [virtual] |
Destructor
| virtual unsigned int buildTimeParam | ( | NamedList & | dest, |
| unsigned int | secNow, | ||
| bool | force = false |
||
| ) | [virtual] |
Build a duration string representation and add the parameter to a list
| dest | Destination list |
| secNow | Current time in seconds |
| force | Set to true to add the parameter even if duration is 0 |
| static unsigned int buildTimeParam | ( | NamedList & | dest, |
| const char * | param, | ||
| unsigned int | secStart, | ||
| unsigned int | secNow, | ||
| bool | force = false |
||
| ) | [static] |
Build a duration string representation and add the parameter to a list
| dest | Destination list |
| param | Parameter to add |
| secStart | Starting time in seconds |
| secNow | Current time in seconds |
| force | Set to true to add the parameter even if duration is 0 |
| virtual unsigned int buildTimeString | ( | String & | dest, |
| unsigned int | secNow, | ||
| bool | force = false |
||
| ) | [virtual] |
Build a duration string representation hh:mm:ss. The hours are added only if non 0
| dest | Destination string |
| secNow | Current time in seconds |
| force | Set to true to build even if duration is 0 |
| static unsigned int buildTimeString | ( | String & | dest, |
| unsigned int | secStart, | ||
| unsigned int | secNow, | ||
| bool | force = false |
||
| ) | [static] |
Build a duration string representation hh:mm:ss. The hours are added only if non 0
| dest | Destination string |
| secStart | Starting time in seconds |
| secNow | Current time in seconds |
| force | Set to true to build even if duration is 0 |
| virtual void destroyed | ( | ) | [protected, virtual] |
Release memory. Remove from updater
Reimplemented from RefObject.
| void setLogic | ( | ClientLogic * | logic = 0, |
| bool | owner = true |
||
| ) |
Set the logic used to update this duration object. Remove from the old one
| logic | The client logic used to update this duration object |
| owner | True if the logic is owning this object |
| virtual unsigned int update | ( | unsigned int | secNow, |
| const String * | table = 0, |
||
| Window * | wnd = 0, |
||
| Window * | skip = 0, |
||
| bool | force = false |
||
| ) | [virtual] |
Update UI if duration is non 0
| secNow | Current time in seconds |
| table | The table to update. Set to 0 to update text widgets |
| wnd | Optional window to update |
| skip | Optional window to skip if wnd is 0 |
| force | Set to true to update even if duration is 0 |
1.7.6.1