本文整理汇总了C++中GetFocusWidget函数的典型用法代码示例。如果您正苦于以下问题:C++ GetFocusWidget函数的具体用法?C++ GetFocusWidget怎么用?C++ GetFocusWidget使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetFocusWidget函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetMythMainWindow
bool 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;
}
示例2: keyPressEvent
bool 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;
}
示例3: GetMythMainWindow
bool 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;
}
示例4: GetMythMainWindow
bool 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;
}
示例5: keyPressEvent
bool 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;
}
示例6: GetMythMainWindow
bool 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;
}
示例7: keyPressEvent
bool 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;
}
示例8: SetFocusWidget
void ViewScheduled::SwitchList()
{
if (GetFocusWidget() == m_groupList)
SetFocusWidget(m_schedulesList);
else if (GetFocusWidget() == m_schedulesList)
SetFocusWidget(m_groupList);
}
示例9: keyPressEvent
bool 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;
}
示例10: GetMythMainWindow
bool 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;
}
示例11: GetMythMainWindow
bool 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;
}
示例12: keyPressEvent
bool 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;
}
示例13: GetMythMainWindow
bool 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;
}
示例14: keyPressEvent
bool 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;
}
示例15: keyPressEvent
bool 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;
}