Eidolon
|
Inherits QWidget.
Public Member Functions | |
def | __init__ (self, conf, parent=None) |
def | initViz (self) |
def | getRenderScene (self) |
def | paintEngine (self) |
def | resizeEvent (self, e) |
def | update (self) |
def | repaint (self, q) |
def | mousePressEvent (self, e) |
def | mouseReleaseEvent (self, e) |
def | mouseDoubleClickEvent (self, e) |
def | wheelEvent (self, e) |
def | mouseMoveEvent (self, e) |
def | keyPressEvent (self, e) |
def | keyReleaseEvent (self, e) |
def | paintEvent (self, e) |
Public Attributes | |
conf | |
scene | |
evtHandler | |
eventTriggered | |
wid | |
adapt | |
Private Member Functions | |
def | _getWinHandle (self) |
def | _triggerEvent (self, name, args) |
This class is used for the actual rendering window. It acquires a RenderAdapter object from the C++ renderer in its constructor and associates it with the `conf' argument. After the object is constructed and placed in a layout, initViz() is called to create the rendering window. If the `evtHandler' object is a EventHandler object, this will receive the events from this widget triggered by rendering, mouse or keyboard input, and resizing. After the widget is added and initViz() called, the host window must call show() to become visible, ONLY then can getRenderScene() be called to create the RenderScene object necessary to interface with the renderer.
def __init__ | ( | self, | |
conf, | |||
parent = None |
|||
) |
|
private |
Returns the string window handle for this widget (or its parent as appropriate).
|
private |
Calls self.evtHandler._triggerEvent with the given arguments. If the event is widgetPostDraw, only send if the scene is set to render in low quality mode; since this event is used to trigger a render in high quality after rendering in low quality, this prevents endless rendering loops.
def getRenderScene | ( | self | ) |
Creates (if necessary) and returns the RenderScene object associated with the internal RenderAdapter object.
def initViz | ( | self | ) |
Initialize the renderer component. This involves setting the window handle in self.conf to the appropriate parameter name, synching the widget in X11 if applicable, and then creating the render window. This will set self.wid to the created window's ID.
def keyPressEvent | ( | self, | |
e | |||
) |
def keyReleaseEvent | ( | self, | |
e | |||
) |
def mouseDoubleClickEvent | ( | self, | |
e | |||
) |
def mouseMoveEvent | ( | self, | |
e | |||
) |
def mousePressEvent | ( | self, | |
e | |||
) |
def mouseReleaseEvent | ( | self, | |
e | |||
) |
def paintEngine | ( | self | ) |
Override method returning None to clue in Qt that we're handling painting ourselves.
def paintEvent | ( | self, | |
e | |||
) |
Triggered when repainting the widget, this calls self.adapt.paint() if self.scene is not None, which prevents attempting to repaint before the window this widget is in is reading for rendering. For this to function, the host window must call show() for itself before calling self.getRenderScene() to create the RenderScene object. If self.eventTriggered if False then the rendering is done in high quality mode, and self.eventTriggered is always set to False afterwards.
def repaint | ( | self, | |
q | |||
) |
def resizeEvent | ( | self, | |
e | |||
) |
Triggered when the widget resizes, this handles sending the correct resize information to the adapter which must keep track of size in platform-specific ways. This triggers the widgetResize event and calls repaint().
def update | ( | self | ) |
def wheelEvent | ( | self, | |
e | |||
) |
adapt |
conf |
eventTriggered |
evtHandler |
scene |
wid |