-
Notifications
You must be signed in to change notification settings - Fork 0
/
checking.py
71 lines (63 loc) · 2.26 KB
/
checking.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
def handleRowDoubleClick(self, item):
print("inside handle row double clicking method")
row = None
if not item:
print("if not item")
return
if item.text():
print("item.text()")
if "Album Title: " in item.text():
print("album title")
return
else:
print("else")
self.item = item
self.songTableWidget.song_playing_row = row
self.lrcPlayer.started_player = True
if self.get_music_file_from_click(item):
self.song_initializing_stuff()
else:
return
else:
return
try:
row = item.row()
print("row")
print(row)
except AttributeError:
return
if self.hidden_rows:
self.songTableWidget.clearSelection()
self.restore_table()
self.songTableWidget.setFocus()
self.songTableWidget.scroll_to_current_row()
simulate_keypress(self.songTableWidget, Qt.Key.Key_G) # only imitation of key press work.
# Direct calling the method doesn't work. IDk why.
self.hidden_rows = False
def handleRowDoubleClick(self, item):
row = None
try:
row = item.row()
except AttributeError:
return
if item:
if "Album Title: " in item.text():
return
else:
self.item = item
self.songTableWidget.song_playing_row = row
self.lrcPlayer.started_player = True
if self.get_music_file_from_click(item):
self.song_initializing_stuff()
else:
return
else:
return
if self.hidden_rows:
self.songTableWidget.clearSelection()
self.restore_table()
self.songTableWidget.setFocus()
self.songTableWidget.scroll_to_current_row()
simulate_keypress(self.songTableWidget, Qt.Key.Key_G) # only imitation of key press work.
# Direct calling the method doesn't work. IDk why.
self.hidden_rows = False