Eidolon
Public Member Functions | Public Attributes | Private Member Functions | List of all members
RenderWidget Class Reference

Inherits QWidget.

Collaboration diagram for RenderWidget:
Collaboration graph

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)
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  conf,
  parent = None 
)

Member Function Documentation

◆ _getWinHandle()

def _getWinHandle (   self)
private
Returns the string window handle for this widget (or its parent as appropriate).
Here is the caller graph for this function:

◆ _triggerEvent()

def _triggerEvent (   self,
  name,
  args 
)
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.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getRenderScene()

def getRenderScene (   self)
Creates (if necessary) and returns the RenderScene object associated with the internal RenderAdapter object.
Here is the caller graph for this function:

◆ initViz()

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.
Here is the call graph for this function:

◆ keyPressEvent()

def keyPressEvent (   self,
  e 
)
Here is the call graph for this function:

◆ keyReleaseEvent()

def keyReleaseEvent (   self,
  e 
)
Here is the call graph for this function:

◆ mouseDoubleClickEvent()

def mouseDoubleClickEvent (   self,
  e 
)
Here is the call graph for this function:

◆ mouseMoveEvent()

def mouseMoveEvent (   self,
  e 
)
Here is the call graph for this function:

◆ mousePressEvent()

def mousePressEvent (   self,
  e 
)
Here is the call graph for this function:

◆ mouseReleaseEvent()

def mouseReleaseEvent (   self,
  e 
)
Here is the call graph for this function:

◆ paintEngine()

def paintEngine (   self)
Override method returning None to clue in Qt that we're handling painting ourselves.

◆ paintEvent()

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.
Here is the call graph for this function:

◆ repaint()

def repaint (   self,
  q 
)
Here is the caller graph for this function:

◆ resizeEvent()

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().
Here is the call graph for this function:

◆ update()

def update (   self)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wheelEvent()

def wheelEvent (   self,
  e 
)
Here is the call graph for this function:

Member Data Documentation

◆ adapt

adapt

◆ conf

conf

◆ eventTriggered

eventTriggered

◆ evtHandler

evtHandler

◆ scene

scene

◆ wid

wid

The documentation for this class was generated from the following file: