From 1d9abe65426d41e924fa601ff3455c8816e07c09 Mon Sep 17 00:00:00 2001 From: ZeinabBahaa <86147979+ZeinabBahaa@users.noreply.github.com> Date: Wed, 18 Dec 2024 16:33:44 +0200 Subject: [PATCH] Added Replay feature. --- ui/widgets/menu_bar.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ui/widgets/menu_bar.py b/ui/widgets/menu_bar.py index f62ee92..44d4ab4 100644 --- a/ui/widgets/menu_bar.py +++ b/ui/widgets/menu_bar.py @@ -80,6 +80,10 @@ def create_menu(self): self.forward_action = QAction("تقديم", self) self.forward_action.setShortcuts([QKeySequence("L"), QKeySequence("Ctrl+Alt+Right")]) self.forward_action.triggered.connect(lambda: self.parent.toolbar.player.forward(SettingsManager.current_settings["listening"]["forward_time"])) + self.replay_action = QAction("إعادة", self) + self.replay_action.setShortcut(QKeySequence("Ctrl+J")) + self.replay_action.triggered.connect(lambda: self.parent.toolbar.player.rewind(500)) + self.play_next_action = QAction("تشغيل الآية التالية", self) self.play_next_action.setShortcut(QKeySequence("Ctrl+Shift+N")) self.play_next_action.setEnabled(False) @@ -93,9 +97,11 @@ def create_menu(self): player_menu.addAction(self.stop_action) player_menu.addAction(self.rewind_action) player_menu.addAction(self.forward_action) + player_menu.addAction(self.replay_action) player_menu.addAction(self.play_next_action) player_menu.addAction(self.play_previous_action) + actions_menu = self.addMenu("الإجرائات(&A)") self.save_position_action = QAction("حفظ الموضع الحالي", self) self.save_position_action.setShortcut(QKeySequence("Ctrl+S"))