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