CTestMenu: add tests for form objects

This commit is contained in:
2012-09-09 00:31:59 +02:00
parent bc764b4653
commit 7105518423
2 changed files with 20 additions and 3 deletions

View File

@@ -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)

View File

@@ -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();