mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
CTestMenu: add tests for form objects
This commit is contained in:
@@ -66,6 +66,7 @@ CTestMenu::CTestMenu()
|
|||||||
sq = NULL;
|
sq = NULL;
|
||||||
pic= NULL;
|
pic= NULL;
|
||||||
pip = NULL;
|
pip = NULL;
|
||||||
|
form = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
CTestMenu::~CTestMenu()
|
CTestMenu::~CTestMenu()
|
||||||
@@ -74,6 +75,7 @@ CTestMenu::~CTestMenu()
|
|||||||
delete circle;
|
delete circle;
|
||||||
delete pic;
|
delete pic;
|
||||||
delete pip;
|
delete pip;
|
||||||
|
delete form;
|
||||||
}
|
}
|
||||||
|
|
||||||
int CTestMenu::exec(CMenuTarget* parent, const std::string &actionKey)
|
int CTestMenu::exec(CMenuTarget* parent, const std::string &actionKey)
|
||||||
@@ -360,6 +362,19 @@ int CTestMenu::exec(CMenuTarget* parent, const std::string &actionKey)
|
|||||||
pip->hide();
|
pip->hide();
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
else if (actionKey == "form"){
|
||||||
|
if (form == NULL)
|
||||||
|
form = new CComponentsForm();
|
||||||
|
form->setDimensionsAll(100, 100, 250, 300);
|
||||||
|
form->setCaption(NONEXISTANT_LOCALE);
|
||||||
|
form->setIcon(NEUTRINO_ICON_INFO);
|
||||||
|
|
||||||
|
if (form->isPainted())
|
||||||
|
form->hide();
|
||||||
|
else
|
||||||
|
form->paint();
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
showTestMenu();
|
showTestMenu();
|
||||||
|
|
||||||
@@ -403,6 +418,7 @@ void CTestMenu::showCCTests(CMenuWidget *widget)
|
|||||||
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("PiP", true, NULL, this, "pip"));
|
widget->addItem(new CMenuForwarderNonLocalized("PiP", true, NULL, this, "pip"));
|
||||||
|
widget->addItem(new CMenuForwarderNonLocalized("Form", true, NULL, this, "form"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CTestMenu::showHWTests(CMenuWidget *widget)
|
void CTestMenu::showHWTests(CMenuWidget *widget)
|
||||||
|
@@ -43,6 +43,7 @@ class CTestMenu : public CMenuTarget
|
|||||||
CComponentsShapeSquare* sq;
|
CComponentsShapeSquare* sq;
|
||||||
CComponentsPicture* pic;
|
CComponentsPicture* pic;
|
||||||
CComponentsPIP* pip;
|
CComponentsPIP* pip;
|
||||||
|
CComponentsForm *form;
|
||||||
int width, selected;
|
int width, selected;
|
||||||
|
|
||||||
void showTestMenu();
|
void showTestMenu();
|
||||||
|
Reference in New Issue
Block a user