CInfoClock: rework infocklock

Origin commit data
------------------
Commit: b8b61684df
Author: Thilo Graf <dbt@novatux.de>
Date: 2013-11-12 (Tue, 12 Nov 2013)
This commit is contained in:
2013-11-12 12:19:41 +01:00
committed by Michael Liebmann
parent d30ce8b0e5
commit a2967e2488
6 changed files with 92 additions and 105 deletions

View File

@@ -1,39 +1,51 @@
#ifndef __infoclock__
#define __infoclock__
/*
Based up Neutrino-GUI - Tuxbox-Project
Copyright (C) 2001 by Steffen Hehn 'McClean'
Info Clock Window
based up CComponentsFrmClock
Copyright (C) 2013, Thilo Graf 'dbt'
Copyright (C) 2013, Michael Liebmann 'micha-bbg'
License: GPL
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to the
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef __INFOCLOCK__
#define __INFOCLOCK__
#include <driver/framebuffer.h>
#include <driver/fontrenderer.h>
#include <system/settings.h>
#include <gui/color.h>
#include <string>
#include <gui/components/cc.h>
class CInfoClock
class CInfoClock : public CComponentsFrmClock
{
private:
CFrameBuffer * frameBuffer;
protected:
void initVarInfoClock();
private:
void Init();
public:
CInfoClock();
// ~CInfoClock(); // inherited from CComponentsFrmClock
static CInfoClock* getInstance();
pthread_t thrTimer;
void paintTime( bool show_dot);
int time_offset, digit_offset, digit_h;
int x, y, clock_x;
void Init();
static void CleanUpProc(void* arg);
static void* TimerProc(void *arg);
public:
CInfoClock();
~CInfoClock();
static CInfoClock* getInstance();
void StartClock();
void StopClock();
void ClearDisplay();
int time_width, time_height;
bool StartClock();
bool StopClock();
void ClearDisplay();
};
#endif