mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
CTestMenu: add sample code for channel logo item
This commit is contained in:
@@ -64,7 +64,7 @@ CTestMenu::CTestMenu()
|
|||||||
width = w_max (50, 10);
|
width = w_max (50, 10);
|
||||||
circle = NULL;
|
circle = NULL;
|
||||||
sq = NULL;
|
sq = NULL;
|
||||||
pic= NULL;
|
pic = chnl_pic = NULL;
|
||||||
form = NULL;
|
form = NULL;
|
||||||
txt = NULL;
|
txt = NULL;
|
||||||
header = NULL;
|
header = NULL;
|
||||||
@@ -89,6 +89,7 @@ CTestMenu::~CTestMenu()
|
|||||||
delete button;
|
delete button;
|
||||||
delete clock;
|
delete clock;
|
||||||
delete clock_r;
|
delete clock_r;
|
||||||
|
delete chnl_pic;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int test_pos[4] = { 130, 192, 282, 360 };
|
static int test_pos[4] = { 130, 192, 282, 360 };
|
||||||
@@ -402,6 +403,16 @@ int CTestMenu::exec(CMenuTarget* parent, const std::string &actionKey)
|
|||||||
pic->hide();
|
pic->hide();
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
else if (actionKey == "channellogo"){
|
||||||
|
if (chnl_pic == NULL)
|
||||||
|
chnl_pic = new CComponentsChannelLogo(100, 100, 200, 200, 0, "ProSieben");
|
||||||
|
|
||||||
|
if (!chnl_pic->isPainted() && !chnl_pic->isPicPainted())
|
||||||
|
chnl_pic->paint();
|
||||||
|
else
|
||||||
|
chnl_pic->hide();
|
||||||
|
return res;
|
||||||
|
}
|
||||||
else if (actionKey == "form"){
|
else if (actionKey == "form"){
|
||||||
if (form == NULL)
|
if (form == NULL)
|
||||||
form = new CComponentsForm();
|
form = new CComponentsForm();
|
||||||
@@ -662,6 +673,7 @@ void CTestMenu::showCCTests(CMenuWidget *widget)
|
|||||||
widget->addItem(new CMenuForwarderNonLocalized("Circle", true, NULL, this, "circle"));
|
widget->addItem(new CMenuForwarderNonLocalized("Circle", true, NULL, this, "circle"));
|
||||||
widget->addItem(new CMenuForwarderNonLocalized("Square", true, NULL, this, "square"));
|
widget->addItem(new CMenuForwarderNonLocalized("Square", true, NULL, this, "square"));
|
||||||
widget->addItem(new CMenuForwarderNonLocalized("Picture", true, NULL, this, "picture"));
|
widget->addItem(new CMenuForwarderNonLocalized("Picture", true, NULL, this, "picture"));
|
||||||
|
widget->addItem(new CMenuForwarderNonLocalized("Channel-Logo", true, NULL, this, "channellogo"));
|
||||||
widget->addItem(new CMenuForwarderNonLocalized("Form", true, NULL, this, "form"));
|
widget->addItem(new CMenuForwarderNonLocalized("Form", true, NULL, this, "form"));
|
||||||
widget->addItem(new CMenuForwarderNonLocalized("Text", true, NULL, this, "text"));
|
widget->addItem(new CMenuForwarderNonLocalized("Text", true, NULL, this, "text"));
|
||||||
widget->addItem(new CMenuForwarderNonLocalized("Header", true, NULL, this, "header"));
|
widget->addItem(new CMenuForwarderNonLocalized("Header", true, NULL, this, "header"));
|
||||||
|
@@ -54,6 +54,7 @@ class CTestMenu : public CMenuTarget
|
|||||||
CComponentsWindow *window;
|
CComponentsWindow *window;
|
||||||
CComponentsButton *button;
|
CComponentsButton *button;
|
||||||
CComponentsFrmClock *clock ,*clock_r;
|
CComponentsFrmClock *clock ,*clock_r;
|
||||||
|
CComponentsChannelLogo* chnl_pic;
|
||||||
int width, selected;
|
int width, selected;
|
||||||
|
|
||||||
int showTestMenu();
|
int showTestMenu();
|
||||||
|
Reference in New Issue
Block a user