void RSSEditPopup::SelectImagePopup(const QString &prefix, QObject &inst, const QString &returnEvent) { MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack"); MythUIFileBrowser *fb = new MythUIFileBrowser(popupStack, prefix); fb->SetNameFilter(GetSupportedImageExtensionFilter()); if (fb->Create()) { fb->SetReturnEvent(&inst, returnEvent); popupStack->AddScreen(fb); } else delete fb; }
void EditAlbumartDialog::startCopyImageToTag(void) { QString lastLocation = gCoreContext->GetSetting("MusicLastImageLocation", "/"); MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack"); MythUIFileBrowser *fb = new MythUIFileBrowser(popupStack, lastLocation); fb->SetTypeFilter(QDir::AllDirs | QDir::Files | QDir::Readable); QStringList filters; filters << "*.png" << "*.jpg" << "*.jpeg" << "*.gif"; fb->SetNameFilter(filters); if (fb->Create()) { fb->SetReturnEvent(this, "imagelocation"); popupStack->AddScreen(fb); } else delete fb; }