这篇教程C++ GetFocusWidget函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中GetFocusWidget函数的典型用法代码示例。如果您正苦于以下问题:C++ GetFocusWidget函数的具体用法?C++ GetFocusWidget怎么用?C++ GetFocusWidget使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了GetFocusWidget函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: GetMythMainWindowbool CustomEdit::keyPressEvent(QKeyEvent *event){ if (GetFocusWidget()->keyPressEvent(event)) 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 == "DELETE") { if (GetFocusWidget() == m_clauseList) deleteRule(); // else if (GetFocusWidget() == m_ruleList) // deleteRecordingRule(); } else handled = false; } if (!handled && MythScreenType::keyPressEvent(event)) handled = true; return handled;}
开发者ID:Openivo,项目名称:mythtv,代码行数:30,
示例2: keyPressEventbool MythNews::keyPressEvent(QKeyEvent *event){ if (GetFocusWidget() && GetFocusWidget()->keyPressEvent(event)) return true; bool handled = false; QStringList actions; handled = GetMythMainWindow()->TranslateKeyPress("News", event, actions); for (int i = 0; i < actions.size() && !handled; i++) { QString action = actions[i]; handled = true; if (action == "RETRIEVENEWS") slotRetrieveNews(); else if (action == "CANCEL") cancelRetrieve(); else if (action == "MENU") ShowMenu(); else if (action == "EDIT") ShowEditDialog(true); else if (action == "DELETE") deleteNewsSite(); else handled = false; } if (!handled && MythScreenType::keyPressEvent(event)) handled = true; return handled;}
开发者ID:samuelschen,项目名称:mythtv,代码行数:33,
示例3: GetMythMainWindowbool CustomEdit::keyPressEvent(QKeyEvent *event){ if (GetFocusWidget()->keyPressEvent(event)) return true; QStringList actions; bool handled = GetMythMainWindow()->TranslateKeyPress("TV Frontend", event, actions); for (int i = 0; i < actions.size() && !handled; i++) { QString action = actions[i]; handled = true; if (action == "DELETE") { if (GetFocusWidget() == m_clauseList) deleteRule(); // else if (GetFocusWidget() == m_ruleList) // deleteRecordingRule(); } else if (action == "EDIT") { // toggle evaluated/unevaluated sample view m_evaluate = !m_evaluate; MythUIButtonListItem* item = m_clauseList->GetItemCurrent(); clauseChanged(item); } else handled = false; } if (!handled && MythScreenType::keyPressEvent(event)) handled = true; return handled;}
开发者ID:tomhughes,项目名称:mythtv,代码行数:35,
示例4: GetMythMainWindowbool RSSEditor::keyPressEvent(QKeyEvent *event){ if (GetFocusWidget()->keyPressEvent(event)) return true; bool handled = false; QStringList actions; handled = GetMythMainWindow()->TranslateKeyPress("Internet Video", event, actions); for (int i = 0; i < actions.size() && !handled; i++) { QString action = actions[i]; handled = true; if (action == "DELETE" && GetFocusWidget() == m_sites) { slotDeleteSite(); } if (action == "EDIT" && GetFocusWidget() == m_sites) { slotEditSite(); } else handled = false; } if (!handled && MythScreenType::keyPressEvent(event)) handled = true; return handled;}
开发者ID:Cougar,项目名称:mythtv,代码行数:32,
示例5: keyPressEventbool EditMetadataDialog::keyPressEvent(QKeyEvent *event){ if (GetFocusWidget() && GetFocusWidget()->keyPressEvent(event)) return true; bool handled = false; QStringList actions; handled = GetMythMainWindow()->TranslateKeyPress("Music", event, actions); for (int i = 0; i < actions.size() && !handled; i++) { QString action = actions[i]; handled = true; if (action == "THMBUP") incRating(); else if (action == "THMBDOWN") decRating(); else if (action == "MENU") showMenu(); else handled = false; } if (!handled && EditMetadataCommon::keyPressEvent(event)) handled = true; return handled;}
开发者ID:daveyboyc,项目名称:mythtv,代码行数:29,
示例6: GetMythMainWindowbool ScreenSetup::keyPressEvent(QKeyEvent *event){ if (GetFocusWidget() && GetFocusWidget()->keyPressEvent(event)) return true; bool handled = false; QStringList actions; handled = GetMythMainWindow()->TranslateKeyPress("Weather", event, actions); for (int i = 0; i < actions.size() && !handled; i++) { QString action = actions[i]; handled = true; if (action == "DELETE") { if (GetFocusWidget() == m_activeList) deleteScreen(); } else handled = false; } if (!handled && MythScreenType::keyPressEvent(event)) handled = true; return handled;}
开发者ID:DaveDaCoda,项目名称:mythtv,代码行数:28,
示例7: keyPressEventbool VisualizerView::keyPressEvent(QKeyEvent *event){ if (GetFocusWidget() && GetFocusWidget()->keyPressEvent(event)) return true; bool handled = false; QStringList actions; handled = GetMythMainWindow()->TranslateKeyPress("Music", event, actions); for (int i = 0; i < actions.size() && !handled; i++) { QString action = actions[i]; handled = true; if (action == "INFO") { showTrackInfoPopup(); } else handled = false; } if (!handled && MusicCommon::keyPressEvent(event)) handled = true; if (!handled && MythScreenType::keyPressEvent(event)) handled = true; return handled;}
开发者ID:ChristopherNeufeld,项目名称:mythtv,代码行数:30,
示例8: SetFocusWidgetvoid ViewScheduled::SwitchList(){ if (GetFocusWidget() == m_groupList) SetFocusWidget(m_schedulesList); else if (GetFocusWidget() == m_schedulesList) SetFocusWidget(m_groupList);}
开发者ID:DocOnDev,项目名称:mythtv,代码行数:7,
示例9: keyPressEventbool ImportCoverArtDialog::keyPressEvent(QKeyEvent *event){ if (GetFocusWidget() && GetFocusWidget()->keyPressEvent(event)) return true; bool handled = false; QStringList actions; handled = GetMythMainWindow()->TranslateKeyPress("Global", event, actions); for (int i = 0; i < actions.size() && !handled; i++) { QString action = actions[i]; handled = true; if (action == "LEFT") { m_prevButton->Push(); } else if (action == "RIGHT") { m_nextButton->Push(); } else handled = false; } if (!handled && MythScreenType::keyPressEvent(event)) handled = true; return handled;}
开发者ID:txase,项目名称:mythtv,代码行数:31,
示例10: GetMythMainWindowbool SearchView::keyPressEvent(QKeyEvent *event){ if (!m_moveTrackMode && GetFocusWidget() && GetFocusWidget()->keyPressEvent(event)) return true; bool handled = false; QStringList actions; handled = GetMythMainWindow()->TranslateKeyPress("Music", event, actions); for (int i = 0; i < actions.size() && !handled; i++) { QString action = actions[i]; handled = true; if (action == "INFO" || action == "EDIT") { if (GetFocusWidget() == m_tracksList) { if (m_tracksList->GetItemCurrent()) { MusicMetadata *mdata = qVariantValue<MusicMetadata*> (m_tracksList->GetItemCurrent()->GetData()); if (mdata) { if (action == "INFO") showTrackInfo(mdata); else editTrackInfo(mdata); } } } else handled = false; } else if (action == "PLAY") { if (GetFocusWidget() == m_tracksList) { MythUIButtonListItem *item = m_tracksList->GetItemCurrent(); if (item) { m_playTrack = true; trackClicked(item); } } else handled = false; } else handled = false; } if (!handled && MusicCommon::keyPressEvent(event)) handled = true; if (!handled && MythScreenType::keyPressEvent(event)) handled = true; return handled;}
开发者ID:DragonStalker,项目名称:mythtv,代码行数:59,
示例11: GetMythMainWindowbool ZMEvents::keyPressEvent(QKeyEvent *event){ if (GetFocusWidget()->keyPressEvent(event)) return true; bool handled = false; QStringList actions; handled = GetMythMainWindow()->TranslateKeyPress("TV Playback", event, actions); for (int i = 0; i < actions.size() && !handled; i++) { QString action = actions[i]; handled = true; if (action == "MENU") { showMenu(); } else if (action == "ESCAPE") { if (GetFocusWidget() == m_eventGrid) SetFocusWidget(m_cameraSelector); else handled = false; } else if (action == "DELETE") { if (m_deleteButton) m_deleteButton->Push(); } else if (action == "PAUSE") { if (m_playButton) m_playButton->Push(); } else if (action == "INFO") { m_oldestFirst = !m_oldestFirst; getEventList(); } else if (action == "1") setGridLayout(1); else if (action == "2") setGridLayout(2); else if (action == "3") setGridLayout(3); else handled = false; } if (!handled && MythScreenType::keyPressEvent(event)) handled = true; return handled;}
开发者ID:JGunning,项目名称:OpenAOL-TV,代码行数:56,
示例12: keyPressEventbool ImportMusicDialog::keyPressEvent(QKeyEvent *event){ if (GetFocusWidget() && GetFocusWidget()->keyPressEvent(event)) return true; bool handled = false; QStringList actions; handled = GetMythMainWindow()->TranslateKeyPress("Global", event, actions); for (int i = 0; i < actions.size() && !handled; i++) { QString action = actions[i]; handled = true; if (action == "LEFT") { m_prevButton->Push(); } else if (action == "RIGHT") { m_nextButton->Push(); } else if (action == "EDIT") { showEditMetadataDialog(); } else if (action == "MENU") { showMenu(); } else if (action == "ESCAPE" && !GetMythMainWindow()->IsExitingToMain()) { bool found = false; if (!m_tracks->empty()) { uint track = 0; while (track < m_tracks->size()) { if (m_tracks->at(track)->isNewTune) { found = true; break; } track++; } if (found) { QString msg = tr("You might have unsaved changes./nAre you sure you want to exit this screen?"); ShowOkPopup(msg, this, SLOT(doExit(bool)), true); } } handled = found; }
开发者ID:martinjt,项目名称:mythtv,代码行数:55,
示例13: GetMythMainWindowbool MythUIVirtualKeyboard::keyPressEvent(QKeyEvent *e){ bool handled = false; QStringList actions; handled = GetMythMainWindow()->TranslateKeyPress("TV Frontend", e, actions); if (handled) return true; bool keyFound = false; KeyDefinition key; if (GetFocusWidget()) { if (m_keyMap.contains(GetFocusWidget()->objectName())) { key = m_keyMap.value(GetFocusWidget()->objectName()); keyFound = true;; } } for (int i = 0; i < actions.size() && !handled; i++) { QString action = actions[i]; handled = true; if (action == "UP") { if (keyFound) SetFocusWidget(GetChild(key.up)); } else if (action == "DOWN") { if (keyFound) SetFocusWidget(GetChild(key.down)); } else if (action == "LEFT") { if (keyFound) SetFocusWidget(GetChild(key.left)); } else if (action == "RIGHT") { if (keyFound) SetFocusWidget(GetChild(key.right)); } else handled = false; } if (!handled && MythScreenType::keyPressEvent(e)) handled = true; return handled;}
开发者ID:Olti,项目名称:mythtv,代码行数:54,
示例14: keyPressEventbool MythNews::keyPressEvent(QKeyEvent *event){ if (GetFocusWidget() && GetFocusWidget()->keyPressEvent(event)) return true; bool handled = false; QStringList actions; handled = GetMythMainWindow()->TranslateKeyPress("News", event, actions); for (int i = 0; i < actions.size() && !handled; i++) { QString action = actions[i]; handled = true; if (action == "RETRIEVENEWS") slotRetrieveNews(); else if (action == "CANCEL") cancelRetrieve(); else if (action == "MENU") ShowMenu(); else if (action == "EDIT") ShowEditDialog(true); else if (action == "DELETE") deleteNewsSite(); else if (action == "ESCAPE") { { QMutexLocker locker(&m_lock); if (m_progressPopup) { m_progressPopup->Close(); m_progressPopup = NULL; } m_RetrieveTimer->stop(); if (m_httpGrabber) m_abortHttp = true; } Close(); } else handled = false; } if (!handled && MythScreenType::keyPressEvent(event)) handled = true; return handled;}
开发者ID:drsami,项目名称:mythtv,代码行数:52,
示例15: keyPressEventbool PlaylistView::keyPressEvent(QKeyEvent *event){ if (!m_moveTrackMode && GetFocusWidget() && GetFocusWidget()->keyPressEvent(event)) return true; bool handled = false; if (MusicCommon::keyPressEvent(event)) handled = true; if (!handled && MythScreenType::keyPressEvent(event)) handled = true; return handled;}
开发者ID:DaveDaCoda,项目名称:mythtv,代码行数:15,
示例16: keyPressEventbool ViewScheduled::keyPressEvent(QKeyEvent *event){ // FIXME: Blackholes keypresses, not good if (m_inEvent) return true; m_inEvent = true; if (GetFocusWidget()->keyPressEvent(event)) { m_inEvent = false; 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 == "DELETE") deleteRule(); else if (action == "UPCOMING") upcoming(); else if (action == "VIEWSCHEDULED") upcomingScheduled(); else if (action == "DETAILS" || action == "INFO") details(); else if (action == "1") setShowAll(true); else if (action == "2") setShowAll(false); else if (action == "PREVVIEW" || action == "NEXTVIEW") setShowAll(!m_showAll); else if (action == "VIEWCARD") viewCards(); else if (action == "VIEWINPUT") viewInputs(); else handled = false; } if (m_needFill) LoadList(); if (!handled && MythScreenType::keyPressEvent(event)) handled = true; m_inEvent = false; return handled;}
开发者ID:stunami,项目名称:mythtv,代码行数:60,
示例17: keyPressEventbool ThemeChooser::keyPressEvent(QKeyEvent *event){ if (GetFocusWidget()->keyPressEvent(event)) return true; bool handled = false; QStringList actions; handled = GetMythMainWindow()->TranslateKeyPress("Theme Chooser", event, actions); for (int i = 0; i < actions.size() && !handled; ++i) { QString action = actions[i]; handled = true; if (action == "MENU") showPopupMenu(); else if (action == "DELETE") removeTheme(); else if ((action == "ESCAPE") && (m_fullPreviewShowing)) { toggleFullscreenPreview(); } else handled = false; } if (!handled && MythScreenType::keyPressEvent(event)) handled = true; return handled;}
开发者ID:StefanRoss,项目名称:mythtv,代码行数:32,
示例18: keyPressEventbool ExportNative::keyPressEvent(QKeyEvent *event){ if (GetFocusWidget()->keyPressEvent(event)) return true; bool handled = false; QStringList actions; handled = GetMythMainWindow()->TranslateKeyPress("Archive", event, actions); for (int i = 0; i < actions.size() && !handled; i++) { QString action = actions[i]; handled = true; if (action == "MENU") { showMenu(); } else if (action == "DELETE") { removeItem(); } else handled = false; } if (!handled && MythScreenType::keyPressEvent(event)) handled = true; return handled;}
开发者ID:lazerdye,项目名称:mythtv,代码行数:32,
示例19: keyPressEventbool ImportNative::keyPressEvent(QKeyEvent *event){ if (GetFocusWidget()->keyPressEvent(event)) return true; bool handled = false; QStringList actions; handled = GetMythMainWindow()->TranslateKeyPress("Global", event, actions); for (int i = 0; i < actions.size() && !handled; i++) { QString action = actions[i]; handled = true; if (action == "MENU") { } else handled = false; } if (!handled && MythScreenType::keyPressEvent(event)) handled = true; return handled;}
开发者ID:mojie126,项目名称:mythtv,代码行数:26,
示例20: keyPressEventbool ZMLivePlayer::keyPressEvent(QKeyEvent *event){ if (GetFocusWidget() && GetFocusWidget()->keyPressEvent(event)) return true; bool handled = false; QStringList actions; handled = GetMythMainWindow()->TranslateKeyPress("TV Playback", event, actions); for (int i = 0; i < actions.size() && !handled; i++) { QString action = actions[i]; handled = true; if (action == "PAUSE") { if (m_paused) { m_frameTimer->start(FRAME_UPDATE_TIME); m_paused = false; } else { m_frameTimer->stop(); m_paused = true; } } else if (action == "INFO") { m_monitorLayout++; if (m_monitorLayout > 3) m_monitorLayout = 1; setMonitorLayout(m_monitorLayout); } else if (action == "1" || action == "2" || action == "3" || action == "4" || action == "5" || action == "6" || action == "7" || action == "8" || action == "9") changePlayerMonitor(action.toInt()); else handled = false; } if (!handled && MythScreenType::keyPressEvent(event)) handled = true; return handled;}
开发者ID:jmartens,项目名称:mythtv,代码行数:47,
注:本文中的GetFocusWidget函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ GetFolder函数代码示例 C++ GetFocus函数代码示例 |