mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 07:51:19 +02:00
- epgplus: add detailsline
This commit is contained in:
@@ -40,7 +40,6 @@
|
|||||||
#include <sectionsdclient/sectionsdclient.h>
|
#include <sectionsdclient/sectionsdclient.h>
|
||||||
#include <timerdclient/timerdclient.h>
|
#include <timerdclient/timerdclient.h>
|
||||||
|
|
||||||
#include <gui/components/cc.h>
|
|
||||||
#include <gui/widget/icons.h>
|
#include <gui/widget/icons.h>
|
||||||
#include <gui/widget/buttons.h>
|
#include <gui/widget/buttons.h>
|
||||||
#include <gui/widget/hintbox.h>
|
#include <gui/widget/hintbox.h>
|
||||||
@@ -345,6 +344,8 @@ EpgPlus::ChannelEntry::ChannelEntry(const CZapitChannel * pchannel, int pindex,
|
|||||||
this->x = px;
|
this->x = px;
|
||||||
this->y = py;
|
this->y = py;
|
||||||
this->width = pwidth;
|
this->width = pwidth;
|
||||||
|
|
||||||
|
this->detailsLine = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EpgPlus::ChannelEntry::init()
|
void EpgPlus::ChannelEntry::init()
|
||||||
@@ -362,6 +363,12 @@ EpgPlus::ChannelEntry::~ChannelEntry()
|
|||||||
delete *It;
|
delete *It;
|
||||||
}
|
}
|
||||||
this->channelEventEntries.clear();
|
this->channelEventEntries.clear();
|
||||||
|
|
||||||
|
if (this->detailsLine)
|
||||||
|
{
|
||||||
|
delete this->detailsLine;
|
||||||
|
this->detailsLine = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EpgPlus::ChannelEntry::paint(bool isSelected, time_t _selectedTime)
|
void EpgPlus::ChannelEntry::paint(bool isSelected, time_t _selectedTime)
|
||||||
@@ -418,6 +425,28 @@ void EpgPlus::ChannelEntry::paint(bool isSelected, time_t _selectedTime)
|
|||||||
|
|
||||||
toggleColor = !toggleColor;
|
toggleColor = !toggleColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// kill detailsline
|
||||||
|
if (detailsLine)
|
||||||
|
{
|
||||||
|
detailsLine->kill();
|
||||||
|
delete detailsLine;
|
||||||
|
detailsLine = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
// paint detailsline
|
||||||
|
if (isSelected)
|
||||||
|
{
|
||||||
|
int xPos = this->x - DETAILSLINE_WIDTH;
|
||||||
|
int yPosTop = this->y + this->font->getHeight()/2;
|
||||||
|
int yPosBottom = this->footer->y + this->footer->getUsedHeight()/2;
|
||||||
|
|
||||||
|
if (detailsLine == NULL)
|
||||||
|
{
|
||||||
|
detailsLine = new CComponentsDetailsLine(xPos, yPosTop, yPosBottom, this->font->getHeight()/2, this->footer->getUsedHeight() - RADIUS_LARGE*2);
|
||||||
|
}
|
||||||
|
detailsLine->paint(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int EpgPlus::ChannelEntry::getUsedHeight()
|
int EpgPlus::ChannelEntry::getUsedHeight()
|
||||||
|
@@ -25,6 +25,7 @@
|
|||||||
#ifndef __epgplus__
|
#ifndef __epgplus__
|
||||||
#define __epgplus__
|
#define __epgplus__
|
||||||
|
|
||||||
|
#include <gui/components/cc.h>
|
||||||
#include "widget/menue.h"
|
#include "widget/menue.h"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
@@ -238,6 +239,7 @@ class EpgPlus
|
|||||||
static Font* font;
|
static Font* font;
|
||||||
|
|
||||||
TCChannelEventEntries channelEventEntries;
|
TCChannelEventEntries channelEventEntries;
|
||||||
|
CComponentsDetailsLine *detailsLine;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef std::vector<ChannelEntry*> TChannelEntries;
|
typedef std::vector<ChannelEntry*> TChannelEntries;
|
||||||
|
Reference in New Issue
Block a user