woo.qt

Inheritance diagram of woo.qt
woo.qt.Controller()[source]
class woo.qt.ControllerClass(parent=None)[source]
activateControls()[source]
addRenderers()[source]
deactivateControls()[source]
displayComboSlot(dispStr)[source]
fillAboutData()[source]
genSaveParamsSlot()[source]
generateSlot()[source]
generatorComboSlot(genStr, menuAction=None, menuData=None)[source]

update generator parameters when a new one is selected

inspectSlot()[source]
loadSlot()[source]
movieButtonClicked()[source]
movieCheckboxToggled(isOn, findExisting=False)[source]
pauseSlot()[source]
playSlot()[source]
plotSlot()[source]
refreshEvent()[source]
refreshPreprocessors()[source]
refreshValues()[source]
reloadSlot()[source]
resetTraceClicked()[source]
saveSlot()[source]
setTabActive(what)[source]
show3dSlot(show)[source]
stepSlot()[source]
subStepSlot(value)[source]
throttleChanged(value)[source]
throttleExp2Lin(y)[source]

Convert Scene.throttle (in seconds) to the position of the throttle control. This is the inverse of throttleInt2Float giving \(x(y)=\exp\left(\frac{y}{y_{\max}}\log(x_{\max}+1)\right)-1\).

throttleLin2Exp(x)[source]

Convert integer value of the throttle control to Scene.throttle (in seconds). We map the range (0..xmax) to (0…ymax) with \(y(x)=\frac{\log x+1}{\log x_{\max}+1}y_{\max}\).

traceCheckboxToggled(isOn)[source]
tracerGetEngine(S)[source]

Find tracer engine, return it, or return None; raise exception with multiple tracers

woo.qt.Generator()[source]
woo.qt.Inspector()[source]
woo.qt.onSelection(obj)[source]
woo.qt.openUrl(url)[source]

UiPrefs

ObjectUiPrefs

class woo.qt.UiPrefs(self: woo.core.Object)None[source]

Storage for local user interface preferences. This class is always instantiated as woo.qt.uiPrefs; if the file prefsFile exists at startup, it is loaded automatically.

[gui/qt/__init__.py]

glRotCursorFreeze(= False)

Freeze cursor when rotating things (moving with buttons pressed); useful for trackballs; not yet functional.

[type: bool]

prepShowVars(= False)

Show variable names rather than descriptions by default in the preprocessor interface

[type: bool]

paraviewLike3d(= True)

Paraview-like mouse bindings for the 3d view (requires restart): middle-drag to move, left-drag to zoom. IF false, use old (Yade) behavior, which is the opposite.

[type: bool]

defaultCmap(= 'coolwarm')

Default colormap for scales.

[type: str, choices: coolwarm, 3gauss, 3saw, banded, blue_red, blu_red, bright, bw, default, detail, extrema, helix2, helix, hotres, jaisn2, jaisnb, jaisnc, jaisnd, jaison, jet, manga, rainbow, roullet, ssec, wheel, red-green-blue, viridis]

prefsFile(= '/home/eudoxos/.config/woo/uiPrefs.conf')

Preferences will be loaded/saved from/to this file.

[type: str, not dumped, read-only in python]

static __new__(klass, **kw)[source]

Create and return a new object. See help(type) for accurate signature.

deepcopy(**kw)

The c++ dedepcopy uses boost::serialization, we need to use pickle. As long as deepcopy is called from python, this function gets precedence over the c++ one. Additional keyword parameters are used to immediately set parameters on the copy before returning.

class woo.qt.SnapshotEngine(*args, **kwargs)

Periodically save snapshots of GLView(s) as .png files. Files are named fileBase + counter + .png (counter is left-padded by 0s, i.e. snap00004.png).

Overloaded function.

  1. __init__(self: woo._qt.SnapshotEngine) -> None

  2. __init__(self: woo._qt.SnapshotEngine, *args, **kwargs) -> None

fileBase(= '')

Basename for snapshots

[type: string]

format(= 'PNG')

Format of snapshots (one of JPEG, PNG, EPS, PS, PPM, BMP) QGLViewer documentation. File extension will be lowercased format. Validity of format is not checked.

[type: string, choices: JPEG, PNG, EPS, PS, PPM, BMP]

counter(= 0)

Number that will be appended to fileBase when the next snapshot is saved (incremented at every save).

[type: int, read-only in python]

plot(= '')

Name of field in woo.core.Plot.imgData to which taken snapshots will be appended automatically.

[type: string]

► Saved files

snapshots(= [])

Files that have been created so far

[type: vector<string>, not shown in the UI, read-only in python]

► Error handling

ignoreErrors(= True)

Only report errors instead of throwing exceptions, in case of timeouts.

[type: bool]

msecSleep(= 0)

number of msec to sleep after snapshot (to prevent 3d hw problems) [ms]

[type: int]

deadTimeout(= 3.0)

Timeout for 3d operations (opening new view, saving snapshot); after timing out, throw exception (or only report error if ignoreErrors) and make myself dead. [s]

[type: Real]

tryOpenView(= False)

Attempt to open new view if there is none; this is very unreliable (off by default).

[type: bool]

woo._qt

Note

This module is imported into the woo.qt module automatically; refer to its objects through woo.qt.

Inheritance diagram of woo._qt

SnapshotEngine

ObjectEnginePeriodicEngineSnapshotEngine

woo._GLViewer

Note

This module is imported into the woo.qt module automatically; refer to its objects through woo.qt.

class woo._GLViewer.GLViewer
property axes

Show arrows for axes.

center()

Center view. View is centered either so that all bodies fit inside (median=False), or so that 75% of bodies fit inside (median=True).

close()
property eyePosition

Camera position.

fitAABB()

Adjust scene bounds so that Axis-aligned bounding box given by its lower and upper corners mn, mx fits in.

fitSphere()

Adjust scene bounds so that sphere given by center and radius fits in.

property fps

Show frames per second indicator.

loadState()

Load display parameters from slot saved previously into, identified by its number.

property lookAt

Point at which camera is directed.

property ortho

Whether orthographic projection is used; if false, use perspective projection.

povRayCam()

Return textual definition of camera in POV-Ray which will be the same with the current camera setup in this view.

property rotCursorFreeze
saveState()

Save display parameters into numbered memory slot. Saves state for both GLViewer and associated Renderer.

property sceneRadius

Visible scene radius.

property screenSize

Size of the viewer’s window, in scree pixels

property selection
showEntireScene()
snapshot()

Save screenshot of this view to out. Recognized extensions are .png, .jpg, .jpeg. Execution of snapshot is deferred and will be carried out after the next frame will have been rendered; the call returns immediately.

property upVector

Vector that will be shown oriented up on the screen.

property viewDir

Camera orientation (as vector).

woo._GLViewer.View()

Create a new 3d view.

woo._GLViewer.center()

Center all views.

woo._GLViewer.views()

Return list of all open woo.qt.GLViewer objects

woo.qt.ExceptionDialog

class woo.qt.ExceptionDialog.ExceptionDialog(parent, exc, t1=None, t2=None)[source]
woo.qt.ExceptionDialog.showExceptionDialog(parent, exc, t1=None, t2=None)[source]

woo.qt.ObjectEditor

class woo.qt.ObjectEditor.AttrEditor(getter=None, setter=None)[source]

Abstract base class handing some aspects common to all attribute editors. Holds exacly one attribute which is updated whenever it changes.

doFocusIn()[source]
doFocusOut()[source]
focusInEvent(event)[source]
focusOutEvent(event)[source]
isHot(hot=True)[source]

Called when the widget gets focus; mark it hot, change colors etc.

multiplierChanged(convSpec)[source]
refresh()[source]
sizeHint()[source]
trySetter(val)[source]
update()[source]
class woo.qt.ObjectEditor.AttrEditor_AlignedBox2(parent, getter, setter)[source]

idxConverter converts row,col tuple to either (row,col), (col) etc depending on what access is used for []

class woo.qt.ObjectEditor.AttrEditor_AlignedBox3(parent, getter, setter)[source]

idxConverter converts row,col tuple to either (row,col), (col) etc depending on what access is used for []

class woo.qt.ObjectEditor.AttrEditor_Bits(parent, getter, setter)[source]
checkersPerRow = 3
refresh()[source]
setFocus(self)[source]

setFocus(self, Qt.FocusReason)

update(self)[source]

update(self, QRect) update(self, QRegion) update(self, int, int, int, int)

class woo.qt.ObjectEditor.AttrEditor_Bool(parent, getter, setter)[source]
refresh()[source]
update(self)[source]

update(self, QRect) update(self, QRegion) update(self, int, int, int, int)

class woo.qt.ObjectEditor.AttrEditor_Choice(parent, getter, setter, isColormap)[source]
multiplierChanged(convSpec)[source]
refresh()[source]
setFocus(self)[source]

setFocus(self, Qt.FocusReason)

update(self)[source]

update(self, QRect) update(self, QRegion) update(self, int, int, int, int)

class woo.qt.ObjectEditor.AttrEditor_FileDir(parent, getter, setter, isDir, isExisting)[source]
dialogShow()[source]
refresh()[source]
relToggled(isRel)[source]
update(self)[source]

update(self, QRect) update(self, QRegion) update(self, int, int, int, int)

class woo.qt.ObjectEditor.AttrEditor_Float(parent, getter, setter)[source]
multiplierChanged(convSpec)[source]
refresh()[source]
update(self)[source]

update(self, QRect) update(self, QRegion) update(self, int, int, int, int)

class woo.qt.ObjectEditor.AttrEditor_FloatRange(parent, getter, setter)[source]
multipliedGetter()[source]
multiplierChanged(convSpec)[source]
refresh()[source]
setFocus(self)[source]

setFocus(self, Qt.FocusReason)

sliDiv = 500
sliderMoved(newSliderPos)[source]
sliderPosToNum(sliderValue)[source]
sliderReleased()[source]
updateFromText()[source]
class woo.qt.ObjectEditor.AttrEditor_Int(parent, getter, setter)[source]
refresh()[source]
update(self)[source]

update(self, QRect) update(self, QRegion) update(self, int, int, int, int)

class woo.qt.ObjectEditor.AttrEditor_IntRange(parent, getter, setter)[source]
refresh()[source]
setFocus(self)[source]

setFocus(self, Qt.FocusReason)

sliderMoved(val)[source]
updateFromSlider()[source]
updateFromSpin()[source]
class woo.qt.ObjectEditor.AttrEditor_Matrix3(parent, getter, setter)[source]

idxConverter converts row,col tuple to either (row,col), (col) etc depending on what access is used for []

class woo.qt.ObjectEditor.AttrEditor_MatrixX(parent, getter, setter, rows, cols, idxConverter)[source]

idxConverter converts row,col tuple to either (row,col), (col) etc depending on what access is used for []

multiplierChanged(convSpec)[source]
refresh()[source]
setFocus(self)[source]

setFocus(self, Qt.FocusReason)

update(self)[source]

update(self, QRect) update(self, QRegion) update(self, int, int, int, int)

class woo.qt.ObjectEditor.AttrEditor_MatrixXX(parent, getter, setter)[source]

idxConverter converts row,col tuple to either (row,col), (col) etc depending on what access is used for []

class woo.qt.ObjectEditor.AttrEditor_MatrixXi(parent, getter, setter, rows, cols, idxConverter)[source]

idxConverter converts row,col tuple to either (row,col), (col) etc depending on what access is used for []

refresh()[source]
setFocus(self)[source]

setFocus(self, Qt.FocusReason)

update(self)[source]

update(self, QRect) update(self, QRegion) update(self, int, int, int, int)

class woo.qt.ObjectEditor.AttrEditor_Quaternion(parent, getter, setter)[source]
refresh()[source]
setFocus(self)[source]

setFocus(self, Qt.FocusReason)

update(self)[source]

update(self, QRect) update(self, QRegion) update(self, int, int, int, int)

class woo.qt.ObjectEditor.AttrEditor_RgbColor(parent, getter, setter)[source]
dialogChanged()[source]
dialogShow()[source]
refresh()[source]
to256(v)[source]
to256c(f)[source]
to256str(v, sep=',')[source]
toggled(enabled)[source]
update(self)[source]

update(self, QRect) update(self, QRegion) update(self, int, int, int, int)

class woo.qt.ObjectEditor.AttrEditor_Se3(parent, getter, setter)[source]
refresh()[source]
setFocus(self)[source]

setFocus(self, Qt.FocusReason)

update(self)[source]

update(self, QRect) update(self, QRegion) update(self, int, int, int, int)

class woo.qt.ObjectEditor.AttrEditor_Str(parent, getter, setter)[source]
refresh()[source]
update(self)[source]

update(self, QRect) update(self, QRegion) update(self, int, int, int, int)

class woo.qt.ObjectEditor.AttrEditor_Vector2(parent, getter, setter)[source]

idxConverter converts row,col tuple to either (row,col), (col) etc depending on what access is used for []

class woo.qt.ObjectEditor.AttrEditor_Vector2i(parent, getter, setter)[source]

idxConverter converts row,col tuple to either (row,col), (col) etc depending on what access is used for []

class woo.qt.ObjectEditor.AttrEditor_Vector3(parent, getter, setter)[source]

idxConverter converts row,col tuple to either (row,col), (col) etc depending on what access is used for []

class woo.qt.ObjectEditor.AttrEditor_Vector3i(parent, getter, setter)[source]

idxConverter converts row,col tuple to either (row,col), (col) etc depending on what access is used for []

class woo.qt.ObjectEditor.AttrEditor_Vector6(parent, getter, setter)[source]

idxConverter converts row,col tuple to either (row,col), (col) etc depending on what access is used for []

class woo.qt.ObjectEditor.AttrEditor_Vector6i(parent, getter, setter)[source]

idxConverter converts row,col tuple to either (row,col), (col) etc depending on what access is used for []

class woo.qt.ObjectEditor.AttrEditor_VectorX(parent, getter, setter)[source]

idxConverter converts row,col tuple to either (row,col), (col) etc depending on what access is used for []

class woo.qt.ObjectEditor.NewFundamentalDialog(parent, attrName, typeObj, typeStr)[source]
result(self)int[source]
class woo.qt.ObjectEditor.NewObjectDialog(parent, baseClass, includeBase=True)[source]
comboSlot(index)[source]
result(self)int[source]
sizeHint(self)QSize[source]
class woo.qt.ObjectEditor.ObjQLabel(parent, label, tooltip, path, ser=None, elide=False, searchSlot=None)[source]
mousePressEvent(self, QMouseEvent)[source]
setColor(match)[source]
setTextToolTip(label, tooltip, elide=False)[source]
class woo.qt.ObjectEditor.ObjectEditor(ser, parent=None, ignoredAttrs={}, objAttrLabelList=None, showType=False, path=None, labelIsVar=True, showChecks=False, showUnits=False, objManip=True, nesting=0)[source]

Class displaying and modifying attributes of a woo object, or of unrelated attributes of different objects.

Construct window, ser is the object we want to show.

class EntryData(obj, name, T, doc, groupNo, trait, containingClass, editor, label)[source]
eval_hideIf()[source]
propertyId()[source]
setVisible(visible=None)[source]
toggleChecked(checked)[source]
unitChanged(ix0=- 1, forceBaseUnit=False)[source]
class EntryGroupData(number, name)[source]
makeExpander(expanded)[source]
setExpanderIcon()[source]
toggleExpander()[source]
addAttrEntry(obj, trait, klass, label=None)[source]

Return attribute entry where obj is the parent object, trait is the attribute trait, klass is the class of the attribute (as python type; if 1-tuple, list of those types). label is what will be shown in the UI; if omitted, trait.name will be used by default.

addListObjAttrEntries(objAttrLabelList)[source]
addSerAttrEntries()[source]
collections = <module 'collections' from '/usr/lib/python3.8/collections/__init__.py'>
doObjManip(action, entry, isNone, isObj)[source]

Handle menu action from objManipLabelMenu

getAttrLabelToolTip(entry)[source]
getDocstring(attr=None)[source]

If attr is None, return docstring of the Object itself

handleBits(getter, setter, entry)[source]
handleChoices(getter, setter, entry)[source]
handleFileDir(getter, setter, entry)[source]
handleRanges(getter, setter, entry)[source]
handleRgbColor(getter, setter, entry)[source]
logging = <module 'logging' from '/usr/lib/python3.8/logging/__init__.py'>
maxListLen = 40
maxNest = 6
mkStub()[source]
mkWidget(entry)[source]
mkWidgets()[source]
objManipLabelMenu(entry, pos)[source]

context menu for creating/deleting/loading/saving woo.core.Object from within the editor

refresh()[source]
refreshEvent()[source]
saveObject(obj)[source]
search(text)[source]
serQLabelMenu(widget, position)[source]
setFromLib(entry, name, obj)[source]
toggleLabelIsVar(val=None)[source]
toggleShowChecks(val=None)[source]
toggleShowUnits(val=None)[source]
woo.qt.ObjectEditor.QLineEdit_setTextStable(self, text)[source]
class woo.qt.ObjectEditor.QLineEdit_subattr(parent)[source]
focusInEvent(self, QFocusEvent)[source]
focusOutEvent(self, QFocusEvent)[source]
woo.qt.ObjectEditor.QSpinBox_setValueStable(self, value)[source]
class woo.qt.ObjectEditor.Se3FakeType[source]
class woo.qt.ObjectEditor.SeqFundamentalEditor(parent, getter, setter, itemType)[source]
contextMenuEvent(self, QContextMenuEvent)[source]
downSlot(i)[source]
fromClipSlot(i)[source]
keyFocusIndex()[source]
keyPressEvent(self, QKeyEvent)[source]
killSlot(i)[source]
localPositionToIndex(pos, isGlobal=False)[source]
mapList2Seq(l)[source]

return sequence (object) index from given list (widget) index.

mapSeq2List(s)[source]

return list (widget) index from given sequence (object) index. Return -1 if the item is not shown in the UI due to splitting.

maxShowLen = 60
multiplierChanged(convSpec)[source]
newSlot(i)[source]
rebuild()[source]
recomputeSplit(currLen)[source]
refresh()[source]
refreshEvent(dontRebuild=False, forceIx=- 1)[source]
renumber(currLen)[source]
upSlot(i)[source]
woo.qt.ObjectEditor.SeqObject

alias of woo.qt.ObjectEditor.SeqObjectComboBox

class woo.qt.ObjectEditor.SeqObjectComboBox(parent, getter, setter, T, trait, path=None, shrink=False, nesting=0)[source]
cloneSlot()[source]
comboIndexSlot(ix)[source]
downSlot()[source]
getItemType()[source]
killSlot()[source]
libLoadSlot(name, obj)[source]
loadSlot()[source]
maxShowLen = 500
newSlot()[source]
refresh()[source]
refreshEvent(forceIx=- 1)[source]
upSlot()[source]
class woo.qt.ObjectEditor.WidgetUpdatesDisabled(widget)[source]

Context manager/decorator for disabling updates of qt widgets temporarily

woo.qt.ObjectEditor.getColormapIcons()[source]
woo.qt.ObjectEditor.hasActiveLabel(s)[source]
woo.qt.ObjectEditor.makeColormapIcons()[source]
woo.qt.ObjectEditor.makeLibraryBrowser(parentmenu, callback, types, libName='Library')[source]

Create menu under parentmenu named libName. types are passed to woo.objectlibrary.checkout. callback is called with chosen (name,object) as arguments.

woo.qt.ObjectEditor.makeObjectLabel(ser, href=False, addr=True, boldHref=True, num=- 1, count=- 1)[source]

woo.qt.Inspector

class woo.qt.Inspector.BodyInspector(parId=None, parent=None, bodyLinkCallback=None, intrLinkCallback=None)[source]
bodyIdSlot(currId)[source]
changeIdSlot(newId)[source]
displayForces()[source]
gotoBodySlot()[source]
gotoIntrSlot()[source]
refreshEvent()[source]
tryShowBody()[source]
class woo.qt.Inspector.CellInspector(parent=None)[source]
refresh()[source]
update(self)[source]

update(self, QRect) update(self, QRegion) update(self, int, int, int, int)

class woo.qt.Inspector.EngineInspector(parent=None)[source]
class woo.qt.Inspector.InteractionInspector(ids=None, parent=None, bodyLinkCallback=None)[source]
gotoId(bodyId)[source]
gotoId1Slot()[source]
gotoId2Slot()[source]
refreshEvent()[source]
setLinIxSlot(linIx)[source]
setupInteraction()[source]

Change view; called whenever the interaction to be displayed changes

class woo.qt.Inspector.SceneInspector(parent=None)[source]
class woo.qt.Inspector.SimulationInspector(parent=None)[source]
changeBodyId(id)[source]
changeIntrIds(ids)[source]
woo.qt.Inspector.getBodyIdFromLabel(label)[source]
woo.qt.Inspector.makeBodyLabel(b)[source]

woo.qt.img_rc

woo.qt.img_rc.qCleanupResources()[source]
woo.qt.img_rc.qInitResources()[source]

woo.qt.ui_controller

class woo.qt.ui_controller.Ui_Controller[source]
retranslateUi(Controller)[source]
setupUi(Controller)[source]

woo.qt.DisplayProfiles

woo.qt.DisplayProfiles.predefHighQuality()[source]
woo.qt.DisplayProfiles.predefLowQuality()[source]
woo.qt.DisplayProfiles.predefNonspheresSpheres()[source]
woo.qt.DisplayProfiles.predefPublishing()[source]
woo.qt.DisplayProfiles.predefSpheresNonspheres()[source]

Tip

Report issues or inclarities to github.