def __init__(self, urlstring, refreshrate): self.canvas = r.createCanvas(INTERNAL) self.webview = PythonQt.QtWebKit.QWebView() self.canvas.AddWidget(self.webview) url = PythonQt.QtCore.QUrl(urlstring) self.webview.load(url) self.refreshrate = refreshrate #XXX refreshing not implemented yet. or is it automatic with webviews and uicanvases?-o
print "setting avatar yaw with %f" % a r.setAvatarYaw(a) if 0: #avatar rotation #XXX crashes when the avatar is not there! XXX x = 0 y = 0 z = 0.1 #this is the actual rotation thingie w = 0 print "rotating the avatar to", (x, y, z, w) r.setAvatarRotation(x, y, z, w) if 0: #create a new qt canvas try: c = r.c except: #initial run c = r.createCanvas() r.c = c else: #the canvas has already been created #import PythonQt #print globals() #print '==============' #print 'box' in globals() #print dir(PythonQt) #print box print "~~~" #print "test t:", test #print "canvas t:", __canvas__ print c if 0: #add a signal handler to the ui loaded above, i.e. create a slot and connect it r.c.label.text = "py-commanded"
print "setting avatar yaw with %f" % a r.setAvatarYaw(a) if 0: #avatar rotation #XXX crashes when the avatar is not there! XXX x = 0 y = 0 z = -1 #this is the actual rotation thingie w = 0 print "rotating the avatar to", (x, y, z, w) r.setAvatarRotation(x, y, z, w) if 0: #create a new qt canvas try: c = r.c except: #initial run c = r.createCanvas() r.c = c else: #the canvas has already been created #import PythonQt #print globals() #print '==============' #print 'box' in globals() #print dir(PythonQt) #print box print "~~~" #print "test t:", test #print "canvas t:", __canvas__ print c if 0: #add a signal handler to the ui loaded above, i.e. create a slot and connect it r.c.label.text = "py-commanded"