cellects.gui.required_output
cellects.gui.required_output
Widget for configuring Cellects analysis variables and descriptors.
This GUI module provides checkboxes to select raw data outputs (presence/absence coordinates, contours, tubular networks) and dynamic descriptors calculated per time frame. User selections are saved via parent object's background thread when 'Ok' is clicked. Includes categorized sections with grouped options for clarity of specimen tracking parameters.
Main Components
RequiredOutput : QWidget for configuring required output variables
Notes
Saves user selections using parent object's SaveAllVars QThread.
RequiredOutput
Bases: WindowType
Source code in src/cellects/gui/required_output.py
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 | |
__init__(parent, night_mode)
Initialize the RequiredOutput 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.required_output import RequiredOutput
>>> import sys
>>> app = QtWidgets.QApplication([])
>>> parent = CellectsMainWidget()
>>> session = RequiredOutput(parent, False)
>>> parent.insertWidget(0, session)
>>> parent.show()
>>> sys.exit(app.exec())
Source code in src/cellects/gui/required_output.py
cancel_is_clicked()
Instead of saving the widgets values to the saved states, use the saved states to fill in the widgets.
This function updates the state of several checkboxes based on saved variables and descriptors. It also changes the active widget to either the first or third widget depending on a condition.
Source code in src/cellects/gui/required_output.py
create_check_boxes_table()
Create and populate a table of checkboxes for descriptors in the parent object.
This function initializes or updates the descriptors and iterates through them to create a table of checkboxes, arranging them in a grid layout. The arrangement depends on the total number of descriptors and their visibility.
Notes
The layout of checkboxes changes based on the number of descriptors.
Source code in src/cellects/gui/required_output.py
ok_is_clicked()
Updates the parent object's variables and descriptor states based on UI checkboxes.
This method updates various variables and descriptor states in the parent object based on the current state of checkboxes in the UI. It also starts a thread to save all variables and updates the output list accordingly.
Notes
This method does not return any value. It updates the internal state of the parent object, which saves all user defined parameters.
Source code in src/cellects/gui/required_output.py
true_init()
Initialize the RequiredOutput window with various checkboxes and buttons.
This method sets up the entire UI layout for the RequiredOutput window, including a title, checkboxes for saving different types of coordinates and descriptors, and 'Cancel' and 'Ok' buttons.
Notes
This method assumes that the parent widget has a 'po' attribute with specific settings and variables.
Source code in src/cellects/gui/required_output.py
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 | |