本文整理汇总了C++中MythUIButtonListItem::getImage方法的典型用法代码示例。如果您正苦于以下问题:C++ MythUIButtonListItem::getImage方法的具体用法?C++ MythUIButtonListItem::getImage怎么用?C++ MythUIButtonListItem::getImage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MythUIButtonListItem
的用法示例。
在下文中一共展示了MythUIButtonListItem::getImage方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: eventChanged
void ZMEvents::eventChanged(MythUIButtonListItem *item)
{
(void) item;
if (m_eventNoText)
{
if (m_eventGrid->GetCount() > 0)
m_eventNoText->SetText(QString("%1/%2")
.arg(m_eventGrid->GetCurrentPos() + 1).arg(m_eventGrid->GetCount()));
else
m_eventNoText->SetText("0/0");
}
// update the images for all the visible items
for (int x = m_eventGrid->GetCurrentPos() - m_eventGrid->GetVisibleCount();
x < m_eventGrid->GetCurrentPos() + (int)m_eventGrid->GetVisibleCount(); x++)
{
if (x < 0 || x > (int)m_eventGrid->GetCount() - 1)
continue;
MythUIButtonListItem *gridItem = m_eventGrid->GetItemAt(x);
if (gridItem && !gridItem->getImage())
{
if (x < 0 || x > (int)m_eventList->size() - 1)
continue;
Event *event = m_eventList->at(x);
if (event)
{
QImage image;
if (class ZMClient *zm = ZMClient::get())
{
zm->getAnalyseFrame(event->monitorID,
event->eventID,
0, image);
if (!image.isNull())
{
MythImage *mimage = GetMythPainter()->GetFormatImage();
mimage->Assign(image);
gridItem->setImage(mimage);
mimage->SetChanged();
}
}
}
}
}
}