本文整理汇总了C++中CGUIImage::GetFileName方法的典型用法代码示例。如果您正苦于以下问题:C++ CGUIImage::GetFileName方法的具体用法?C++ CGUIImage::GetFileName怎么用?C++ CGUIImage::GetFileName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGUIImage
的用法示例。
在下文中一共展示了CGUIImage::GetFileName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnWindowLoaded
void CGUIDialogKaiToast::OnWindowLoaded()
{
CGUIDialog::OnWindowLoaded();
CGUIImage *image = (CGUIImage *)GetControl(POPUP_ICON);
if (image)
m_defaultIcon = image->GetFileName();
}
示例2: DoWork
bool CGUIDialogKaiToast::DoWork()
{
CSingleLock lock(m_critical);
if (m_notifications.size() > 0 &&
CTimeUtils::GetFrameTime() - m_timer > m_toastMessageTime)
{
Notification toast = m_notifications.front();
m_notifications.pop();
lock.Leave();
m_toastDisplayTime = toast.displayTime;
m_toastMessageTime = toast.messageTime;
CSingleLock lock2(g_graphicsContext);
if(!Initialize())
return false;
SET_CONTROL_LABEL(POPUP_CAPTION_TEXT, toast.caption);
SET_CONTROL_LABEL(POPUP_NOTIFICATION_BUTTON, toast.description);
CGUIImage *image = (CGUIImage *)GetControl(POPUP_ICON);
if (image)
{
CStdString strTypeImage = toast.imagefile;
if (strTypeImage.IsEmpty())
{
CGUIImage *typeImage = NULL;
if (toast.eType == Info)
typeImage = (CGUIImage *)GetControl(POPUP_ICON_INFO);
else if (toast.eType == Warning)
typeImage = (CGUIImage *)GetControl(POPUP_ICON_WARNING);
else if (toast.eType == Error)
typeImage = (CGUIImage *)GetControl(POPUP_ICON_ERROR);
else
typeImage = image;
strTypeImage = typeImage->GetFileName();
}
image->SetFileName(strTypeImage);
}
// Play the window specific init sound for each notification queued
SetSound(toast.withSound);
ResetTimer();
return true;
}
return false;
}
示例3: AddToQueue
void CGUIDialogKaiToast::AddToQueue(eMessageType eType, const CStdString& aCaption, const CStdString& aDescription, unsigned int displayTime /*= TOAST_DISPLAY_TIME*/, bool withSound /*= true*/, unsigned int messageTime /*= TOAST_MESSAGE_TIME*/)
{
CGUIImage *image = NULL;
if (eType == Info)
image = (CGUIImage *)GetControl(POPUP_ICON_INFO);
else if (eType == Warning)
image = (CGUIImage *)GetControl(POPUP_ICON_WARNING);
else if (eType == Error)
image = (CGUIImage *)GetControl(POPUP_ICON_ERROR);
CStdString strImage;
if (image)
strImage = image->GetFileName();
AddToQueue(strImage, aCaption, aDescription, displayTime, withSound, messageTime);
}
示例4: OnWindowLoaded
void CGUIDialogProfileSettings::OnWindowLoaded()
{
CGUIDialogSettings::OnWindowLoaded();
CGUIImage *pImage = (CGUIImage*)GetControl(2);
m_strDefaultImage = pImage ? pImage->GetFileName() : "";
}