cellects.gui.if_several_folders_window
cellects.gui.if_several_folders_window
GUI window for selecting folders when multiple options exist in Cellects analysis workflow.
This module implements a second-stage GUI dialog that appears when multiple experiment folders are available. It provides an interface for folder selection via checkboxes and table visualization, with navigation controls to proceed to image analysis or return to prior steps. Includes thread-safe background operations for loading data without freezing the UI.
Main Components IfSeveralFoldersWindow : QWidget subclass managing folder selection and analysis workflow navigation
IfSeveralFoldersWindow
Bases: WindowType
Second window of the Cellects GUI, only appears when there are multiple folders.
Source code in src/cellects/gui/if_several_folders_window.py
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 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 | |
Run_all_directly_is_clicked()
Run the "Run all directly" operation in the parent window.
This function triggers the execution of the "Run all directly" functionality by calling the corresponding method in the parent window and then updates the state accordingly.
Source code in src/cellects/gui/if_several_folders_window.py
Video_analysis_window_is_clicked()
Save the identity of the current widget (for future navigation) and change to the video analysis window.
Source code in src/cellects/gui/if_several_folders_window.py
__init__(parent, night_mode)
Initialize the IfSeveralFolders window with a parent widget and night mode setting.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
parent
|
QWidget
|
The parent widget to which this window will be attached. |
required |
night_mode
|
bool
|
A boolean indicating whether the night mode should be enabled. |
required |
Examples:
>>> from PySide6 import QtWidgets
>>> from cellects.gui.cellects import CellectsMainWidget
>>> from cellects.gui.if_several_folders_window import IfSeveralFoldersWindow
>>> import sys
>>> app = QtWidgets.QApplication([])
>>> parent = CellectsMainWidget()
>>> session = IfSeveralFoldersWindow(parent, False)
>>> session.true_init()
>>> parent.insertWidget(0, session)
>>> parent.show()
>>> sys.exit(app.exec())
Source code in src/cellects/gui/if_several_folders_window.py
checked()
Check or uncheck all entries in the tableau based on checkbox state.
If the associated checkbox is checked, select all items in the tableau. Otherwise, clear the selection.
Source code in src/cellects/gui/if_several_folders_window.py
first_folder_loaded(first_exp_ready_to_run)
Set the visibility of widgets and messages based on whether data is found.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
first_exp_ready_to_run
|
bool
|
Indicates if the one_experiment data is ready to be run. |
required |
Source code in src/cellects/gui/if_several_folders_window.py
instantiates_widgets_and_do_image_analysis()
Source code in src/cellects/gui/if_several_folders_window.py
item_selection_changed()
Update the checkbox state based on the number of selected items.
Source code in src/cellects/gui/if_several_folders_window.py
next_is_clicked()
Handles the logic for when a "Next" button is clicked in the interface, leading to the ImageAnalysisWindow.
If self.next_clicked_once is True, instanties widgets and performs image analysis.
Otherwise, checks for selected folders and samples. Updates internal state and starts
a thread for loading the first folder if multiple folders are selected.
Notes
This function updates the internal state based on user selection and starts a thread
for loading data. The self.parent().po.update_folder_id method is called to update
folder IDs.
Source code in src/cellects/gui/if_several_folders_window.py
previous_is_clicked()
Handles the logic for when a "Previous" button is clicked in the interface, leading to the FirstWindow.
It modifies internal state to force the decision between IfSeveralFoldersWindow and ImageAnalysisWindow to be done once again if the user clicks on the "Next" button of the FirstWindow.
Source code in src/cellects/gui/if_several_folders_window.py
true_init()
Initialize the IfSeveralFoldersWindow with UI components and settings.
Extended Description
This method sets up the user interface for the IfSeveralFoldersWindow, including labels, a table widget for folders and sample sizes, checkboxes, buttons for video analysis and running tasks directly, and navigation buttons for previous and next steps. The window supports multiple folder selection and provides a means to control the analysis process.
Notes
This method assumes that the parent widget has a 'po' attribute with specific settings and variables.
Source code in src/cellects/gui/if_several_folders_window.py
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | |