本文整理汇总了C++中EventPtr::GetLabel方法的典型用法代码示例。如果您正苦于以下问题:C++ EventPtr::GetLabel方法的具体用法?C++ EventPtr::GetLabel怎么用?C++ EventPtr::GetLabel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EventPtr
的用法示例。
在下文中一共展示了EventPtr::GetLabel方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AddWithNotification
void CEventLog::AddWithNotification(const EventPtr& eventPtr,
unsigned int displayTime /* = NOTIFICATION_DISPLAY_TIME */,
unsigned int messageTime /* = NOTIFICATION_MESSAGE_TIME */,
bool withSound /* = true */)
{
if (eventPtr == nullptr)
return;
Add(eventPtr);
// queue the eventPtr as a kai toast notification
if (!eventPtr->GetIcon().empty())
CGUIDialogKaiToast::QueueNotification(eventPtr->GetIcon(), eventPtr->GetLabel(), eventPtr->GetDescription(), displayTime, withSound, messageTime);
else
{
CGUIDialogKaiToast::eMessageType type = CGUIDialogKaiToast::Info;
if (eventPtr->GetLevel() == EventLevel::Warning)
type = CGUIDialogKaiToast::Warning;
else if (eventPtr->GetLevel() == EventLevel::Error)
type = CGUIDialogKaiToast::Error;
CGUIDialogKaiToast::QueueNotification(type, eventPtr->GetLabel(), eventPtr->GetDescription(), displayTime, withSound, messageTime);
}
}
示例2: EventToFileItem
CFileItemPtr CEventsDirectory::EventToFileItem(const EventPtr& eventItem)
{
if (eventItem == NULL)
return CFileItemPtr();
CFileItemPtr item(new CFileItem(eventItem->GetLabel()));
item->m_dateTime = eventItem->GetDateTime();
if (!eventItem->GetIcon().empty())
item->SetIconImage(eventItem->GetIcon());
item->SetProperty(PROPERTY_EVENT_IDENTIFIER, eventItem->GetIdentifier());
item->SetProperty(PROPERTY_EVENT_LEVEL, EventLevelToString(eventItem->GetLevel()));
item->SetProperty(PROPERTY_EVENT_DESCRIPTION, eventItem->GetDescription());
return item;
}