|
MythTV
0.26-pre
|
A simple text clock widget. More...
#include <mythuiclock.h>
Public Member Functions | |
| MythUIClock (MythUIType *parent, const QString &name) | |
| ~MythUIClock () | |
| virtual void | Pulse (void) |
| Looks up the time and sets the clock if the current time is greater than or equal to m_nextUpdate. | |
| virtual void | SetText (const QString &text) |
| This sets the text, unless the string is blank, in that case the time is looked up and set as the text instead. | |
Protected Member Functions | |
| virtual bool | ParseElement (const QString &filename, QDomElement &element, bool showWarnings) |
| virtual void | CopyFrom (MythUIType *base) |
| virtual void | CreateCopy (MythUIType *parent) |
| QString | GetTimeText (void) |
| This creates a string based on m_Time, and sets m_nextUpdate to the second following m_Time. | |
Protected Attributes | |
| QDateTime | m_Time |
| QDateTime | m_nextUpdate |
| QString | m_Format |
| QString | m_TimeFormat |
| QString | m_DateFormat |
| QString | m_ShortDateFormat |
| bool | m_Flash |
A simple text clock widget.
Updates once a second and inherits from MythUIText, so it supports all the text styles and decorations offered by that class.
Basic manipulation of the clock format is supported using any of the following in the "format" element of the theme: TIME% - The time, in a format defined in the locale settings DATE% - Long date format, as defined in the locale settings SHORTDATE% - Short date format, as defined in the locale settings
Definition at line 25 of file mythuiclock.h.
| MythUIClock::MythUIClock | ( | MythUIType * | parent, |
| const QString & | name | ||
| ) |
Definition at line 15 of file mythuiclock.cpp.
Referenced by CreateCopy().
Definition at line 27 of file mythuiclock.cpp.
| void MythUIClock::Pulse | ( | void | ) | [virtual] |
Looks up the time and sets the clock if the current time is greater than or equal to m_nextUpdate.
Reimplemented from MythUIText.
Definition at line 36 of file mythuiclock.cpp.
| void MythUIClock::SetText | ( | const QString & | text | ) | [virtual] |
This sets the text, unless the string is blank, in that case the time is looked up and set as the text instead.
Reimplemented from MythUIText.
Definition at line 67 of file mythuiclock.cpp.
Referenced by Pulse().
| bool MythUIClock::ParseElement | ( | const QString & | filename, |
| QDomElement & | element, | ||
| bool | showWarnings | ||
| ) | [protected, virtual] |
Parse the xml definition of this widget setting the state of the object accordingly.
Reimplemented from MythUIText.
Definition at line 83 of file mythuiclock.cpp.
| void MythUIClock::CopyFrom | ( | MythUIType * | base | ) | [protected, virtual] |
Copy this widgets state from another.
Reimplemented from MythUIText.
Definition at line 110 of file mythuiclock.cpp.
Referenced by CreateCopy().
| void MythUIClock::CreateCopy | ( | MythUIType * | parent | ) | [protected, virtual] |
Copy the state of this widget to the one given, it must be of the same type.
Reimplemented from MythUIText.
Definition at line 136 of file mythuiclock.cpp.
| QString MythUIClock::GetTimeText | ( | void | ) | [protected] |
This creates a string based on m_Time, and sets m_nextUpdate to the second following m_Time.
It's important to note that this function do not look up the wall clock time, but depends on m_Time being set ahead of time.
Definition at line 53 of file mythuiclock.cpp.
QDateTime MythUIClock::m_Time [protected] |
Definition at line 42 of file mythuiclock.h.
Referenced by CopyFrom(), GetTimeText(), Pulse(), and SetText().
QDateTime MythUIClock::m_nextUpdate [protected] |
Definition at line 43 of file mythuiclock.h.
Referenced by CopyFrom(), GetTimeText(), and Pulse().
QString MythUIClock::m_Format [protected] |
Definition at line 45 of file mythuiclock.h.
Referenced by CopyFrom(), GetTimeText(), MythUIClock(), and ParseElement().
QString MythUIClock::m_TimeFormat [protected] |
Definition at line 46 of file mythuiclock.h.
Referenced by CopyFrom(), MythUIClock(), and ParseElement().
QString MythUIClock::m_DateFormat [protected] |
Definition at line 47 of file mythuiclock.h.
Referenced by CopyFrom(), MythUIClock(), and ParseElement().
QString MythUIClock::m_ShortDateFormat [protected] |
Definition at line 48 of file mythuiclock.h.
Referenced by CopyFrom(), MythUIClock(), and ParseElement().
bool MythUIClock::m_Flash [protected] |
Definition at line 50 of file mythuiclock.h.
Referenced by CopyFrom(), and MythUIClock().
1.7.6.1