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

Inherits QMainWindow, and Ui_MainWindow.

Collaboration diagram for VisualizerWindow:
Collaboration graph

Public Member Functions

def __init__ (self, conf, width=1200, height=800)
 
def setRenderWinSize (self, w, h)
 
def relayoutViz (self)
 
def keyPressEvent (self, e)
 
def dragEnterEvent (self, e)
 
def callFuncUIThread (self, func, args, kwargs)
 
def sync (self)
 
def repaintScene (self)
 
def captureWidget (self, widg, filename)
 
def setStatus (self, msg, progress=0, progressmax=0)
 
def showMessage (self, msg, msTime=0)
 
def showTimeDialog (self, doShow, start, end, step)
 
def setTimeDisplay (self, ts)
 
def setTimeFPS (self, fps)
 
def setTimeStepsPerSec (self, sps)
 
def showScratchPad (self, doShow)
 
def toggleFullscreen (self)
 
def selectObject (self, obj)
 
def updateScrollAreas (self)
 
def setCameraValues (self, fov, nearclip, farclip)
 
def addMenuItem (self, menuName, objName, text, callback)
 
def addInterfaceTab (self, name, tab)
 
def createDock (self, name, widg, minw=200, minh=200)
 
def findWidgetItem (self, obj)
 
def findPropBox (self, obj)
 
def connect (self, signal, slot)
 
def chooseRGBColorDialog (self, origcolor, callback)
 
def chooseYesNoDialog (self, msg, title, callback)
 
def getYesNoDialogValue (self, msg, title, future)
 
def chooseStrDialog (self, title, defaultval, callback)
 
def chooseListItemsDialog (self, title, msg, items, callback, selected=[], multiSelect=False)
 
def chooseScreenshotDialog (self, start, end, fps, steps, sources, callback)
 
def chooseFileDialog (self, title, opendir=None, filterstr='', isOpen=True, chooseMultiple=False, confirmOverwrite=True, parent=None)
 
def chooseDirDialog (self, title, opendir=None)
 
def showLogfileView (self, logfile)
 
def showMsg (self, msg, title='Message', text=None, width=600, height=300)
 
def showTextBox (self, msg, title, text, width=600, height=300)
 
def addTreeObject (self, obj, label, parentObj, prop, updateFunc, dblClickFunc=None, menu=None, menuFunc=None, icon=None, parentName=None)
 
def updateTreeObjects (self)
 
def addProjectObj (self, proj, name, prop, updateFunc)
 
def addAsset (self, asset, text, assettype, propbox=None, updateFunc=None)
 
def addMaterial (self, mat, updateFunc)
 
def addSpectrum (self, spec)
 
def addTexture (self, tex)
 
def addLight (self, light, updateFunc)
 
def addGPUProgram (self, prog, updateFunc)
 
def fillTextureList (self, textures)
 
def getSelectedObject (self)
 
def getSelectedAsset (self)
 
def removeObject (self, obj)
 
def setVisibilityIcon (self, obj, val)
 

Public Attributes

 objMap
 
 mgr
 
 dockWidgets
 
 isExec
 
 timestepSliderMult
 
 assetRootMap
 
 logfileView
 
 msgdialog
 
 dialogDir
 
 statusProgressBar
 
 statusText
 
 console
 
 viz
 
 scene
 

Static Public Attributes

 method_signal
 
 ObjMapTuple
 

Private Member Functions

def _showAbout (self)
 
def _checkVersion (self)
 
def _callFuncAsSignal (self, func, future, args, kwargs)
 
def _executeScratch (self)
 
def _loadScratch (self)
 
def _saveScratch (self)
 
def _clickedTree (self, tree, item)
 
def _doubleClickedTree (self, tree, item)
 
def _menuClickedTree (self, tree, p)
 
def _updateScrollAreasSig (self)
 
def _addUIObj (self, treeItem, args, kwargs)
 

Detailed Description

The main window of the application. This contains the render widget, scene panel, console panel, scratch pad panel,
and whatever dock windows are created. The code defined in this class is meant only to actuate the UI, fill lists
and other widgets with values, create input or notification windows, and perform other functions which don't delve
into the model or controller layer.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  conf,
  width = 1200,
  height = 800 
)

Member Function Documentation

◆ _addUIObj()

def _addUIObj (   self,
  treeItem,
  args,
  kwargs 
)
private
Here is the caller graph for this function:

◆ _callFuncAsSignal()

def _callFuncAsSignal (   self,
  func,
  future,
  args,
  kwargs 
)
private
Call the function `func' with the given arguments, and storing the result (or thrown exception) in `future'.
Here is the caller graph for this function:

◆ _checkVersion()

def _checkVersion (   self)
private
Check the application version against the repository API URL and show the results with the link to the site.
Here is the call graph for this function:

◆ _clickedTree()

def _clickedTree (   self,
  tree,
  item 
)
private
Here is the caller graph for this function:

◆ _doubleClickedTree()

def _doubleClickedTree (   self,
  tree,
  item 
)
private

◆ _executeScratch()

def _executeScratch (   self)
private
Execute the contents of the scratch pad line-by-line in the console, making it visible first.

◆ _loadScratch()

def _loadScratch (   self)
private
Here is the call graph for this function:

◆ _menuClickedTree()

def _menuClickedTree (   self,
  tree,
  p 
)
private
Here is the call graph for this function:

◆ _saveScratch()

def _saveScratch (   self)
private
Save the scratch pad contents to a chosen file.
Here is the call graph for this function:

◆ _showAbout()

def _showAbout (   self)
private
Show the about dialog box.

◆ _updateScrollAreasSig()

def _updateScrollAreasSig (   self)
private
Updates the possibly visible property boxes when a change occurs. This executes as a signal.
Here is the caller graph for this function:

◆ addAsset()

def addAsset (   self,
  asset,
  text,
  assettype,
  propbox = None,
  updateFunc = None 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addGPUProgram()

def addGPUProgram (   self,
  prog,
  updateFunc 
)
Here is the call graph for this function:

◆ addInterfaceTab()

def addInterfaceTab (   self,
  name,
  tab 
)
Add the widget `tab' to the tab panel in the Scene Elements dock.

◆ addLight()

def addLight (   self,
  light,
  updateFunc 
)
Here is the call graph for this function:

◆ addMaterial()

def addMaterial (   self,
  mat,
  updateFunc 
)
Here is the call graph for this function:

◆ addMenuItem()

def addMenuItem (   self,
  menuName,
  objName,
  text,
  callback 
)
Add a menu item to the menu `menuName', which must be one of ('File','Import','Export','Create','Project').
The menu item is named `objName' with label `text', when clicked `callback' will be called with no arguments.

◆ addProjectObj()

def addProjectObj (   self,
  proj,
  name,
  prop,
  updateFunc 
)
Here is the call graph for this function:

◆ addSpectrum()

def addSpectrum (   self,
  spec 
)
Here is the call graph for this function:

◆ addTexture()

def addTexture (   self,
  tex 
)
Here is the call graph for this function:

◆ addTreeObject()

def addTreeObject (   self,
  obj,
  label,
  parentObj,
  prop,
  updateFunc,
  dblClickFunc = None,
  menu = None,
  menuFunc = None,
  icon = None,
  parentName = None 
)
Here is the call graph for this function:

◆ callFuncUIThread()

def callFuncUIThread (   self,
  func,
  args,
  kwargs 
)
Call the given function with the given arguments in the UI (main) thread. This allows operations needing to be
done by the UI thread to be defined in arbitrary functions and despatched from any thread. This assumes that
whatever `func' does is thread-safe and won't wait on another event from the UI thread, otherwise it will
deadlock since the call to callFuncUIThread() will wait indefinitely for a result from `func'. This method
can be safely called from the UI thread however, assuming these properties of `func'.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ captureWidget()

def captureWidget (   self,
  widg,
  filename 
)

◆ chooseDirDialog()

def chooseDirDialog (   self,
  title,
  opendir = None 
)

◆ chooseFileDialog()

def chooseFileDialog (   self,
  title,
  opendir = None,
  filterstr = '',
  isOpen = True,
  chooseMultiple = False,
  confirmOverwrite = True,
  parent = None 
)
Here is the caller graph for this function:

◆ chooseListItemsDialog()

def chooseListItemsDialog (   self,
  title,
  msg,
  items,
  callback,
  selected = [],
  multiSelect = False 
)
Here is the call graph for this function:

◆ chooseRGBColorDialog()

def chooseRGBColorDialog (   self,
  origcolor,
  callback 
)
Opens a color pick dialog initialized with `origcolor' (RGBA tuple or color object). If Ok is pressed, the
callable `callback' is invoked with the RGBA color tuple passed as the single argument, otherwise does nothing.
This is threadsafe and non-blocking.
Here is the call graph for this function:

◆ chooseScreenshotDialog()

def chooseScreenshotDialog (   self,
  start,
  end,
  fps,
  steps,
  sources,
  callback 
)
Shows the dialog for choosing screenshot parameters and calls `callback' with the results if OK is chosen. The
first 4 arguments specify the timestep start, end, frames per second, and steps per second. The `sources' value
is a list of (name,source,width,height) tuples specifying what cameras or widgets are acceptable as sources, the given
name from each tuple will be the source comboboxentry and (width,height) will be set as the default values for those
fields. The result arguments for `callback' are: file path, sources, width, height, start time, end time, interval.

◆ chooseStrDialog()

def chooseStrDialog (   self,
  title,
  defaultval,
  callback 
)
Opens a dialog box asking for an input string with title string `title' and default string value `defaultval'.
When the dialog closes, the callable `callback' is called with the given string value as the only argument.
This is threadsafe and non-blocking.

◆ chooseYesNoDialog()

def chooseYesNoDialog (   self,
  msg,
  title,
  callback 
)
Opens a Yes/No dialog box with message string `msg' and title string `title'. If Yes is selected, the callable
`callback' is called with no arguments. This is threadsafe and non-blocking.

◆ connect()

def connect (   self,
  signal,
  slot 
)
Performs signal connections which must be done within the main UI thread.

◆ createDock()

def createDock (   self,
  name,
  widg,
  minw = 200,
  minh = 200 
)
Add the widget `widg' to the interface in its own docked subwindow with minimum dimensions (minw,minh). If 
`widg' has a parentClosed() method, this will be called when the dock is closed with the close event passed as 
the only argument.

◆ dragEnterEvent()

def dragEnterEvent (   self,
  e 
)

◆ fillTextureList()

def fillTextureList (   self,
  textures 
)

◆ findPropBox()

def findPropBox (   self,
  obj 
)

◆ findWidgetItem()

def findWidgetItem (   self,
  obj 
)
Here is the caller graph for this function:

◆ getSelectedAsset()

def getSelectedAsset (   self)

◆ getSelectedObject()

def getSelectedObject (   self)

◆ getYesNoDialogValue()

def getYesNoDialogValue (   self,
  msg,
  title,
  future 
)
Opens a Yes/No dialog box with message string `msg' and title string `title'. If Yes is selected, the Future
object `future' is set to True, otherwise False. This is threadsafe and non-blocking.

◆ keyPressEvent()

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

◆ relayoutViz()

def relayoutViz (   self)
Cause the 3D visualization widget to redo its layout.

◆ removeObject()

def removeObject (   self,
  obj 
)
Here is the call graph for this function:

◆ repaintScene()

def repaintScene (   self)

◆ selectObject()

def selectObject (   self,
  obj 
)
Select an object in the scene object tree view. This will set the selection in the tree and replace the
properties box with the correct one for that object. Passing None as the argument will clear the selection.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setCameraValues()

def setCameraValues (   self,
  fov,
  nearclip,
  farclip 
)
Set the field-of-view, near and far clipping distance UI elements.
Here is the call graph for this function:

◆ setRenderWinSize()

def setRenderWinSize (   self,
  w,
  h 
)
Resize the window so that the rendering widget's draw area has dimensions (w,h).
Here is the call graph for this function:

◆ setStatus()

def setStatus (   self,
  msg,
  progress = 0,
  progressmax = 0 
)

◆ setTimeDisplay()

def setTimeDisplay (   self,
  ts 
)
Here is the call graph for this function:

◆ setTimeFPS()

def setTimeFPS (   self,
  fps 
)
Here is the call graph for this function:

◆ setTimeStepsPerSec()

def setTimeStepsPerSec (   self,
  sps 
)
Here is the call graph for this function:

◆ setVisibilityIcon()

def setVisibilityIcon (   self,
  obj,
  val 
)
Here is the call graph for this function:

◆ showLogfileView()

def showLogfileView (   self,
  logfile 
)

◆ showMessage()

def showMessage (   self,
  msg,
  msTime = 0 
)

◆ showMsg()

def showMsg (   self,
  msg,
  title = 'Message',
  text = None,
  width = 600,
  height = 300 
)
Shows the string `msg' in a message dialog with the given title. If `text' is not None, this is displayed in
a text box within a message dialog that recalls previous messages, otherwise a simple dialog is used.
Here is the caller graph for this function:

◆ showScratchPad()

def showScratchPad (   self,
  doShow 
)

◆ showTextBox()

def showTextBox (   self,
  msg,
  title,
  text,
  width = 600,
  height = 300 
)
Shows a box with the given title displaying the mssage `msg' with text content `text'.

◆ showTimeDialog()

def showTimeDialog (   self,
  doShow,
  start,
  end,
  step 
)

◆ sync()

def sync (   self)
Cause the calling thread to wait until all slot operations prior to this one have completed.
Here is the call graph for this function:

◆ toggleFullscreen()

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

◆ updateScrollAreas()

def updateScrollAreas (   self)
Updates the possibly visible property boxes when a change occurs. This delays for 0.1s before executing.
Here is the call graph for this function:

◆ updateTreeObjects()

def updateTreeObjects (   self)

Member Data Documentation

◆ assetRootMap

assetRootMap

◆ console

console

◆ dialogDir

dialogDir

◆ dockWidgets

dockWidgets

◆ isExec

isExec

◆ logfileView

logfileView

◆ method_signal

method_signal
static

◆ mgr

mgr

◆ msgdialog

msgdialog

◆ objMap

objMap

◆ ObjMapTuple

ObjMapTuple
static

◆ scene

scene

◆ statusProgressBar

statusProgressBar

◆ statusText

statusText

◆ timestepSliderMult

timestepSliderMult

◆ viz

viz

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