13 |
|
|
14 |
|
|
15 |
from Thuban.Model.color import Color |
from Thuban.Model.color import Color |
16 |
from wxPython.wx import wxColour, \ |
import wx |
|
wxBeginBusyCursor, wxEndBusyCursor, wxSafeYield |
|
17 |
|
|
18 |
def Color2wxColour(color): |
def Color2wxColour(color): |
19 |
"""Return a wxColor object for the Thuban color object color""" |
"""Return a wxColor object for the Thuban color object color""" |
20 |
return wxColour(int(round(color.red * 255)), |
return wx.Colour(int(round(color.red * 255)), |
21 |
int(round(color.green * 255)), |
int(round(color.green * 255)), |
22 |
int(round(color.blue * 255))) |
int(round(color.blue * 255))) |
23 |
|
|
40 |
This function and the corresponding ThubanEndBusyCursor function are |
This function and the corresponding ThubanEndBusyCursor function are |
41 |
the functions to use in Thuban to set a busy cursor. |
the functions to use in Thuban to set a busy cursor. |
42 |
""" |
""" |
43 |
wxBeginBusyCursor() |
wx.BeginBusyCursor() |
44 |
wxSafeYield() |
wx.SafeYield() |
45 |
|
|
46 |
def ThubanEndBusyCursor(): |
def ThubanEndBusyCursor(): |
47 |
"""Thuban wrapper for wxEndBusyCursor |
"""Thuban wrapper for wxEndBusyCursor |
49 |
This function doesn't do anything more than calling wxEndBusyCursor |
This function doesn't do anything more than calling wxEndBusyCursor |
50 |
yet, but please use this whereever you use ThubanBeginBusyCursor. |
yet, but please use this whereever you use ThubanBeginBusyCursor. |
51 |
""" |
""" |
52 |
wxEndBusyCursor() |
wx.EndBusyCursor() |