本文整理汇总了C++中CPVRChannelGroupPtr::GroupName方法的典型用法代码示例。如果您正苦于以下问题:C++ CPVRChannelGroupPtr::GroupName方法的具体用法?C++ CPVRChannelGroupPtr::GroupName怎么用?C++ CPVRChannelGroupPtr::GroupName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CPVRChannelGroupPtr
的用法示例。
在下文中一共展示了CPVRChannelGroupPtr::GroupName方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FillChannelGroupDetails
void CPVROperations::FillChannelGroupDetails(const CPVRChannelGroupPtr &channelGroup, const CVariant ¶meterObject, CVariant &result, bool append /* = false */)
{
if (channelGroup == NULL)
return;
CVariant object(CVariant::VariantTypeObject);
object["channelgroupid"] = channelGroup->GroupID();
object["channeltype"] = channelGroup->IsRadio() ? "radio" : "tv";
object["label"] = channelGroup->GroupName();
if (append)
result.append(object);
else
{
CFileItemList channels;
channelGroup->GetMembers(channels);
object["channels"] = CVariant(CVariant::VariantTypeArray);
HandleFileItemList("channelid", false, "channels", channels, parameterObject["channels"], object, false);
result = object;
}
}
示例2: OnMessage
//.........这里部分代码省略.........
CGUIDialogSlider *slider = (CGUIDialogSlider *)g_windowManager.GetWindow(WINDOW_DIALOG_SLIDER);
if (slider) slider->Close(true);
pDialog = (CGUIDialog *)g_windowManager.GetWindow(WINDOW_DIALOG_VIDEO_OSD);
if (pDialog) pDialog->Close(true);
pDialog = (CGUIDialog *)g_windowManager.GetWindow(WINDOW_DIALOG_FULLSCREEN_INFO);
if (pDialog) pDialog->Close(true);
pDialog = (CGUIDialog *)g_windowManager.GetWindow(WINDOW_DIALOG_PVR_OSD_CHANNELS);
if (pDialog) pDialog->Close(true);
pDialog = (CGUIDialog *)g_windowManager.GetWindow(WINDOW_DIALOG_PVR_OSD_GUIDE);
if (pDialog) pDialog->Close(true);
pDialog = (CGUIDialog *)g_windowManager.GetWindow(WINDOW_DIALOG_PVR_OSD_DIRECTOR);
if (pDialog) pDialog->Close(true);
pDialog = (CGUIDialog *)g_windowManager.GetWindow(WINDOW_DIALOG_PVR_OSD_CUTTER);
if (pDialog) pDialog->Close(true);
FreeResources(true);
CSingleLock lock (g_graphicsContext);
g_graphicsContext.SetFullScreenVideo(false);
lock.Leave();
#ifdef HAS_VIDEO_PLAYBACK
// make sure renderer is uptospeed
g_renderManager.Update(false);
#endif
CSingleLock lockFont(m_fontLock);
if (m_subsLayout)
{
g_fontManager.Unload("__subtitle__");
g_fontManager.Unload("__subtitleborder__");
delete m_subsLayout;
m_subsLayout = NULL;
}
return true;
}
case GUI_MSG_CLICKED:
{
unsigned int iControl = message.GetSenderId();
if (iControl == CONTROL_GROUP_CHOOSER && g_PVRManager.IsStarted())
{
// Get the currently selected label of the Select button
CGUIMessage msg(GUI_MSG_ITEM_SELECTED, GetID(), iControl);
OnMessage(msg);
CStdString strLabel = msg.GetLabel();
CPVRChannelPtr playingChannel;
if (g_PVRManager.GetCurrentChannel(playingChannel))
{
CPVRChannelGroupPtr selectedGroup = g_PVRChannelGroups->Get(playingChannel->IsRadio())->GetByName(strLabel);
if (selectedGroup)
{
g_PVRManager.SetPlayingGroup(selectedGroup);
CLog::Log(LOGDEBUG, "%s - switched to group '%s'", __FUNCTION__, selectedGroup->GroupName().c_str());
if (!selectedGroup->IsGroupMember(*playingChannel))
{
CLog::Log(LOGDEBUG, "%s - channel '%s' is not a member of '%s', switching to channel 1 of the new group",
__FUNCTION__, playingChannel->ChannelName().c_str(), selectedGroup->GroupName().c_str());
CFileItemPtr switchChannel = selectedGroup->GetByChannelNumber(1);
if (switchChannel && switchChannel->HasPVRChannelInfoTag())
OnAction(CAction(ACTION_CHANNEL_SWITCH, (float) switchChannel->GetPVRChannelInfoTag()->ChannelNumber()));
else
{
CLog::Log(LOGERROR, "%s - cannot find channel '1' in group %s", __FUNCTION__, selectedGroup->GroupName().c_str());
CApplicationMessenger::Get().MediaStop(false);
}
}
}
else
{
CLog::Log(LOGERROR, "%s - could not switch to group '%s'", __FUNCTION__, selectedGroup->GroupName().c_str());
CApplicationMessenger::Get().MediaStop(false);
}
}
else
{
CLog::Log(LOGERROR, "%s - cannot find the current channel", __FUNCTION__);
CApplicationMessenger::Get().MediaStop(false);
}
// hide the control and reset focus
m_bGroupSelectShow = false;
SET_CONTROL_HIDDEN(CONTROL_GROUP_CHOOSER);
// SET_CONTROL_FOCUS(0, 0);
return true;
}
break;
}
case GUI_MSG_SETFOCUS:
case GUI_MSG_LOSTFOCUS:
if (message.GetSenderId() != WINDOW_FULLSCREEN_VIDEO) return true;
break;
}
return CGUIWindow::OnMessage(message);
}
示例3: UpdateData
void CGUIWindowPVRChannels::UpdateData(bool bUpdateSelectedFile /* = true */)
{
CSingleLock lock(m_critSection);
CLog::Log(LOGDEBUG, "CGUIWindowPVRChannels - %s - update window '%s'. set view to %d",
__FUNCTION__, GetName(), m_iControlList);
m_bUpdateRequired = false;
/* lock the graphics context while updating */
CSingleLock graphicsLock(g_graphicsContext);
CPVRChannelGroupPtr selectedGroup = SelectedGroup();
if (!bUpdateSelectedFile)
m_iSelected = m_parent->m_viewControl.GetSelectedItem();
else
m_parent->m_viewControl.SetSelectedItem(0);
m_parent->m_viewControl.SetCurrentView(m_iControlList);
ShowBusyItem();
m_parent->m_vecItems->Clear();
CPVRChannelGroupPtr currentGroup = g_PVRManager.GetPlayingGroup(m_bRadio);
if (!currentGroup)
return;
SetSelectedGroup(currentGroup);
CStdString strPath;
strPath.Format("pvr://channels/%s/%s/",
m_bRadio ? "radio" : "tv",
m_bShowHiddenChannels ? ".hidden" : currentGroup->GroupName());
m_parent->m_vecItems->SetPath(strPath);
m_parent->Update(m_parent->m_vecItems->GetPath());
m_parent->m_viewControl.SetItems(*m_parent->m_vecItems);
if (bUpdateSelectedFile)
{
if (!SelectPlayingFile())
m_parent->m_viewControl.SetSelectedItem(m_iSelected);
}
/* empty list */
if (m_parent->m_vecItems->Size() == 0)
{
if (m_bShowHiddenChannels)
{
/* show the visible channels instead */
m_bShowHiddenChannels = false;
graphicsLock.Leave();
lock.Leave();
UpdateData(bUpdateSelectedFile);
return;
}
else if (currentGroup->GroupID() > 0)
{
if (*currentGroup != *SelectNextGroup())
return;
}
}
m_parent->SetLabel(CONTROL_LABELHEADER, g_localizeStrings.Get(m_bRadio ? 19024 : 19023));
if (m_bShowHiddenChannels)
m_parent->SetLabel(CONTROL_LABELGROUP, g_localizeStrings.Get(19022));
else
m_parent->SetLabel(CONTROL_LABELGROUP, currentGroup->GroupName());
if (!m_bThreadCreated)
{
m_bThreadCreated = true;
Create();
SetPriority(-1);
}
}
示例4: UpdatePath
void CPVRChannel::UpdatePath(unsigned int iNewChannelNumber)
{
CStdString strFileNameAndPath;
CSingleLock lock(m_critSection);
CPVRChannelGroupPtr group = g_PVRChannelGroups->GetGroupAll(m_bIsRadio);
if (group)
{
strFileNameAndPath.Format("pvr://channels/%s/%s/%i.pvr", (m_bIsRadio ? "radio" : "tv"), group->GroupName().c_str(), iNewChannelNumber);
if (m_strFileNameAndPath != strFileNameAndPath)
{
m_strFileNameAndPath = strFileNameAndPath;
SetChanged();
}
}
}
示例5: OnMessage
bool CGUIWindowFullScreen::OnMessage(CGUIMessage& message)
{
switch (message.GetMessage())
{
case GUI_MSG_WINDOW_INIT:
{
// check whether we've come back here from a window during which time we've actually
// stopped playing videos
if (message.GetParam1() == WINDOW_INVALID && !g_application.m_pPlayer->IsPlayingVideo())
{ // why are we here if nothing is playing???
g_windowManager.PreviousWindow();
return true;
}
g_infoManager.SetShowInfo(false);
g_infoManager.SetShowCodec(false);
m_bShowCurrentTime = false;
m_bGroupSelectShow = false;
g_infoManager.SetDisplayAfterSeek(0); // Make sure display after seek is off.
// switch resolution
g_graphicsContext.SetFullScreenVideo(true);
#ifdef HAS_VIDEO_PLAYBACK
// make sure renderer is uptospeed
g_renderManager.Update();
#endif
// now call the base class to load our windows
CGUIWindow::OnMessage(message);
m_bShowViewModeInfo = false;
return true;
}
case GUI_MSG_WINDOW_DEINIT:
{
CGUIDialog *pDialog = (CGUIDialog *)g_windowManager.GetWindow(WINDOW_DIALOG_OSD_TELETEXT);
if (pDialog) pDialog->Close(true);
pDialog = (CGUIDialog *)g_windowManager.GetWindow(WINDOW_DIALOG_SLIDER);
if (pDialog) pDialog->Close(true);
pDialog = (CGUIDialog *)g_windowManager.GetWindow(WINDOW_DIALOG_VIDEO_OSD);
if (pDialog) pDialog->Close(true);
pDialog = (CGUIDialog *)g_windowManager.GetWindow(WINDOW_DIALOG_FULLSCREEN_INFO);
if (pDialog) pDialog->Close(true);
pDialog = (CGUIDialog *)g_windowManager.GetWindow(WINDOW_DIALOG_PVR_OSD_CHANNELS);
if (pDialog) pDialog->Close(true);
pDialog = (CGUIDialog *)g_windowManager.GetWindow(WINDOW_DIALOG_PVR_OSD_GUIDE);
if (pDialog) pDialog->Close(true);
pDialog = (CGUIDialog *)g_windowManager.GetWindow(WINDOW_DIALOG_PVR_OSD_DIRECTOR);
if (pDialog) pDialog->Close(true);
pDialog = (CGUIDialog *)g_windowManager.GetWindow(WINDOW_DIALOG_PVR_OSD_CUTTER);
if (pDialog) pDialog->Close(true);
pDialog = (CGUIDialog *)g_windowManager.GetWindow(WINDOW_DIALOG_SUBTITLES);
if (pDialog) pDialog->Close(true);
CGUIWindow::OnMessage(message);
CSettings::Get().Save();
CSingleLock lock (g_graphicsContext);
g_graphicsContext.SetFullScreenVideo(false);
lock.Leave();
#ifdef HAS_VIDEO_PLAYBACK
// make sure renderer is uptospeed
g_renderManager.Update();
#endif
return true;
}
case GUI_MSG_CLICKED:
{
unsigned int iControl = message.GetSenderId();
if (iControl == CONTROL_GROUP_CHOOSER && g_PVRManager.IsStarted())
{
// Get the currently selected label of the Select button
CGUIMessage msg(GUI_MSG_ITEM_SELECTED, GetID(), iControl);
OnMessage(msg);
CStdString strLabel = msg.GetLabel();
CPVRChannelPtr playingChannel;
if (g_PVRManager.GetCurrentChannel(playingChannel))
{
CPVRChannelGroupPtr selectedGroup = g_PVRChannelGroups->Get(playingChannel->IsRadio())->GetByName(strLabel);
if (selectedGroup)
{
g_PVRManager.SetPlayingGroup(selectedGroup);
CLog::Log(LOGDEBUG, "%s - switched to group '%s'", __FUNCTION__, selectedGroup->GroupName().c_str());
if (!selectedGroup->IsGroupMember(*playingChannel))
{
CLog::Log(LOGDEBUG, "%s - channel '%s' is not a member of '%s', switching to channel 1 of the new group",
__FUNCTION__, playingChannel->ChannelName().c_str(), selectedGroup->GroupName().c_str());
CFileItemPtr switchChannel = selectedGroup->GetByChannelNumber(1);
if (switchChannel && switchChannel->HasPVRChannelInfoTag())
g_application.OnAction(CAction(ACTION_CHANNEL_SWITCH, (float) switchChannel->GetPVRChannelInfoTag()->ChannelNumber()));
else
{
CLog::Log(LOGERROR, "%s - cannot find channel '1' in group %s", __FUNCTION__, selectedGroup->GroupName().c_str());
CApplicationMessenger::Get().MediaStop(false);
}
//.........这里部分代码省略.........