MythTV master
mythuiclock.h
Go to the documentation of this file.
1#ifndef MYTHUI_CLOCK_H_
2#define MYTHUI_CLOCK_H_
3
4#include <QString>
5#include <QDateTime>
6
7#include "mythuitype.h"
8#include "mythuitext.h"
9
26{
27 public:
28 MythUIClock(MythUIType *parent, const QString &name);
29 ~MythUIClock() override;
30
31 void Pulse(void) override; // MythUIText
32 void SetText(const QString &text) override; // MythUIText
33
34 protected:
35 bool ParseElement(const QString &filename, QDomElement &element,
36 bool showWarnings) override; // MythUIText
37 void CopyFrom(MythUIType *base) override; // MythUIText
38 void CreateCopy(MythUIType *parent) override; // MythUIText
39
40 QString GetTimeText(void);
41
42 QDateTime m_time;
43 QDateTime m_nextUpdate;
44
45 QString m_format;
46 QString m_timeFormat {"h:mm ap"};
47 QString m_dateFormat {"ddd d MMM yyyy"};
48 QString m_shortDateFormat {"ddd M/d"};
49
50 bool m_flash {false};
51};
52
53#endif
A simple text clock widget.
Definition: mythuiclock.h:26
QString m_format
Definition: mythuiclock.h:45
QDateTime m_time
Definition: mythuiclock.h:42
QDateTime m_nextUpdate
Definition: mythuiclock.h:43
All purpose text widget, displays a text string.
Definition: mythuitext.h:29
bool ParseElement(const QString &filename, QDomElement &element, bool showWarnings) override
Parse the xml definition of this widget setting the state of the object accordingly.
void CopyFrom(MythUIType *base) override
Copy this widgets state from another.
void CreateCopy(MythUIType *parent) override
Copy the state of this widget to the one given, it must be of the same type.
void Pulse(void) override
Pulse is called 70 times a second to trigger a single frame of an animation.
virtual void SetText(const QString &text)
Definition: mythuitext.cpp:115
The base class on which all widgets and screens are based.
Definition: mythuitype.h:86
#define MUI_PUBLIC
Definition: mythuiexp.h:9