comparison src/gui/pages/anime_list.cc @ 178:bc8d2ccff09c

win32/dark: use existing STL classes for dwmapi
author Paper <mrpapersonic@gmail.com>
date Mon, 04 Dec 2023 11:51:30 -0500
parents 39521c47c7a3
children 62e336597bb7
comparison
equal deleted inserted replaced
177:122fad646f81 178:bc8d2ccff09c
15 #include "core/strings.h" 15 #include "core/strings.h"
16 #include "core/time.h" 16 #include "core/time.h"
17 #include "gui/dialog/information.h" 17 #include "gui/dialog/information.h"
18 #include "gui/translate/anime.h" 18 #include "gui/translate/anime.h"
19 #include "services/services.h" 19 #include "services/services.h"
20
20 #include <QDebug> 21 #include <QDebug>
21 #include <QHBoxLayout> 22 #include <QHBoxLayout>
22 #include <QHeaderView> 23 #include <QHeaderView>
23 #include <QMenu> 24 #include <QMenu>
24 #include <QProgressBar> 25 #include <QProgressBar>
25 #include <QShortcut> 26 #include <QShortcut>
26 #include <QTreeView> 27 #include <QTreeView>
27 #include <QStylePainter> 28 #include <QStylePainter>
28 #include <QStyledItemDelegate> 29 #include <QStyledItemDelegate>
29 #include <QThreadPool> 30 #include <QThreadPool>
31
30 #include <set> 32 #include <set>
31 33
32 AnimeListPageSortFilter::AnimeListPageSortFilter(QObject* parent) : QSortFilterProxyModel(parent) { 34 AnimeListPageSortFilter::AnimeListPageSortFilter(QObject* parent) : QSortFilterProxyModel(parent) {
33 } 35 }
34 36
340 reinterpret_cast<AnimeListPageModel*>(sort_models[i]->sourceModel())->RefreshList(); 342 reinterpret_cast<AnimeListPageModel*>(sort_models[i]->sourceModel())->RefreshList();
341 } 343 }
342 344
343 void AnimeListPage::RefreshTabs() { 345 void AnimeListPage::RefreshTabs() {
344 for (unsigned int i = 0; i < sort_models.size(); i++) 346 for (unsigned int i = 0; i < sort_models.size(); i++)
345 tab_bar->setTabText(i, Strings::ToQString(Translate::ToString(Anime::ListStatuses[i])) + " (" + 347 tab_bar->setTabText(i, Strings::ToQString(Translate::ToString(Anime::ListStatuses[i]) + " (" +
346 QString::number(Anime::db.GetListsAnimeAmount(Anime::ListStatuses[i])) + ")"); 348 std::to_string(Anime::db.GetListsAnimeAmount(Anime::ListStatuses[i])) + ")"));
347 } 349 }
348 350
349 void AnimeListPage::Refresh() { 351 void AnimeListPage::Refresh() {
350 RefreshList(); 352 RefreshList();
351 RefreshTabs(); 353 RefreshTabs();