comparison src/gui/pages/seasons.cc @ 304:2115488eb302

*: add very early season searcher
author Paper <paper@paper.us.eu.org>
date Mon, 13 May 2024 17:02:35 -0400
parents b82841e76e79
children 78929794e7d8
comparison
equal deleted inserted replaced
303:ab7ff259b4ca 304:2115488eb302
3 #include "core/anime_db.h" 3 #include "core/anime_db.h"
4 #include "core/anime_season_db.h" 4 #include "core/anime_season_db.h"
5 #include "core/strings.h" 5 #include "core/strings.h"
6 #include "gui/widgets/anime_button.h" 6 #include "gui/widgets/anime_button.h"
7 #include "gui/translate/anime.h" 7 #include "gui/translate/anime.h"
8 #include "services/services.h"
8 9
9 #include <QDate> 10 #include <QDate>
10 #include <QFrame> 11 #include <QFrame>
11 #include <QListWidget> 12 #include <QListWidget>
12 #include <QListWidgetItem> 13 #include <QListWidgetItem>
95 toolbar->addWidget(season_button); 96 toolbar->addWidget(season_button);
96 } 97 }
97 98
98 toolbar->addSeparator(); 99 toolbar->addSeparator();
99 100
100 { toolbar->addAction(QIcon(":/icons/16x16/arrow-circle-315.png"), tr("Refresh data")); } 101 {
102 toolbar->addAction(QIcon(":/icons/16x16/arrow-circle-315.png"), tr("Refresh data"), [this]{
103 Services::GetSeason(Anime::SeriesSeason::Summer, 2011U);
104 SetSeason(Anime::SeriesSeason::Summer, 2011U);
105 });
106 }
101 107
102 toolbar->addSeparator(); 108 toolbar->addSeparator();
103 109
104 { 110 {
105 QToolButton* button = new QToolButton(toolbar); 111 QToolButton* button = new QToolButton(toolbar);
183 189
184 full_layout->setContentsMargins(0, 0, 0, 0); 190 full_layout->setContentsMargins(0, 0, 0, 0);
185 full_layout->setSpacing(0); 191 full_layout->setSpacing(0);
186 192
187 /* Do NOT move this up in this function, buttons HAS to be initialized */ 193 /* Do NOT move this up in this function, buttons HAS to be initialized */
188 SetSeason(Anime::SeriesSeason::Summer, 2011); 194 SetSeason(Anime::SeriesSeason::Summer, 2011U);
189 } 195 }