|
20 | 20 |
|
21 | 21 | import certifi
|
22 | 22 | import cv2
|
23 |
| -from PyQt6 import QtCore, QtGui, QtTest |
| 23 | +from PyQt6 import QtCore, QtGui |
| 24 | +from PyQt6.QtTest import QTest |
24 | 25 | from PyQt6.QtWidgets import QApplication, QFileDialog, QMainWindow, QMessageBox, QWidget
|
25 | 26 | from win32 import win32gui
|
26 | 27 | from AutoSplitImage import COMPARISON_RESIZE, AutoSplitImage, ImageType
|
@@ -343,13 +344,11 @@ def __start_image_function(self):
|
343 | 344 | delay_time_left = start_delay - (time() - delay_start_time)
|
344 | 345 | self.current_split_image.setText(
|
345 | 346 | f"Delayed Before Starting:\n {seconds_remaining_text(delay_time_left)}")
|
346 |
| - |
347 |
| - QtTest.QTest.qWait(1) # type: ignore |
| 347 | + QTest.qWait(1) |
348 | 348 |
|
349 | 349 | self.start_image_status_value_label.setText("started")
|
350 | 350 | send_command(self, "start")
|
351 |
| - |
352 |
| - QtTest.QTest.qWait(int(1 / self.settings_dict["fps_limit"])) # type: ignore |
| 351 | + QTest.qWait(int(1 / self.settings_dict["fps_limit"])) |
353 | 352 | self.start_auto_splitter()
|
354 | 353 |
|
355 | 354 | # update x, y, width, height when spinbox values are changed
|
@@ -605,8 +604,7 @@ def __auto_splitter(self):
|
605 | 604 |
|
606 | 605 | # limit the number of time the comparison runs to reduce cpu usage
|
607 | 606 | frame_interval: float = 1 / self.settings_dict["fps_limit"]
|
608 |
| - |
609 |
| - QtTest.QTest.qWait(int(frame_interval - (time() - start) % frame_interval)) # type: ignore |
| 607 | + QTest.qWait(int(frame_interval - (time() - start) % frame_interval)) |
610 | 608 | QApplication.processEvents()
|
611 | 609 |
|
612 | 610 | # comes here when threshold gets met
|
@@ -636,8 +634,7 @@ def __auto_splitter(self):
|
636 | 634 | capture = self.__get_capture_for_comparison()
|
637 | 635 | if self.__reset_if_should(capture):
|
638 | 636 | continue
|
639 |
| - |
640 |
| - QtTest.QTest.qWait(1) # type: ignore |
| 637 | + QTest.qWait(1) |
641 | 638 |
|
642 | 639 | self.waiting_for_split_delay = False
|
643 | 640 |
|
@@ -691,8 +688,7 @@ def __auto_splitter(self):
|
691 | 688 | send_command(self, "reset")
|
692 | 689 | self.reset()
|
693 | 690 | continue
|
694 |
| - |
695 |
| - QtTest.QTest.qWait(1) # type: ignore |
| 691 | + QTest.qWait(1) |
696 | 692 |
|
697 | 693 | # loop breaks to here when the last image splits
|
698 | 694 | self.gui_changes_on_reset()
|
|
0 commit comments