bool EditRomInfoDialog::Create() { if (!LoadWindowFromXML("game-ui.xml", "edit_metadata", this)) return false; bool err = false; UIUtilE::Assign(this, m_gamenameEdit, "title_edit", &err); UIUtilE::Assign(this, m_genreEdit, "genre_edit", &err); UIUtilE::Assign(this, m_yearEdit, "year_edit", &err); UIUtilE::Assign(this, m_countryEdit, "country_edit", &err); UIUtilE::Assign(this, m_plotEdit, "description_edit", &err); UIUtilE::Assign(this, m_publisherEdit, "publisher_edit", &err); UIUtilE::Assign(this, m_favoriteCheck, "favorite_check", &err); UIUtilE::Assign(this, m_screenshotButton, "screenshot_button", &err); UIUtilE::Assign(this, m_screenshotText, "screenshot_text", &err); UIUtilE::Assign(this, m_fanartButton, "fanart_button", &err); UIUtilE::Assign(this, m_fanartText, "fanart_text", &err); UIUtilE::Assign(this, m_boxartButton, "coverart_button", &err); UIUtilE::Assign(this, m_boxartText, "coverart_text", &err); UIUtilE::Assign(this, m_doneButton, "done_button", &err); if (err) { VERBOSE(VB_IMPORTANT, "Cannot load screen 'edit_metadata'"); return false; } fillWidgets(); BuildFocusList(); connect(m_gamenameEdit, SIGNAL(valueChanged()), SLOT(SetGamename())); connect(m_genreEdit, SIGNAL(valueChanged()), SLOT(SetGenre())); connect(m_yearEdit, SIGNAL(valueChanged()), SLOT(SetYear())); connect(m_countryEdit, SIGNAL(valueChanged()), SLOT(SetCountry())); connect(m_plotEdit, SIGNAL(valueChanged()), SLOT(SetPlot())); connect(m_publisherEdit, SIGNAL(valueChanged()), SLOT(SetPublisher())); connect(m_favoriteCheck, SIGNAL(valueChanged()), SLOT(ToggleFavorite())); connect(m_screenshotButton, SIGNAL(Clicked()), SLOT(FindScreenshot())); connect(m_fanartButton, SIGNAL(Clicked()), SLOT(FindFanart())); connect(m_boxartButton, SIGNAL(Clicked()), SLOT(FindBoxart())); connect(m_doneButton, SIGNAL(Clicked()), SLOT(SaveAndExit())); return true; }
bool EditMetadataDialog::Create() { if (!LoadWindowFromXML("video-ui.xml", "edit_metadata", this)) return false; bool err = false; UIUtilE::Assign(this, m_titleEdit, "title_edit", &err); UIUtilE::Assign(this, m_subtitleEdit, "subtitle_edit", &err); UIUtilE::Assign(this, m_playerEdit, "player_edit", &err); UIUtilE::Assign(this, m_seasonSpin, "season", &err); UIUtilE::Assign(this, m_episodeSpin, "episode", &err); UIUtilE::Assign(this, m_categoryList, "category_select", &err); UIUtilE::Assign(this, m_levelList, "level_select", &err); UIUtilE::Assign(this, m_childList, "child_select", &err); UIUtilE::Assign(this, m_browseCheck, "browse_check", &err); UIUtilE::Assign(this, m_watchedCheck, "watched_check", &err); UIUtilE::Assign(this, m_doneButton, "done_button", &err); if (err) { LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'edit_metadata'"); return false; } UIUtilW::Assign(this, m_coverartText, "coverart_text"); UIUtilW::Assign(this, m_screenshotText, "screenshot_text"); UIUtilW::Assign(this, m_bannerText, "banner_text"); UIUtilW::Assign(this, m_fanartText, "fanart_text"); UIUtilW::Assign(this, m_trailerText, "trailer_text"); UIUtilW::Assign(this, m_coverartButton, "coverart_button"); UIUtilW::Assign(this, m_bannerButton, "banner_button"); UIUtilW::Assign(this, m_fanartButton, "fanart_button"); UIUtilW::Assign(this, m_screenshotButton, "screenshot_button"); UIUtilW::Assign(this, m_trailerButton, "trailer_button"); UIUtilW::Assign(this, m_netBannerButton, "net_banner_button"); UIUtilW::Assign(this, m_netFanartButton, "net_fanart_button"); UIUtilW::Assign(this, m_netScreenshotButton, "net_screenshot_button"); UIUtilW::Assign(this, m_netCoverartButton, "net_coverart_button"); UIUtilW::Assign(this, m_taglineEdit, "tagline_edit"); UIUtilW::Assign(this, m_ratingEdit, "rating_edit"); UIUtilW::Assign(this, m_directorEdit, "director_edit"); UIUtilW::Assign(this, m_inetrefEdit, "inetref_edit"); UIUtilW::Assign(this, m_homepageEdit, "homepage_edit"); UIUtilW::Assign(this, m_plotEdit, "description_edit"); UIUtilW::Assign(this, m_yearSpin, "year_spin"); UIUtilW::Assign(this, m_userRatingSpin, "userrating_spin"); UIUtilW::Assign(this, m_lengthSpin, "length_spin"); UIUtilW::Assign(this, m_coverart, "coverart"); UIUtilW::Assign(this, m_screenshot, "screenshot"); UIUtilW::Assign(this, m_banner, "banner"); UIUtilW::Assign(this, m_fanart, "fanart"); fillWidgets(); BuildFocusList(); connect(m_titleEdit, SIGNAL(valueChanged()), SLOT(SetTitle())); m_titleEdit->SetMaxLength(128); connect(m_subtitleEdit, SIGNAL(valueChanged()), SLOT(SetSubtitle())); m_subtitleEdit->SetMaxLength(0); connect(m_playerEdit, SIGNAL(valueChanged()), SLOT(SetPlayer())); if (m_taglineEdit) { connect(m_taglineEdit, SIGNAL(valueChanged()), SLOT(SetTagline())); m_taglineEdit->SetMaxLength(255); } if (m_ratingEdit) { connect(m_ratingEdit, SIGNAL(valueChanged()), SLOT(SetRating())); m_ratingEdit->SetMaxLength(128); } if (m_directorEdit) { connect(m_directorEdit, SIGNAL(valueChanged()), SLOT(SetDirector())); m_directorEdit->SetMaxLength(128); } if (m_inetrefEdit) connect(m_inetrefEdit, SIGNAL(valueChanged()), SLOT(SetInetRef())); if (m_homepageEdit) { connect(m_homepageEdit, SIGNAL(valueChanged()), SLOT(SetHomepage())); m_homepageEdit->SetMaxLength(0); } if (m_plotEdit) { connect(m_plotEdit, SIGNAL(valueChanged()), SLOT(SetPlot())); m_plotEdit->SetMaxLength(0); } connect(m_seasonSpin, SIGNAL(LosingFocus()), SLOT(SetSeason())); connect(m_episodeSpin, SIGNAL(LosingFocus()), SLOT(SetEpisode())); if (m_yearSpin) connect(m_yearSpin, SIGNAL(LosingFocus()), SLOT(SetYear())); if (m_userRatingSpin) connect(m_userRatingSpin, SIGNAL(LosingFocus()), SLOT(SetUserRating())); if (m_lengthSpin) connect(m_lengthSpin, SIGNAL(LosingFocus()), SLOT(SetLength())); connect(m_doneButton, SIGNAL(Clicked()), SLOT(SaveAndExit())); // Find Artwork locally if (m_coverartButton) connect(m_coverartButton, SIGNAL(Clicked()), SLOT(FindCoverArt())); if (m_bannerButton) connect(m_bannerButton, SIGNAL(Clicked()), SLOT(FindBanner())); if (m_fanartButton) connect(m_fanartButton, SIGNAL(Clicked()), SLOT(FindFanart())); if (m_screenshotButton) connect(m_screenshotButton, SIGNAL(Clicked()), SLOT(FindScreenshot())); // Find Artwork on the Internet if (m_netCoverartButton) connect(m_netCoverartButton, SIGNAL(Clicked()), SLOT(FindNetCoverArt())); if (m_netBannerButton) connect(m_netBannerButton, SIGNAL(Clicked()), SLOT(FindNetBanner())); if (m_netFanartButton) connect(m_netFanartButton, SIGNAL(Clicked()), SLOT(FindNetFanart())); if (m_netScreenshotButton) connect(m_netScreenshotButton, SIGNAL(Clicked()), SLOT(FindNetScreenshot())); if (m_trailerButton) connect(m_trailerButton, SIGNAL(Clicked()), SLOT(FindTrailer())); connect(m_browseCheck, SIGNAL(valueChanged()), SLOT(ToggleBrowse())); connect(m_watchedCheck, SIGNAL(valueChanged()), SLOT(ToggleWatched())); connect(m_childList, SIGNAL(itemSelected(MythUIButtonListItem*)), SLOT(SetChild(MythUIButtonListItem*))); connect(m_levelList, SIGNAL(itemSelected(MythUIButtonListItem*)), SLOT(SetLevel(MythUIButtonListItem*))); connect(m_categoryList, SIGNAL(itemSelected(MythUIButtonListItem*)), SLOT(SetCategory(MythUIButtonListItem*))); connect(m_categoryList, SIGNAL(itemClicked(MythUIButtonListItem*)), SLOT(NewCategoryPopup())); return true; }