/** \fn GalleryView::MenuInformation() * \brief Shows the menu when the INFO key was pressed * \return void */ void GalleryView::MenuInformation() { QString label = tr("Image Information"); MythMenu *menu = new MythMenu(label, this, "infomenu"); // only show the slideshow options and details menu when // the item is a video or image file ImageMetadata *im = GetImageMetadataFromSelectedButton(); if (im) { if (im->m_type == kImageFile || im->m_type == kVideoFile) { menu->AddItem(tr("Normal SlideShow"), SLOT(ShowFiles())); menu->AddItem(tr("Random Slideshow"), SLOT(ShowRandomFiles())); } if (im->m_type == kImageFile) menu->AddItem(tr("Show Details"), SLOT(FileDetails())); } m_menuPopup = new MythDialogBox(menu, m_popupStack, "menuPopup"); if (!m_menuPopup->Create()) { delete m_menuPopup; m_menuPopup = NULL; return; } m_popupStack->AddScreen(m_menuPopup); }
/** \fn GalleryView::MenuMain() * \brief Shows a dialog popup with the main menu * \return void */ void GalleryWidget::MenuMain() { // Create the main menu that will contain the submenus above MythMenu *menu = new MythMenu(tr("Image Information"), this, "mainmenu"); // If no slideshow type was given show the item to start it // otherwise show the items to stop or resume a slideshow. if (m_slideShowType == kNoSlideShow) { menu->AddItem(tr("Start Normal SlideShow"), SLOT(StartNormalSlideShow())); menu->AddItem(tr("Start Random SlideShow"), SLOT(StartRandomSlideShow())); } else { if (m_timer->isActive()) menu->AddItem(tr("Pause SlideShow"), SLOT(PauseSlideShow())); else { if (m_slideShowType == kNormalSlideShow) menu->AddItem(tr("Resume SlideShow"), SLOT(StartNormalSlideShow())); if (m_slideShowType == kRandomSlideShow) menu->AddItem(tr("Resume SlideShow"), SLOT(StartRandomSlideShow())); } } MenuMetadata(menu); menu->AddItem(tr("Show Details"), SLOT(FileDetails())); m_menuPopup = new MythDialogBox(menu, m_popupStack, "menuPopup"); if (!m_menuPopup->Create()) { delete m_menuPopup; m_menuPopup = NULL; return; } m_popupStack->AddScreen(m_menuPopup); }