Changeset 391:0f2e90eae832 for src/mlx/gui
- Timestamp:
- 12/22/12 08:42:13 (12 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- src/mlx/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/flight.py
r384 r391 1999 1999 xscale = 0.0, yscale = 0.0) 2000 2000 2001 table = gtk.Table( 7, 4)2001 table = gtk.Table(8, 4) 2002 2002 table.set_row_spacings(4) 2003 2003 table.set_col_spacings(16) … … 2102 2102 table.attach(self._derateUnit, 3, 4, 5, 6) 2103 2103 2104 self._antiIceOn = gtk.CheckButton(xstr("takeoff_antiice")) 2105 self._antiIceOn.set_use_underline(True) 2106 self._antiIceOn.set_tooltip_text(xstr("takeoff_antiice_tooltip")) 2107 table.attach(self._antiIceOn, 2, 4, 6, 7) 2108 2104 2109 self._rto = gtk.CheckButton(xstr("takeoff_rto")) 2105 2110 self._rto.set_use_underline(True) 2106 2111 self._rto.set_tooltip_text(xstr("takeoff_rto_tooltip")) 2107 2112 self._rto.connect("toggled", self._rtoToggled) 2108 table.attach(self._rto, 2, 4, 6, 7, ypadding = 8)2113 table.attach(self._rto, 2, 4, 7, 8, ypadding = 8) 2109 2114 2110 2115 self.addCancelFlightButton() … … 2147 2152 else: 2148 2153 return None 2154 2155 @property 2156 def antiIceOn(self): 2157 """Get whether the anti-ice system has been turned on.""" 2158 return self._antiIceOn.get_active() 2159 2160 @antiIceOn.setter 2161 def antiIceOn(self, value): 2162 """Set the anti-ice indicator.""" 2163 self._antiIceOn.set_active(value) 2149 2164 2150 2165 @property … … 2213 2228 self._vr.reset() 2214 2229 self._v2.reset() 2215 2216 2230 self._hasDerate = False 2231 self._antiIceOn.set_active(False) 2217 2232 2218 2233 def setRTOEnabled(self, enabled): … … 2259 2274 def _forwardClicked(self, button): 2260 2275 """Called when the forward button is clicked.""" 2261 self._wizard.gui.flight.aircraft.updateV1R2() 2276 aircraft = self._wizard.gui.flight.aircraft 2277 aircraft.updateV1R2() 2262 2278 if self._hasDerate: 2263 self._wizard.gui.flight.aircraft.updateDerate() 2279 aircraft.updateDerate() 2280 aircraft.updateTakeoffAntiIce() 2264 2281 self._wizard.nextPage() 2265 2282 … … 2393 2410 xscale = 0.0, yscale = 0.0) 2394 2411 2395 table = gtk.Table( 5, 5)2412 table = gtk.Table(6, 5) 2396 2413 table.set_row_spacings(4) 2397 2414 table.set_col_spacings(16) … … 2462 2479 label.set_use_underline(True) 2463 2480 label.set_alignment(0.0, 0.5) 2464 table.attach(label, 1, 2, 5, 6)2481 table.attach(label, 1, 2, 4, 5) 2465 2482 2466 2483 self._vref = IntegerEntry() … … 2468 2485 self._vref.set_tooltip_markup(xstr("landing_vref_tooltip_knots")) 2469 2486 self._vref.connect("integer-changed", self._vrefChanged) 2470 table.attach(self._vref, 3, 4, 5, 6)2487 table.attach(self._vref, 3, 4, 4, 5) 2471 2488 label.set_mnemonic_widget(self._vref) 2472 2489 2473 2490 self._vrefUnit = gtk.Label(xstr("label_knots")) 2474 table.attach(self._vrefUnit, 4, 5, 5, 6) 2491 table.attach(self._vrefUnit, 4, 5, 4, 5) 2492 2493 self._antiIceOn = gtk.CheckButton(xstr("landing_antiice")) 2494 self._antiIceOn.set_use_underline(True) 2495 self._antiIceOn.set_tooltip_text(xstr("landing_antiice_tooltip")) 2496 table.attach(self._antiIceOn, 3, 5, 5, 6) 2475 2497 2476 2498 self.addCancelFlightButton() … … 2510 2532 return self._vref.get_int() 2511 2533 2534 @property 2535 def antiIceOn(self): 2536 """Get whether the anti-ice system has been turned on.""" 2537 return self._antiIceOn.get_active() 2538 2539 @antiIceOn.setter 2540 def antiIceOn(self, value): 2541 """Set the anti-ice indicator.""" 2542 self._antiIceOn.set_active(value) 2543 2512 2544 def reset(self): 2513 2545 """Reset the page if the wizard is reset.""" 2514 2546 super(LandingPage, self).reset() 2515 2547 self._vref.reset() 2548 self._antiIceOn.set_active(False) 2516 2549 self._flightEnded = False 2517 2550 … … 2595 2628 def _forwardClicked(self, button): 2596 2629 """Called when the forward button is clicked.""" 2597 self._wizard.gui.flight.aircraft.updateVRef() 2630 aircraft = self._wizard.gui.flight.aircraft 2631 aircraft.updateVRef() 2632 aircraft.updateLandingAntiIce() 2598 2633 if self._wizard.gui.config.onlineGateSystem and \ 2599 2634 self._wizard.loggedIn and not self._completed and \ … … 3187 3222 3188 3223 @property 3224 def takeoffAntiIceOn(self): 3225 """Get whether the anti-ice system was on during take-off.""" 3226 return self._takeoffPage.antiIceOn 3227 3228 @takeoffAntiIceOn.setter 3229 def takeoffAntiIceOn(self, value): 3230 """Set anti-ice on indicator.""" 3231 self._takeoffPage.antiIceOn = value 3232 3233 @property 3189 3234 def rtoIndicated(self): 3190 3235 """Get whether the pilot has indicated that an RTO has occured.""" … … 3215 3260 """Get the Vref speed.""" 3216 3261 return self._landingPage.vref 3262 3263 @property 3264 def landingAntiIceOn(self): 3265 """Get whether the anti-ice system was on during landing.""" 3266 return self._landingPage.antiIceOn 3267 3268 @landingAntiIceOn.setter 3269 def landingAntiIceOn(self, value): 3270 """Set anti-ice on indicator.""" 3271 self._landingPage.antiIceOn = value 3217 3272 3218 3273 @property -
src/mlx/gui/gui.py
r384 r391 313 313 314 314 @property 315 def takeoffAntiIceOn(self): 316 """Get whether the anti-ice system was on during take-off.""" 317 return self._wizard.takeoffAntiIceOn 318 319 @takeoffAntiIceOn.setter 320 def takeoffAntiIceOn(self, value): 321 """Set the anti-ice on indicator.""" 322 gobject.idle_add(self._setTakeoffAntiIceOn, value) 323 324 @property 315 325 def rtoIndicated(self): 316 326 """Get whether the pilot has indicated than an RTO has occured.""" … … 341 351 """Get the Vref speed calculated for the flight.""" 342 352 return self._wizard.vref 353 354 @property 355 def landingAntiIceOn(self): 356 """Get whether the anti-ice system was on during landing.""" 357 return self._wizard.landingAntiIceOn 358 359 @landingAntiIceOn.setter 360 def landingAntiIceOn(self, value): 361 """Set the anti-ice on indicator.""" 362 gobject.idle_add(self._setLandingAntiIceOn, value) 343 363 344 364 @property … … 1438 1458 """Show the about URL.""" 1439 1459 webbrowser.open(url = link, new = 1) 1460 1461 def _setTakeoffAntiIceOn(self, value): 1462 """Set the anti-ice on indicator.""" 1463 self._wizard.takeoffAntiIceOn = value 1464 1465 def _setLandingAntiIceOn(self, value): 1466 """Set the anti-ice on indicator.""" 1467 self._wizard.landingAntiIceOn = value
Note:
See TracChangeset
for help on using the changeset viewer.