Changeset 6137b150 in sasview for calculatorview/perspectives/calculator/collimation_editor.py
- Timestamp:
- Jun 9, 2010 4:45:37 PM (14 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 1b43306
- Parents:
- 16f60cb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
calculatorview/perspectives/calculator/collimation_editor.py
rc5dca87 r6137b150 22 22 23 23 class CollimationDialog(wx.Dialog): 24 """ 25 """ 24 26 def __init__(self, parent=None, manager=None, 25 27 collimation=[], *args, **kwds): … … 40 42 def _define_structure(self): 41 43 """ 42 44 define initial sizer 43 45 """ 44 46 self.main_sizer = wx.BoxSizer(wx.VERTICAL) … … 63 65 def _layout_collimation(self): 64 66 """ 65 67 Do the layout for collimation related widgets 66 68 """ 67 69 collimation_name_txt = wx.StaticText(self, -1, "Collimation:") … … 97 99 def _layout_name(self): 98 100 """ 99 101 Do the layout for collimation name related widgets 100 102 """ 101 103 #Collimation name [string] … … 107 109 def _layout_length(self): 108 110 """ 109 111 Do the layout for length related widgets 110 112 """ 111 113 #Collimation length … … 121 123 def _layout_button(self): 122 124 """ 123 125 Do the layout for the button widgets 124 126 """ 125 127 self.bt_apply = wx.Button(self, -1,'Apply') … … 136 138 def _layout_aperture(self): 137 139 """ 138 140 Do the layout for aperture related widgets 139 141 """ 140 142 aperture_name_txt = wx.StaticText(self, -1, "Aperture:") … … 170 172 def _do_layout(self, data=None): 171 173 """ 172 174 Draw the current panel 173 175 """ 174 176 self._define_structure() … … 206 208 def fill_collimation_combox(self): 207 209 """ 208 210 fill the current combobox with the available collimation 209 211 """ 210 212 if self._collimation is None or self._collimation == []: … … 218 220 def add_collimation(self, event): 219 221 """ 220 222 Append empty collimation to data's list of collimation 221 223 """ 222 224 … … 236 238 def remove_collimation(self, event): 237 239 """ 238 240 Remove collimation to data's list of collimation 239 241 """ 240 242 if self.collimation_cbox.IsEnabled(): … … 263 265 def on_select_collimation(self, event): 264 266 """ 265 267 fill the control on the panel according to the current selected collimation 266 268 """ 267 269 self.set_values() … … 271 273 def enable_collimation(self): 272 274 """ 273 275 Enable /disable widgets related to collimation 274 276 """ 275 277 if self._collimation is not None and self.collimation_cbox.GetCount() > 0: … … 291 293 def reset_collimation_combobox(self, edited_collimation): 292 294 """ 293 295 take all edited editor and reset clientdata of collimation combo box 294 296 """ 295 297 for position in range(self.collimation_cbox.GetCount()): … … 303 305 def add_aperture(self, event): 304 306 """ 305 307 Append empty aperture to data's list of aperture 306 308 """ 307 309 collimation, _, _ = self.get_current_collimation() … … 317 319 def edit_aperture(self, event): 318 320 """ 319 321 Edit the selected aperture 320 322 """ 321 323 if self._collimation is None or not self.aperture_cbox.IsEnabled(): … … 331 333 def remove_aperture(self, event): 332 334 """ 333 335 Remove aperture to data's list of aperture 334 336 """ 335 337 if self._collimation is None or not self._collimation: … … 354 356 def set_aperture(self, aperture): 355 357 """ 356 358 set aperture for data 357 359 """ 358 360 if self._collimation is None or not self._collimation: … … 368 370 def enable_aperture(self): 369 371 """ 370 372 Enable /disable widgets crelated to aperture 371 373 """ 372 374 collimation, _, _ = self.get_current_collimation() … … 390 392 def reset_aperture_combobox(self, edited_aperture): 391 393 """ 392 394 take all edited editor and reset clientdata of aperture combo box 393 395 """ 394 396 for position in range(self.aperture_cbox.GetCount()): … … 402 404 def fill_aperture_combox(self): 403 405 """ 404 406 fill the current combobox with the available aperture 405 407 """ 406 408 self.aperture_cbox.Clear() … … 416 418 def set_manager(self, manager): 417 419 """ 418 420 Set manager of this window 419 421 """ 420 422 self.manager = manager … … 422 424 def set_values(self): 423 425 """ 424 425 426 take the collimation values of the current data and display them 427 through the panel 426 428 """ 427 429 collimation, _, _ = self.get_current_collimation() … … 441 443 def get_collimation(self): 442 444 """ 443 445 return the current collimation 444 446 """ 445 447 return self._collimation … … 447 449 def get_notes(self): 448 450 """ 449 451 return notes 450 452 """ 451 453 return self._notes … … 453 455 def on_change_name(self): 454 456 """ 455 457 Change name 456 458 """ 457 459 collimation, collimation_name, position = self.get_current_collimation() … … 472 474 def on_change_length(self): 473 475 """ 474 476 Change the length 475 477 """ 476 478 collimation, collimation_name, position = self.get_current_collimation() … … 501 503 def on_click_apply(self, event): 502 504 """ 503 505 Apply user values to the collimation 504 506 """ 505 507 self.on_change_name() … … 511 513 def on_click_cancel(self, event): 512 514 """ 513 515 leave the collimation as it is and close 514 516 """ 515 517 self._collimation = deepcopy(self._reset_collimation)
Note: See TracChangeset
for help on using the changeset viewer.