diff src/gui/window.cpp @ 48:e613772f41d5

statistics.cpp: show requests made
author Paper <mrpapersonic@gmail.com>
date Mon, 25 Sep 2023 01:07:22 -0400
parents d0adc4aedfc8
children 75c804f713b2
line wrap: on
line diff
--- a/src/gui/window.cpp	Mon Sep 25 00:43:38 2023 -0400
+++ b/src/gui/window.cpp	Mon Sep 25 01:07:22 2023 -0400
@@ -68,15 +68,21 @@
 	QAction* action;
 	QMenuBar* menubar = new QMenuBar(parent);
 	QMenu* menu = menubar->addMenu("&File");
+
 	QMenu* submenu = menu->addMenu("&Library folders");
 	action = submenu->addAction("&Add new folder...");
+
 	action = menu->addAction("&Scan available episodes");
 
 	menu->addSeparator();
 
 	action = menu->addAction("Play &next episode");
+	action->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_N));
 	action = menu->addAction("Play &random episode");
+	action->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_R));
+
 	menu->addSeparator();
+
 	action = menu->addAction("E&xit", qApp, &QApplication::quit);
 
 	menu = menubar->addMenu("&Services");
@@ -84,6 +90,7 @@
 		Services::Synchronize();
 		((AnimeListWidget*)stack->widget((int)Pages::ANIME_LIST))->Refresh();
 	});
+	action->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_S));
 
 	menu->addSeparator();
 
@@ -131,19 +138,32 @@
 	pages_group->setExclusive(true);
 
 	action = pages_group->addAction(menu->addAction("&Now Playing"));
+	action->setCheckable(true);
 	page_to_index_map[action] = 0;
+
 	action = pages_group->addAction(menu->addAction("&Anime List"));
 	page_to_index_map[action] = 1;
+
+	action->setCheckable(true);
 	action->setChecked(true);
 	action = pages_group->addAction(menu->addAction("&History"));
+	action->setCheckable(true);
 	page_to_index_map[action] = 2;
+
 	action = pages_group->addAction(menu->addAction("&Statistics"));
+	action->setCheckable(true);
 	page_to_index_map[action] = 3;
+
 	action = pages_group->addAction(menu->addAction("S&earch"));
+	action->setCheckable(true);
 	page_to_index_map[action] = 4;
+
 	action = pages_group->addAction(menu->addAction("Se&asons"));
+	action->setCheckable(true);
 	page_to_index_map[action] = 5;
+
 	action = pages_group->addAction(menu->addAction("&Torrents"));
+	action->setCheckable(true);
 	page_to_index_map[action] = 6;
 
 	connect(pages_group, &QActionGroup::triggered, this, [page_to_index_map, stack](QAction* action) {
@@ -155,6 +175,8 @@
 			default: break;
 		}
 	});
+	menu->addSeparator();
+	menu->addAction("Show sidebar");
 
 	menu = menubar->addMenu("&Help");
 	action = menu->addAction("About &Qt", qApp, [this] { qApp->aboutQt(); });