Mercurial > minori
comparison src/gui/pages/seasons.cc @ 326:10096c5489e3
anime/db: refactor anime_season_db out
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Thu, 13 Jun 2024 00:42:00 -0400 |
parents | 78929794e7d8 |
children | b5d6c27c308f |
comparison
equal
deleted
inserted
replaced
325:78929794e7d8 | 326:10096c5489e3 |
---|---|
1 #include "gui/pages/seasons.h" | 1 #include "gui/pages/seasons.h" |
2 | 2 |
3 #include "core/anime_db.h" | 3 #include "core/anime_db.h" |
4 #include "core/anime_season_db.h" | |
5 #include "core/strings.h" | 4 #include "core/strings.h" |
6 #include "gui/widgets/anime_button.h" | 5 #include "gui/widgets/anime_button.h" |
7 #include "gui/translate/anime.h" | 6 #include "gui/translate/anime.h" |
8 #include "services/services.h" | 7 #include "services/services.h" |
9 | 8 |
60 if (!buttons || !season_button) | 59 if (!buttons || !season_button) |
61 return; | 60 return; |
62 | 61 |
63 buttons->clear(); | 62 buttons->clear(); |
64 | 63 |
65 for (const auto& id : Anime::Season::GetAllAnimeForSeason(season_, year_)) { | 64 for (const auto& id : Anime::db.GetAllAnimeForSeason(season_, year_)) { |
66 QListWidgetItem* item = new QListWidgetItem; | 65 QListWidgetItem* item = new QListWidgetItem; |
67 AnimeButton* button = new AnimeButton(this); | 66 AnimeButton* button = new AnimeButton(this); |
68 button->SetAnime(Anime::db.items[id]); | 67 button->SetAnime(Anime::db.items[id]); |
69 item->setSizeHint(button->sizeHint()); | 68 item->setSizeHint(button->sizeHint()); |
70 buttons->addItem(item); | 69 buttons->addItem(item); |