TargetBox
The widget that displays restoration target options is an instance of a class named TargetBox, defined in widgets.py. It has a set of two tabs that display different options for specifying targets.
The restoration targets are shown in a matrix with a selection widget next to each target name. The TargetBox widget has two tabs showing different types of selection widgets, either simple checkboxes (shown by a BasicTargetBox) or text entry widgets (shown by WeightedTargetBox).
Source code in src/tidegates/widgets.py
285 286 287 288 289 290 291 | |
selection()
Get a list of IDs of selected targets from the current target widget.
src/tidegates/widgets.py
293 294 295 296 297 | |
weights()
Get target weights from the current target widget.
src/tidegates/widgets.py
299 300 301 302 303 | |
BasicTargetBox
The BasicTargetBox widget displays a checkbox next to each target name.
Source code in src/tidegates/widgets.py
215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 | |
selection()
Return a list of IDs of selected targets.
src/tidegates/widgets.py
232 233 234 235 236 | |
weights()
There are no weights (all targets considered equally) so return an empty list.
src/tidegates/widgets.py
238 239 240 241 242 | |
WeightedTargetBox
A WeightedTargetBox shows a text entry widget next to each target to allow users to enter a numeric weight for the target.
Source code in src/tidegates/widgets.py
250 251 252 253 254 255 256 257 258 259 260 261 262 263 | |
selection()
Return a list of IDs of selected targets.
src/tidegates/widgets.py
265 266 267 268 269 | |
weights()
Return the text content of each non-empty text entry box.
src/tidegates/widgets.py
271 272 273 274 275 | |