From e7b1618daba9c511cb48107130ac75c6faa7dbaf Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Wed, 9 Oct 2013 20:13:11 +0200 Subject: [PATCH] CComponentsFrmClock: prepare members for usage as virtual members Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/72d2639a73d4e52fed70e6eb1239bdc2f6f07fb5 Author: Thilo Graf Date: 2013-10-09 (Wed, 09 Oct 2013) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/components/cc_frm_clock.cpp | 5 +++++ src/gui/components/cc_frm_clock.h | 27 ++++++++++++++------------- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/src/gui/components/cc_frm_clock.cpp b/src/gui/components/cc_frm_clock.cpp index 0a74fe30e..efc190194 100644 --- a/src/gui/components/cc_frm_clock.cpp +++ b/src/gui/components/cc_frm_clock.cpp @@ -38,6 +38,11 @@ using namespace std; +CComponentsFrmClock::CComponentsFrmClock() +{ + initVarClock(); +} + CComponentsFrmClock::CComponentsFrmClock( const int x_pos, const int y_pos, const int w, const int h, const char* format_str, bool activ, bool has_shadow, fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow) diff --git a/src/gui/components/cc_frm_clock.h b/src/gui/components/cc_frm_clock.h index ebc0530d3..1ca1a8fa5 100644 --- a/src/gui/components/cc_frm_clock.h +++ b/src/gui/components/cc_frm_clock.h @@ -81,41 +81,42 @@ class CComponentsFrmClock : public CComponentsForm void initSegmentAlign(int* segment_width, int* segment_height); public: + CComponentsFrmClock(); CComponentsFrmClock( const int x_pos, const int y_pos, const int w, const int h, const char* format_str = "%H:%M", bool activ=true, bool has_shadow = CC_SHADOW_OFF, fb_pixel_t color_frame = COL_LIGHT_GRAY, fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_MENUCONTENTDARK_PLUS_0); - ~CComponentsFrmClock(); + virtual ~CComponentsFrmClock(); ///set font type for segments - void setClockFont(Font *font){cl_font = font;}; + virtual void setClockFont(Font *font){cl_font = font;}; ///set text color - void setTextColor(fb_pixel_t color_text){ cl_col_text = color_text;}; + virtual void setTextColor(fb_pixel_t color_text){ cl_col_text = color_text;}; ///set alignment of timestring, possible modes see align types in cc_types.h - void setClockAlignment(int align_type){cl_align = align_type;}; + virtual void setClockAlignment(int align_type){cl_align = align_type;}; ///use string expession: "%H:%M" = 12:22, "%H:%M:%S" = 12:22:12 - void setClockFormat(const char* format_str){cl_format_str = format_str;}; + virtual void setClockFormat(const char* format_str){cl_format_str = format_str;}; ///start ticking clock thread, returns true on success, if false causes log output - bool startThread(); + virtual bool startThread(); ///stop ticking clock thread, returns true on success, if false causes log output - bool stopThread(); + virtual bool stopThread(); - bool Start(); - bool Stop(); + virtual bool Start(); + virtual bool Stop(); ///returns true, if clock is running in thread - bool isClockRun() const {return cl_thread == 0 ? false:true;}; + virtual bool isClockRun() const {return cl_thread == 0 ? false:true;}; ///set refresh interval in seconds, default value=1 (=1 sec) - void setClockIntervall(const int& seconds){cl_interval = seconds;}; + virtual void setClockIntervall(const int& seconds){cl_interval = seconds;}; ///show clock on screen - void paint(bool do_save_bg = CC_SAVE_SCREEN_YES); + virtual void paint(bool do_save_bg = CC_SAVE_SCREEN_YES); ///reinitialize clock contents - void refresh() { initCCLockItems(); } + virtual void refresh() { initCCLockItems(); } }; #endif