示例#1
0
from PythonQt.QtGui import QGroupBox, QVBoxLayout, QPushButton

import rexviewer as r

#componenthandlers don't necessarily need to be naali modules,
#but this one needs to listen to update events to do mouse hover tricks
import circuits

#should be in the EC data
OPENPOS = Vec(101.862, 82.6978, 24.9221)
CLOSEPOS = Vec(99.65, 82.6978, 24.9221)
"""for changing the cursor on hover"""
import PythonQt
qapp = PythonQt.Qt.QApplication.instance()
import PythonQt.QtGui as gui
cursor = gui.QCursor()


def setcursor(ctype):
    cursor.setShape(ctype)
    current = qapp.overrideCursor()
    if current != None:
        if current.shape() != ctype:
            qapp.setOverrideCursor(cursor)
    else:
        qapp.setOverrideCursor(cursor)


COMPNAME = "door"  #the DC name identifier string that this handler looks for

 def __init__(self):
     Qt.QApplication.setOverrideCursor(QtGui.QCursor(Qt.Qt.WaitCursor))
     Qt.QApplication.processEvents()
     return