-
Notifications
You must be signed in to change notification settings - Fork 0
hotfix: compatility libraries #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
882cf53
082e434
6403372
f196c29
aa0629a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -13,6 +13,7 @@ | |||||||||||||
| QLabel, | ||||||||||||||
| QLineEdit, | ||||||||||||||
| QMenu, | ||||||||||||||
| QProgressDialog, | ||||||||||||||
| QPushButton, | ||||||||||||||
| QRadioButton, | ||||||||||||||
| QScrollArea, | ||||||||||||||
|
|
@@ -22,6 +23,7 @@ | |||||||||||||
| QWidget, | ||||||||||||||
| ) | ||||||||||||||
|
|
||||||||||||||
| from ui.dialogs import BusyStatusDialog | ||||||||||||||
| from utils import resource_path | ||||||||||||||
|
|
||||||||||||||
|
|
||||||||||||||
|
|
@@ -303,6 +305,20 @@ def set_smart_state(self, predicted_label: str, confidence_score: float, is_smar | |||||||||||||
| def get_row_smart_widgets(self, label_text: str): | ||||||||||||||
| return self._smart_controls_by_label.get(str(label_text or "")) | ||||||||||||||
|
|
||||||||||||||
| def set_inference_loading(self, is_loading: bool): | ||||||||||||||
| self.btn_smart_infer.setEnabled(not is_loading) | ||||||||||||||
| self.btn_smart_infer.setText("Loading..." if is_loading else "Smart Inference") | ||||||||||||||
| for _conf_btn, accept_btn, reject_btn in self._smart_controls_by_label.values(): | ||||||||||||||
| accept_btn.setEnabled(not is_loading) | ||||||||||||||
| reject_btn.setEnabled(not is_loading) | ||||||||||||||
|
|
||||||||||||||
| def set_inference_loading(self, is_loading: bool): | ||||||||||||||
| self.btn_smart_infer.setEnabled(not is_loading) | ||||||||||||||
| self.btn_smart_infer.setText("Loading..." if is_loading else "Smart Inference") | ||||||||||||||
| for _conf_btn, accept_btn, reject_btn in self._smart_controls_by_label.values(): | ||||||||||||||
| accept_btn.setEnabled(not is_loading) | ||||||||||||||
| reject_btn.setEnabled(not is_loading) | ||||||||||||||
|
|
||||||||||||||
|
|
||||||||||||||
|
Comment on lines
+315
to
322
|
||||||||||||||
| def set_inference_loading(self, is_loading: bool): | |
| self.btn_smart_infer.setEnabled(not is_loading) | |
| self.btn_smart_infer.setText("Loading..." if is_loading else "Smart Inference") | |
| for _conf_btn, accept_btn, reject_btn in self._smart_controls_by_label.values(): | |
| accept_btn.setEnabled(not is_loading) | |
| reject_btn.setEnabled(not is_loading) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,7 @@ | |
| from PyQt6.QtWidgets import ( | ||
| QDialog, QVBoxLayout, QRadioButton, QTreeView, QDialogButtonBox, | ||
| QAbstractItemView, QGroupBox, QFormLayout, QLineEdit, QHBoxLayout, | ||
| QFrame, QListWidget, QComboBox, QPushButton, QLabel, | ||
| QFrame, QListWidget, QComboBox, QPushButton, QLabel, QProgressBar, | ||
| QMessageBox, QWidget, QListWidgetItem, QStyle, QButtonGroup, QScrollArea | ||
| ) | ||
| from PyQt6.QtCore import QDir, Qt, QSize | ||
|
|
@@ -132,3 +132,26 @@ def __init__(self, error_string: str, parent=None) -> None: | |
| self.setDetailedText(f"System Diagnostic Logs:\n{error_string}") | ||
|
|
||
| self.setStandardButtons(QMessageBox.StandardButton.Ok) | ||
|
|
||
|
|
||
| class BusyStatusDialog(QDialog): | ||
| def __init__(self, title: str, message: str, parent=None) -> None: | ||
| super().__init__(parent) | ||
| self.setWindowTitle(title) | ||
| self.setModal(True) | ||
|
|
||
| layout = QVBoxLayout(self) | ||
|
|
||
| self._label = QLabel(message, self) | ||
| self._label.setWordWrap(True) | ||
| layout.addWidget(self._label) | ||
|
|
||
| self._progress = QProgressBar(self) | ||
| self._progress.setRange(0, 0) | ||
| self._progress.setTextVisible(False) | ||
| layout.addWidget(self._progress) | ||
|
|
||
| self.setMinimumWidth(320) | ||
|
|
||
|
Comment on lines
+137
to
+155
|
||
| def set_message(self, message: str) -> None: | ||
| self._label.setText(message) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,11 @@ | ||
| PyQt6 | ||
| pyinstaller | ||
| torch-geometric==2.7.0 | ||
| opensportslib | ||
| opensportslib==0.1.1 | ||
| datasets==4.8.2 | ||
| imageio-ffmpeg==0.6.0 | ||
| lightning==2.6.1 | ||
| tabulate==0.10.0 | ||
| wandb | ||
| pytest | ||
| pytest-qt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QProgressDialogis imported but not used anywhere in this module. Please remove the unused import to avoid confusion and keep the dependency surface minimal.