dev #21
@@ -270,6 +270,9 @@ class Ui(Ui_Semesterapparat):
|
||||
self.player = QMediaPlayer()
|
||||
self.audio_output = QAudioOutput()
|
||||
|
||||
self.status_progress = QtWidgets.QProgressBar()
|
||||
self.statusBar.addWidget(self.status_progress)
|
||||
self.status_progress.hide()
|
||||
self.valid_check_semester.clicked.connect(self.display_valid_semester) # type:ignore
|
||||
|
||||
def create_doc(self):
|
||||
@@ -370,6 +373,15 @@ class Ui(Ui_Semesterapparat):
|
||||
self.calendarWidget.setMessages([data])
|
||||
self.calendarWidget.updateCells()
|
||||
|
||||
def status_bar_progress(self, current: int, total: int):
|
||||
self.status_progress.setRange(0, total)
|
||||
self.status_progress.setValue(current)
|
||||
if current == total:
|
||||
self.status_progress.hide()
|
||||
self.status_progress.setValue(0)
|
||||
else:
|
||||
self.status_progress.show()
|
||||
|
||||
def tabW1_changed(self):
|
||||
if self.tabWidget.currentIndex() == 1: # Statistics
|
||||
stats_layout = self.search_statistics.layout()
|
||||
@@ -384,6 +396,7 @@ class Ui(Ui_Semesterapparat):
|
||||
statistics.apparat_open.connect(self.open_apparat)
|
||||
statistics.refreshSignal.connect(self.update_apparat_list)
|
||||
statistics.updateCalendar.connect(self.update_calendar)
|
||||
statistics.status_update.connect(self.status_bar_progress)
|
||||
stats_layout.addWidget(statistics)
|
||||
|
||||
# #log.debug("searchpage")
|
||||
@@ -1658,7 +1671,7 @@ class Ui(Ui_Semesterapparat):
|
||||
for row in range(self.tableWidget_apparat_media.rowCount())
|
||||
] # type: ignore
|
||||
prof_id = self.db.getProfId(self.profdata) # type: ignore
|
||||
app_id = self.active_apparat
|
||||
app_id = self.db.getId(self.app_name.text()) # type: ignore
|
||||
books: List[Tuple[int, BookData]] = []
|
||||
for signature in signatures:
|
||||
book = self.db.getBookBasedOnSignature(
|
||||
@@ -1667,7 +1680,7 @@ class Ui(Ui_Semesterapparat):
|
||||
prof_id=prof_id,
|
||||
)
|
||||
book_id = self.db.getBookIdBasedOnSignature(
|
||||
self.active_apparat,
|
||||
app_id,
|
||||
prof_id,
|
||||
signature,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user