示例#1
0
 void CPVRGUIChannelNavigator::ToggleInfo()
 {
   if (CServiceBroker::GetGUI()->GetInfoManager().GetInfoProviders().GetPlayerInfoProvider().GetShowInfo())
     HideInfo();
   else
     ShowInfo();
 }
示例#2
0
文件: UiHelper.cpp 项目: A-K/naali
        void UiHelper::ShowStatus(const QString &message, int msec_timeout)
        {
            info_ui_.info_label->setText(message);
            info_ui_.icon_label->hide();
            info_proxy_->show();

            if (msec_timeout > 0)
                QTimer::singleShot(msec_timeout, this, SLOT(HideInfo()));
        }
示例#3
0
文件: UiHelper.cpp 项目: A-K/naali
        void UiHelper::ShowError(const QString &error, int msec_timeout)
        {
            info_ui_.icon_label->setStyleSheet("QLabel#icon_label{background-image:url('./data/ui/images/icon_warning.png');}");
            if (!info_ui_.icon_label->isVisible())
                info_ui_.icon_label->show();

            info_ui_.info_label->setText(error);
            info_proxy_->show();

            if (msec_timeout > 0)
                QTimer::singleShot(msec_timeout, this, SLOT(HideInfo()));
        }
示例#4
0
/**
 *  \brief  Shows the popup menu
 */
void GallerySlideView::MenuMain()
{
    // Create the main menu that will contain the submenus above
    MythMenu *menu = new MythMenu(tr("Slideshow Options"), this, "mainmenu");

    ImagePtrK im = m_slides.GetCurrent().GetImageData();
    if (im && im->m_type == kVideoFile)
        menu->AddItem(tr("Play Video"), SLOT(PlayVideo()));

    if (m_playing)
        menu->AddItem(tr("Stop"), SLOT(Stop()));
    else
        menu->AddItem(tr("Start SlideShow"), SLOT(Play()));

    if (gCoreContext->GetNumSetting("GalleryRepeat", 0))
        menu->AddItem(tr("Turn Repeat Off"), SLOT(RepeatOff()));
    else
        menu->AddItem(tr("Turn Repeat On"), SLOT(RepeatOn()));

    MenuTransforms(*menu);

    if (m_uiHideCaptions)
    {
        if (m_showCaptions)
            menu->AddItem(tr("Hide Captions"), SLOT(HideCaptions()));
        else
            menu->AddItem(tr("Show Captions"), SLOT(ShowCaptions()));
    }

    QString details;
    switch (m_infoList.GetState())
    {
    case kBasicInfo: details = tr("More Details"); break;
    case kFullInfo:  details = tr("Less Details"); break;
    default:
    case kNoInfo:    details = tr("Show Details"); break;
    }
    menu->AddItem(details, SLOT(ShowInfo()));

    if (m_infoList.GetState() != kNoInfo)
        menu->AddItem(tr("Hide Details"), SLOT(HideInfo()));

    MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
    MythDialogBox *menuPopup = new MythDialogBox(menu, popupStack, "menuPopup");
    if (menuPopup->Create())
        popupStack->AddScreen(menuPopup);
    else
        delete menuPopup;
}
示例#5
0
 void CPVRGUIChannelNavigator::ClearPlayingChannel()
 {
   CSingleLock lock(m_critSection);
   m_playingChannel.reset();
   HideInfo();
 }