comparison src/gui/window.cpp @ 15:cde8f67a7c7d

*: update, megacommit :)
author Paper <mrpapersonic@gmail.com>
date Tue, 19 Sep 2023 22:36:08 -0400
parents 4b198a111713
children 2743011a6042
comparison
equal deleted inserted replaced
14:a29c9402faf0 15:cde8f67a7c7d
1 #include "gui/window.h" 1 #include "gui/window.h"
2 #include "core/config.h" 2 #include "core/config.h"
3 #include "core/session.h" 3 #include "core/session.h"
4 #include "services/services.h"
5 #include "gui/dialog/settings.h" 4 #include "gui/dialog/settings.h"
6 #include "gui/pages/anime_list.h" 5 #include "gui/pages/anime_list.h"
7 #include "gui/pages/now_playing.h" 6 #include "gui/pages/now_playing.h"
8 #include "gui/pages/statistics.h" 7 #include "gui/pages/statistics.h"
9 #include "gui/sidebar.h" 8 #include "gui/sidebar.h"
10 #include "gui/ui_utils.h" 9 #include "gui/ui_utils.h"
10 #include "services/services.h"
11 #include <QApplication> 11 #include <QApplication>
12 #include <QFile> 12 #include <QFile>
13 #include <QMainWindow> 13 #include <QMainWindow>
14 #include <QMenuBar> 14 #include <QMenuBar>
15 #include <QPlainTextEdit> 15 #include <QPlainTextEdit>
16 #include <QStackedWidget> 16 #include <QStackedWidget>
17 #include <QTextStream> 17 #include <QTextStream>
18 #if MACOSX 18 #if MACOSX
19 #include "sys/osx/dark_theme.h" 19 # include "sys/osx/dark_theme.h"
20 #elif WIN32 20 #elif WIN32
21 #include "sys/win32/dark_theme.h" 21 # include "sys/win32/dark_theme.h"
22 #endif 22 #endif
23
24 /* note that this code was originally created for use in
25 wxWidgets, but I thought the API was a little meh, so
26 I switched to Qt. */
27 23
28 enum class Pages { 24 enum class Pages {
29 NOW_PLAYING, 25 NOW_PLAYING,
30 26
31 ANIME_LIST, 27 ANIME_LIST,
84 action = menu->addAction("E&xit", qApp, &QApplication::quit); 80 action = menu->addAction("E&xit", qApp, &QApplication::quit);
85 81
86 menu = menubar->addMenu("&Services"); 82 menu = menubar->addMenu("&Services");
87 action = menu->addAction("Synchronize &list", [this, stack] { 83 action = menu->addAction("Synchronize &list", [this, stack] {
88 Services::Synchronize(); 84 Services::Synchronize();
89 ((AnimeListWidget*)stack->widget((int)Pages::ANIME_LIST))->RefreshList(); 85 ((AnimeListWidget*)stack->widget((int)Pages::ANIME_LIST))->Refresh();
90 }); 86 });
91 87
92 menu->addSeparator(); 88 menu->addSeparator();
93 89
94 submenu = menu->addMenu("&AniList"); 90 submenu = menu->addMenu("&AniList");