comparison src/gui/widgets/anime_info.cc @ 83:d02fdf1d6708

*: huuuge update 1. make the now playing page function correctly 2. de-constructorfy many of our custom widgets, allowing them to be changed on-the-fly from the Now Playing page 3. ... :)
author Paper <mrpapersonic@gmail.com>
date Tue, 24 Oct 2023 22:01:02 -0400
parents 8b65c417c225
children 80f49f623d30
comparison
equal deleted inserted replaced
82:8b65c417c225 83:d02fdf1d6708
24 SetAnime(anime); 24 SetAnime(anime);
25 } 25 }
26 26
27 void AnimeInfoWidget::SetAnime(const Anime::Anime& anime) { 27 void AnimeInfoWidget::SetAnime(const Anime::Anime& anime) {
28 /* alt titles */ 28 /* alt titles */
29 _title->GetLine()->setText(Strings::ToQString(Strings::Implode(anime.GetTitleSynonyms(), ", "))); 29 _title->GetLine()->SetText(Strings::ToQString(Strings::Implode(anime.GetTitleSynonyms(), ", ")));
30 30
31 /* details */ 31 /* details */
32 QString details_data; 32 QString details_data;
33 QTextStream details_data_s(&details_data); 33 QTextStream details_data_s(&details_data);
34 details_data_s << Translate::ToString(anime.GetFormat()).c_str() << "\n" 34 details_data_s << Translate::ToString(anime.GetFormat()).c_str() << "\n"
35 << anime.GetEpisodes() << "\n" 35 << anime.GetEpisodes() << "\n"
36 << Translate::ToString(anime.GetUserStatus()).c_str() << "\n" 36 << Translate::ToString(anime.GetUserStatus()).c_str() << "\n"
37 << Translate::ToString(anime.GetSeason()).c_str() << " " << anime.GetAirDate().GetYear() << "\n" 37 << Translate::ToString(anime.GetSeason()).c_str() << " " << anime.GetAirDate().GetYear() << "\n"
38 << Strings::Implode(anime.GetGenres(), ", ").c_str() << "\n" 38 << Strings::Implode(anime.GetGenres(), ", ").c_str() << "\n"
39 << anime.GetAudienceScore() << "%"; 39 << anime.GetAudienceScore() << "%";
40 _details->GetParagraph()->SetText(Strings::ToQString(Strings::Implode(anime.GetTitleSynonyms(), ", "))); 40 _details->GetParagraph()->SetText(details_data);
41 41
42 _synopsis->GetParagraph()->SetText(Strings::ToQString(Strings::Implode(anime.GetTitleSynonyms(), ", "))); 42 _synopsis->GetParagraph()->SetText(Strings::ToQString(anime.GetSynopsis()));
43
44 updateGeometry();
43 } 45 }
44 46
45 #include "gui/widgets/moc_anime_info.cpp" 47 #include "gui/widgets/moc_anime_info.cpp"