当前位置: 首页>>代码示例>>C++>>正文


C++ CGUIImage::GetFileName方法代码示例

本文整理汇总了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();
}
开发者ID:A600,项目名称:xbmc,代码行数:7,代码来源:GUIDialogKaiToast.cpp

示例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;
}
开发者ID:SuhasBharadwajK,项目名称:xbmc,代码行数:56,代码来源:GUIDialogKaiToast.cpp

示例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);
}
开发者ID:A600,项目名称:xbmc,代码行数:17,代码来源:GUIDialogKaiToast.cpp

示例4: OnWindowLoaded

void CGUIDialogProfileSettings::OnWindowLoaded()
{
  CGUIDialogSettings::OnWindowLoaded();
  CGUIImage *pImage = (CGUIImage*)GetControl(2);
  m_strDefaultImage = pImage ? pImage->GetFileName() : "";
}
开发者ID:EternalStare,项目名称:xbmc,代码行数:6,代码来源:GUIDialogProfileSettings.cpp


注:本文中的CGUIImage::GetFileName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。