src/gui/epgview.h: add class to create star bars

Origin commit data
------------------
Branch: ni/coolstream
Commit: 3c477468ea
Author: Thilo Graf <dbt@novatux.de>
Date: 2018-04-29 (Sun, 29 Apr 2018)


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

------------------
This commit was generated by Migit
This commit is contained in:
2018-04-29 03:13:08 +02:00
committed by vanhofen
parent 88ffa984b5
commit 733ea20702

View File

@@ -39,10 +39,12 @@
#include <driver/movieinfo.h>
#include "widget/menue.h"
#include "widget/navibar.h"
#include "gui/components/cc.h"
#include <vector>
#include <string>
class CFrameBuffer;
class CEPGRateBanner;
class CEpgData
{
private:
@@ -126,6 +128,39 @@ class CEPGDataHandler : public CMenuTarget
};
class CEPGRateBanner : public CComponentsIconForm
{
private:
void init(const std::string& quote_icon, const std::string& quote_icon_bg, const size_t& quote, const size_t& quote_max, const std::string& provider_logo)
{
cc_item_type.name = "epg_rate_banner";
append_x_offset = 5;
paint_bg = false;
addIcons(provider_logo);
addIcons(quote_icon, quote);
addIcons(quote_icon_bg, quote_max - quote);
}
public:
CEPGRateBanner( const int &x_pos,
const int &y_pos,
const size_t& quote,
const size_t& quote_max = 10,
const std::string& provider_logo = "",
const std::string& quote_icon = NEUTRINO_ICON_STAR_ON,
const std::string& quote_icon_bg = NEUTRINO_ICON_STAR_OFF,
int shadow_mode = CC_SHADOW_OFF,
fb_pixel_t color_frame = COL_FRAME_PLUS_0,
fb_pixel_t color_body = COL_MENUHEAD_PLUS_0,
fb_pixel_t color_shadow = COL_SHADOW_PLUS_0,
CComponentsForm *parent = NULL)
:CComponentsIconForm(x_pos, y_pos, 0, 0, std::vector<std::string>(), parent, shadow_mode, color_frame, color_body, color_shadow)
{
init(quote_icon, quote_icon_bg, quote, quote_max, provider_logo);
};
};
#endif