diff options
Diffstat (limited to 'src/client/infowidget.h')
-rw-r--r-- | src/client/infowidget.h | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/src/client/infowidget.h b/src/client/infowidget.h index 48d1c9a..e773ef4 100644 --- a/src/client/infowidget.h +++ b/src/client/infowidget.h @@ -52,12 +52,37 @@ private: class KeyInfoWidget : public ui::Widget { public: - // default constructor + /// default constructor KeyInfoWidget(ui::Widget *parent = 0); protected: - // draw keypress events + /// draw keypress events + virtual void draw(); +}; + +/// a widget to show keypress events +class ClockInfoWidget : public ui::Widget +{ +public: + /// clock mode + enum Mode {ClockOff=0, Clock24Hours=1, Clock12Hours=2}; + + /// default constructor + ClockInfoWidget(ui::Widget *parent = 0); + + inline void set_mode(const Mode mode) { + clock_mode = mode; + } + + inline const Mode mode() const { + return clock_mode; + } + +protected: + /// draw the current time virtual void draw(); + + Mode clock_mode; }; } |