diff --git a/src/interface/desktop/configure_screen.py b/src/interface/desktop/configure_screen.py index 3472938e..75286408 100644 --- a/src/interface/desktop/configure_screen.py +++ b/src/interface/desktop/configure_screen.py @@ -38,7 +38,7 @@ class ConfigureScreen(QtWidgets.QDialog): search_type_settings = QtWidgets.QWidget() search_type_layout = QtWidgets.QVBoxLayout(search_type_settings) - enable_search_type = QtWidgets.QCheckBox(f"Search {search_type.name}") + enable_search_type = CheckBox(f"Search {search_type.name}", search_type) input_files = FileBrowser(f'{search_type.name} Files', search_type) input_files.setEnabled(enable_search_type.isChecked()) @@ -72,3 +72,9 @@ class ConfigureScreen(QtWidgets.QDialog): print(f"{child.text()} is disabled") elif isinstance(child, FileBrowser): print(f"{child.search_type} files are {child.getPaths()}") + + +class CheckBox(QtWidgets.QCheckBox): + def __init__(self, text, search_type: SearchType, parent=None): + self.search_type = search_type + super(CheckBox, self).__init__(text, parent=parent) \ No newline at end of file diff --git a/src/interface/desktop/file_browser.py b/src/interface/desktop/file_browser.py index a924a771..df6e60a8 100644 --- a/src/interface/desktop/file_browser.py +++ b/src/interface/desktop/file_browser.py @@ -5,6 +5,7 @@ from PyQt6.QtCore import QDir # Internal Packages from src.utils.config import SearchType + class FileBrowser(QtWidgets.QWidget): def __init__(self, title, search_type: SearchType=None): QtWidgets.QWidget.__init__(self)