Skip to content

Commit 29358f9

Browse files
Added ShortCut to Say the position of aya listening.
1 parent def0b9d commit 29358f9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

ui/quran_interface.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ def __init__(self, title):
6262
self.set_shortcut()
6363

6464
def set_shortcut(self):
65+
QShortcut(QKeySequence("C"), self). \
66+
activated.connect(self.say_current_ayah)
6567
for i in range(0, 5):
6668
shortcut = QShortcut(QKeySequence(f"Ctrl+{i+1}"), self)
6769
shortcut.activated.connect(lambda mode=i: self.OnChangeNavigationMode(mode))
@@ -328,6 +330,10 @@ def OnAyahInfo(self, event):
328330
text = AyaInfo(aya_info[1]).text
329331
InfoDialog(self, title, label, text, is_html_content=True).exec()
330332

333+
def say_current_ayah(self):
334+
text = f"آية {self.toolbar.navigation.current_ayah} من سورة {self.toolbar.navigation.current_surah}"
335+
UniversalSpeech.say(text)
336+
331337
@exception_handler(ui_element=QMessageBox)
332338
def OnSaveBookmark(self, event):
333339

@@ -381,7 +387,6 @@ def OnSaveCurrentPosition(self):
381387
self.quran.current_pos
382388
)
383389

384-
385390
def OnSave_alert(self):
386391
UniversalSpeech.say("تم حفظ الموضع الحالي.")
387392
Globals.effects_manager.play("save")

0 commit comments

Comments
 (0)