CBEChannelWidget: rework details line handling

Origin commit data
------------------
Branch: ni/coolstream
Commit: 2aa30d7303
Author: Thilo Graf <dbt@novatux.de>
Date: 2012-07-19 (Thu, 19 Jul 2012)

Origin message was:
------------------
*CBEChannelWidget: rework details line handling

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
2012-07-19 15:43:10 +02:00
committed by Michael Liebmann
parent 5436bd2415
commit ee83748846
2 changed files with 21 additions and 10 deletions

View File

@@ -38,7 +38,7 @@
#include <gui/widget/buttons.h>
#include <gui/widget/icons.h>
#include <gui/widget/messagebox.h>
#include <gui/widget/components.h>
#include "bouqueteditor_channels.h"
#include <global.h>
@@ -87,6 +87,13 @@ CBEChannelWidget::CBEChannelWidget(const std::string & Caption, unsigned int Bou
caption = Caption;
bouquet = Bouquet;
mode = CZapitClient::MODE_TV;
dline = NULL;
Channels = NULL;
}
CBEChannelWidget::~CBEChannelWidget()
{
delete dline;
}
void CBEChannelWidget::paintItem(int pos)
@@ -208,15 +215,17 @@ void CBEChannelWidget::paintItem2DetailsLine (int pos, int /*ch_index*/)
int ypos2a = ypos2 + (info_height/2)-2;
fb_pixel_t col1 = COL_MENUCONTENT_PLUS_6;
// Clear
frameBuffer->paintBackgroundBoxRel(xpos,y, ConnectLineBox_Width, height+info_height);
// clear details line
if (dline != NULL)
dline->hide();
// paint Line if detail info (and not valid list pos)
if (pos >= 0)
{
//details line
CComponentsDetailLine dline(xpos, ypos1a, ypos2a, fheight/2+1, info_height-RADIUS_LARGE*2);
dline.paint();
if (dline == NULL)
dline = new CComponentsDetailLine(xpos, ypos1a, ypos2a, fheight/2+1, info_height-RADIUS_LARGE*2);
dline->setYPos(ypos1a);
dline->paint();
//info box frame
frameBuffer->paintBoxFrame(x, ypos2, width, info_height, 2, col1, RADIUS_LARGE);
@@ -225,7 +234,8 @@ void CBEChannelWidget::paintItem2DetailsLine (int pos, int /*ch_index*/)
void CBEChannelWidget::clearItem2DetailsLine ()
{
paintItem2DetailsLine (-1, 0);
if (dline != NULL)
dline->hide();
}
void CBEChannelWidget::hide()

View File

@@ -35,7 +35,7 @@
#include <driver/framebuffer.h>
#include <gui/widget/menue.h>
#include <gui/widget/components.h>
#include <zapit/client/zapitclient.h>
#include <string>
@@ -46,9 +46,9 @@ class CBEChannelWidget : public CMenuTarget
{
private:
CFrameBuffer *frameBuffer;
CComponentsDetailLine *dline;
enum state_
{
beDefault,
@@ -100,6 +100,7 @@ class CBEChannelWidget : public CMenuTarget
public:
CBEChannelWidget( const std::string & Caption, unsigned int Bouquet);
~CBEChannelWidget();
//CZapitClient::BouquetChannelList Channels;
ZapitChannelList * Channels;