/[thuban]/branches/WIP-pyshapelib-bramz/Thuban/UI/common.py
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/Thuban/UI/common.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2699 by bh, Tue Nov 11 18:16:29 2003 UTC revision 2700 by dpinte, Mon Sep 18 14:27:02 2006 UTC
# Line 13  __version__ = "$Revision$" Line 13  __version__ = "$Revision$"
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    
# Line 41  def ThubanBeginBusyCursor(): Line 40  def ThubanBeginBusyCursor():
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
# Line 50  def ThubanEndBusyCursor(): Line 49  def ThubanEndBusyCursor():
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()

Legend:
Removed from v.2699  
changed lines
  Added in v.2700

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26