PDA

View Full Version : problem in qtdemo[solved]



wagmare
21st July 2010, 14:11
hi friends,

i just modified the qtdemo source by just introducing an new child node in xml file ...
ex:
<example filename="affine" name="Affine Transformations" >
<subexample name="xxxx" />
</example>

i am able to create the sub menu and the buttons are showing when i press Affine Transformation button ... but when i press back button the MENU1 buttons are not reproducing ....

i modified the code .

void MenuManager::itemSelected(int userCode, const QString &menuName)
{
case ROOT:
//out:
this->score->queueMovie(this->currentMenu + " -out", Score::FROM_START, Score::LOCK_ITEMS);
this->score->queueMovie(this->currentMenuButtons + " -out", Score::FROM_START, Score::LOCK_ITEMS);
this->score->queueMovie(this->currentInfo + " -out");
this->score->queueMovie("back -out", Score::ONLY_IF_VISIBLE);
// book-keeping:
this->currentMenuCode = ROOT;
this->currentMenu = menuName + " -menu1";
this->currentMenuButtons = menuName + " -buttons";
this->currentInfo = menuName + " -info";
// in:
this->score->queueMovie("upndown -shake");
this->score->queueMovie(this->currentMenu, Score::FROM_START, Score::UNLOCK_ITEMS);
this->score->queueMovie(this->currentMenuButtons, Score::FROM_START, Score::UNLOCK_ITEMS);
this->score->queueMovie(this->currentInfo);
break;
case MENU1:
// out:
this->score->queueMovie(this->currentMenu + " -out", Score::FROM_START, Score::LOCK_ITEMS);
this->score->queueMovie(this->currentMenuButtons + " -out", Score::FROM_START, Score::LOCK_ITEMS);
this->score->queueMovie(this->currentInfo + " -out");
// this->score->queueMovie("back -out", Score::ONLY_IF_VISIBLE);
// book-keeping:
this->currentMenuCode = MENU1;
this->currentCategory = menuName;
this->currentMenu = menuName + " -menu1";
this->currentMenuButtons = menuName + " -buttons";
this->currentInfo = menuName + " -info";
// in:
this->score->queueMovie("upndown -shake");
this->score->queueMovie("back -in");
this->score->queueMovie(this->currentMenu, Score::FROM_START, Score::UNLOCK_ITEMS);
this->score->queueMovie(this->currentMenuButtons, Score::FROM_START, Score::UNLOCK_ITEMS);
this->score->queueMovie(this->currentInfo);
break;

case BACK:{
if(this->currentMenuCode == MENU1)
itemSelected(ROOT, rootMenuName);
else{
itemSelected(MENU1, this->currentInfo);
}
break;


back button call from TextButton object is enabled ....
where in case of ROOT back button is showing the root text buttons but when i press back button in MENU2 the buttons running out works fine but the MENU1 buttons not rendering ....




any one who works on this qtdemo ... please help me ...

thanks in advance ....