void E002_C030_P130::onTouchedNavigationButtonAtInfo() { E002_Base_Reward::onTouchedNavigationButtonAtInfo(); /* If you use two page for image guide, must use this coding text. std::vector<E002_Base_ImageGuide_Item*> *items = new std::vector<E002_Base_ImageGuide_Item*>(); items->push_back(new E002_Base_ImageGuide_Item("e002_c030_p130_guide.jpg", CJPsdParser::getPsdPosition("e002_common_img_guide_hand@00", m_psdDictionary), CJPsdParser::getPsdPosition("e002_common_img_guide_hand@01", m_psdDictionary) )); items->push_back(new E002_Base_ImageGuide_Item("e002_c030_p130_guide.jpg", CJPsdParser::getPsdPosition("e002_common_img_guide_hand@00", m_psdDictionary), CJPsdParser::getPsdPosition("e002_common_img_guide_hand@01", m_psdDictionary) )); showGuide(items); */ // One page guide showGuide(new E002_Base_ImageGuide_Item("e002_c030_p130_guide.jpg", CJPsdParser::getPsdPosition("e002_common_img_guide_hand@00", m_psdDictionary), CJPsdParser::getPsdPosition("e002_common_img_guide_hand@01", m_psdDictionary) )); }
void E002_C030_P130::OnLastFrame(CJAnimation* pAnimation) { E002_Base_Reward::OnLastFrame(pAnimation); if(pAnimation->getName() == "e002_c030_p130_flash_reward_mk_action") { if (getUserDefaultFirstGuide(eGuidePageP130) == false) { mShowFirstGuide = true; setUserDefaultFirstGuide(eGuidePageP130); showGuide(new E002_Base_ImageGuide_Item("e002_c030_p130_guide.jpg", CJPsdParser::getPsdPosition("e002_common_img_guide_hand@00", m_psdDictionary), CJPsdParser::getPsdPosition("e002_common_img_guide_hand@01", m_psdDictionary) )); } else { CJUtils::performSelector(this, callfunc_selector(E002_C030_P130::setQuestions),0.0); } } else if(pAnimation->getName() == "e002_c030_p130_flash_reward_action") { CJUtils::performSelector(this, callfunc_selector(E002_C030_P130::showCompletePopup), 1.0f); } }
void E002_C010_P230::onTouchedNavigationButtonAtInfo() { E002_Base_Reward::onTouchedNavigationButtonAtInfo(); showGuide(new E002_Base_ImageGuide_Item("e002_c010_p230_guide.jpg", CJPsdParser::getPsdPosition("e002_common_img_guide_hand", m_psdDictionary), CJPsdParser::getPsdPosition("e002_common_img_guide_hand", m_psdDictionary) )); }
bool ProgFinder::keyPressEvent(QKeyEvent *event) { if (!m_allowKeypress) return true; m_allowKeypress = false; if (GetFocusWidget() && GetFocusWidget()->keyPressEvent(event)) { m_allowKeypress = true; return true; } bool handled = false; QStringList actions; handled = GetMythMainWindow()->TranslateKeyPress("TV Frontend", event, actions); for (int i = 0; i < actions.size() && !handled; ++i) { QString action = actions[i]; handled = true; if (action == "EDIT") edit(); else if (action == "CUSTOMEDIT") customEdit(); else if (action == "UPCOMING") upcoming(); else if (action == "DETAILS" || action == "INFO") details(); else if (action == "TOGGLERECORD") quickRecord(); else if (action == "GUIDE" || action == "4") showGuide(); else if (action == "ESCAPE") { // don't fade the screen if we are returning to the player if (m_player && m_allowEPG) GetScreenStack()->PopScreen(this, false); else GetScreenStack()->PopScreen(this, true); } else handled = false; } if (!handled && MythScreenType::keyPressEvent(event)) handled = true; m_allowKeypress = true; return handled; }
void ProgFinder::customEvent(QEvent *event) { if ((MythEvent::Type)(event->type()) == MythEvent::MythEventMessage) { MythEvent *me = (MythEvent *)event; QString message = me->Message(); if (message == "SCHEDULE_CHANGE") { if (GetFocusWidget() == m_timesList) { ProgramInfo *curPick = m_showData[m_timesList->GetCurrentPos()]; if (curPick) selectShowData(curPick->GetTitle(), m_timesList->GetCurrentPos()); } } } else if (event->type() == DialogCompletionEvent::kEventType) { DialogCompletionEvent *dce = (DialogCompletionEvent*)(event); QString resultid = dce->GetId(); QString resulttext = dce->GetResultText(); if (resultid == "menu") { if (resulttext == tr("Clear Search")) { m_searchStr.clear(); if (m_searchText) m_searchText->SetText(m_searchStr); updateShowList(); SetFocusWidget(m_showList); } else if (resulttext == tr("Edit Search")) { MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack"); SearchInputDialog *textInput = new SearchInputDialog(popupStack, m_searchStr); if (textInput->Create()) { textInput->SetReturnEvent(this, "searchtext"); popupStack->AddScreen(textInput); } } else if (resulttext == tr("Toggle Record")) { quickRecord(); } else if (resulttext == tr("Program Details")) { details(); } else if (resulttext == tr("Upcoming")) { upcoming(); } else if (resulttext == tr("Custom Edit")) { customEdit(); } else if (resulttext == tr("Program Guide")) { showGuide(); } } else if (resultid == "searchtext") { m_searchStr = resulttext; if (m_searchText) m_searchText->SetText(m_searchStr); updateShowList(); SetFocusWidget(m_showList); } else ScheduleCommon::customEvent(event); } }