本文整理汇总了C++中ChannelInfo::ToMap方法的典型用法代码示例。如果您正苦于以下问题:C++ ChannelInfo::ToMap方法的具体用法?C++ ChannelInfo::ToMap怎么用?C++ ChannelInfo::ToMap使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ChannelInfo
的用法示例。
在下文中一共展示了ChannelInfo::ToMap方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateInfo
void ChannelRecPriority::updateInfo(MythUIButtonListItem *item)
{
if (!item)
return;
ChannelInfo *channelItem = item->GetData().value<ChannelInfo *>();
if (!m_channelData.isEmpty() && channelItem)
{
QString rectype;
if (m_iconImage)
{
QString iconUrl = gCoreContext->GetMasterHostPrefix("ChannelIcons", channelItem->icon);
m_iconImage->SetFilename(iconUrl);
m_iconImage->Load();
}
InfoMap chanmap;
channelItem->ToMap(chanmap);
SetTextFromMap(chanmap);
if (m_chanstringText)
m_chanstringText->SetText(channelItem->GetFormatted(ChannelInfo::kChannelLong));
}
MythUIText *norecordingText = dynamic_cast<MythUIText*>
(GetChild("norecordings_info"));
if (norecordingText)
norecordingText->SetVisible(m_channelData.isEmpty());
}
示例2: updateList
void ChannelRecPriority::updateList()
{
m_channelList->Reset();
QMap<QString, ChannelInfo*>::Iterator it;
for (it = m_sortedChannel.begin(); it != m_sortedChannel.end(); ++it)
{
ChannelInfo *chanInfo = *it;
MythUIButtonListItem *item =
new MythUIButtonListItem(m_channelList, "",
qVariantFromValue(chanInfo));
QString fontState = "default";
item->SetText(chanInfo->GetFormatted(ChannelInfo::kChannelLong),
fontState);
InfoMap infomap;
chanInfo->ToMap(infomap);
item->SetTextFromMap(infomap, fontState);
item->DisplayState("normal", "status");
if (!chanInfo->icon.isEmpty())
{
QString iconUrl = gCoreContext->GetMasterHostPrefix("ChannelIcons",
chanInfo->icon);
item->SetImage(iconUrl, "icon");
item->SetImage(iconUrl);
}
item->SetText(QString::number(chanInfo->recpriority), "priority", fontState);
if (m_currentItem == chanInfo)
m_channelList->SetItemCurrent(item);
}
// this textarea name is depreciated use 'nochannels_warning' instead
MythUIText *noChannelsText = dynamic_cast<MythUIText*>(GetChild("norecordings_info"));
if (!noChannelsText)
noChannelsText = dynamic_cast<MythUIText*>(GetChild("nochannels_warning"));
if (noChannelsText)
noChannelsText->SetVisible(m_channelData.isEmpty());
}
示例3: updateList
void ChannelRecPriority::updateList()
{
m_channelList->Reset();
QMap<QString, ChannelInfo*>::Iterator it;
MythUIButtonListItem *item;
for (it = m_sortedChannel.begin(); it != m_sortedChannel.end(); ++it)
{
ChannelInfo *chanInfo = *it;
item = new MythUIButtonListItem(m_channelList, "",
qVariantFromValue(chanInfo));
QString fontState = "default";
if (!m_visMap[chanInfo->chanid])
fontState = "disabled";
item->SetText(chanInfo->GetFormatted(ChannelInfo::kChannelLong),
fontState);
InfoMap infomap;
chanInfo->ToMap(infomap);
item->SetTextFromMap(infomap, fontState);
if (m_visMap[chanInfo->chanid])
item->DisplayState("normal", "status");
else
item->DisplayState("disabled", "status");
item->SetImage(chanInfo->iconpath, "icon");
item->SetImage(chanInfo->iconpath);
item->SetText(chanInfo->recpriority, "priority", fontState);
if (m_currentItem == chanInfo)
m_channelList->SetItemCurrent(item);
}
MythUIText *norecordingText = dynamic_cast<MythUIText*>
(GetChild("norecordings_info"));
if (norecordingText)
norecordingText->SetVisible(m_channelData.isEmpty());
}