Frameless

Container Widgets

class DockableMixin

Bases: object

class ContainerType

Bases: object

CT_DockingContainer = 1
CT_FramelessWindow = 2
class ContainerWidget

Bases: object

An abstract class that can be used in both container types, FramelessWindow and DockingContainer.

isDockingContainer()

Container widget can be either DockingContainer or FramelessWindow

Returns:

isFramelessWindow()

Container widget can be either DockingContainer or FramelessWindow

Returns:

setOnTop()
containerType()

Return container type

Returns:

ContainerType.CT_FramelessWindow or ContainerType.CT_DockingContainer

Return type:

int

setWidget(widget)
class FramelessWindow(*args: Any, **kwargs: Any)

Bases: QMainWindow, ContainerWidget

setOnTop(onTop)

Set window on top

Parameters:

onTop

Returns:

saveWindowPref()

Magic property for the frameless window to parent to the maya window for macs Also saves the size and position

setTransparency(enabled)

Set transparency

Parameters:

enabled

Returns:

Return type:

setShadowEffectEnabled(enabled)

Set the shadow effect of the zoo window

Parameters:

enabled

Returns:

setWidget(widget)

Set widget. Same as the DockingContainer.

Parameters:

widget (QtWidgets.QWidget) –

Returns:

Return type:

property zooWindow
setNewObjectName(widget)

Set new name based on widget

Parameters:

widget (QtWidgets.QWidget) –

class DockingContainer(*args: Any, **kwargs: Any)

Bases: DockableMixin, QWidget, ContainerWidget

deleteControl()

Delete control

moveToMouse()

Move the window to the mouse

setWidget(widget: ZooWindow) None

Set the main widget

Parameters:

widget (ZooWindow) –

Returns:

Return type:

resizeEvent(event)
Parameters:

event (QtGui.QResizeEvent) –

Returns:

showEvent(event)

Docking container show event.

Parameters:

event

Returns:

close()

Close windows

moveEvent(event: MockExt.QtGui.QMoveEvent) None

Move event

Parameters:

event (QtGui.QMoveEvent) –

enterEvent(event)

The enter event

Parameters:

event

undock()

For when the window is undocked

Returns:

Return type:

class SpawnerIcon(*args: Any, **kwargs: Any)

Bases: IconMenuButton

docked

alias of object

spawnSize = 35
mousePressEvent(event)

Mouse Press event

Parameters:

event

updateTheme(event)

Override update theme to ignore

Parameters:

event

Returns:

name()

Name should match frameless name.

If nothing found though, just generate a random one.

Returns:

Return type:

dockLocked()
initDockingContainer()

Initialize the docking container.

What this does is it creates a maya workspaceControl and moves the window into it. WorkspaceControls are used because it has docking functionality built-in.

It creates a small icon window, which can then be used to drag into a docked position in Maya.

Returns:

Return type:

workspaceFloating()

Is floating or not

Returns:

Return type:

mouseMoveEvent(event)

Mouse move event

Parameters:

event (QtGui.QMouseEvent) –

Returns:

Return type:

moveToMouse()

Move the window to the mouse

Returns:

Return type:

mouseReleaseEvent(event)

Mouse Release event

Parameters:

event

Returns:

Return type:

dockedEvent()

The dockedEvent when docked into Maya.

Returns:

Return type:

arrangeSplitters(w)

If docked into splitter widgets, fix the splitter sizes

Parameters:

w

Returns:

splitterAncestor(w)

Get the widgets splitter ancestors

Parameters:

w

Returns:

deleteControl()

Delete workspace control

Returns:

Return type:

setLogoHighlight(highlight)

Set the logo highlight

Parameters:

highlight (bool) –

Returns:

Return type:

toggleToolTips(taggedAction)
Parameters:

taggedAction

Type:

zoo.libs.pyqt.extended.searchablemenu.action.TaggedAction

Returns:

zooToolsProHelp()

Zoo Tools pro help

create3dCharactersAction()

The menu button to open to create 3d characters webpage

Returns:

Return type:

Resizers

class ResizeDirection

Bases: object

Flag attributes to tell what position the resizer is

Left = 1
Top = 2
Right = 4
Bottom = 8
class WindowResizer(*args: Any, **kwargs: Any)

Bases: QObject

installToLayout(layout, parent)
Parameters:

layout (Qt.QtWidgets.QGridLayout) –

Returns:

Return type:

hide()

Hide the resizers

Returns:

Return type:

show()

Show the resizers

Returns:

Return type:

isVisible()

Returns true if resizers are visible, false otherwise

Returns:

connections()

Connections

Returns:

Return type:

resizerWidth()

Calculates the total width of the vertical resizers

setResizerActive(active)

Enable or disable the resizers

Parameters:

active

resizerHeight()

Calculates the total height of the vertical resizers

setEnabled(enabled)

Set resizers enabled

Parameters:

enabled

Returns:

Return type:

class ResizeBase(*args: Any, **kwargs: Any)

Bases: QFrame

The resize widgets for the sides of the windows and the corners to resize the parent window.

paintEvent(event)

Mouse events seem to deactivate when its completely transparent. Hacky way to avoid that for now.

windowResizeStart()
mousePressEvent(event)
mouseMoveEvent(event)
windowResizeEvent()

Resize based on the mouse position and the current direction

setResizeDirection(direction)

Set the resize direction. Expects an int from ResizeDirection

setResizeDirection(ResizeDirection.Left | ResizeDirection.Top)
Parameters:

direction (int) – ResizeDirection

mouseReleaseEvent(event)
class CornerResize(*args: Any, **kwargs: Any)

Bases: ResizeBase

Resizer’s in the corner of the window

setResizeDirection(direction)

Set the resize direction. Expects an int from ResizeDirection

setResizeDirection(ResizeDirection.Left | ResizeDirection.Top)
Parameters:

direction (int) – ResizeDirection

class VerticalResize(*args: Any, **kwargs: Any)

Bases: ResizeBase

Resizer’s for the top, bottom,left and right of the window

setResizeDirection(direction)

Set the resize direction. Expects an int from ResizeDirection

setResizeDirection(ResizeDirection.Left | ResizeDirection.Top)
Parameters:

direction (int) – ResizeDirection

class HorizontalResize(*args: Any, **kwargs: Any)

Bases: ResizeBase

Resizer’s for the left and right of the window

setResizeDirection(direction)

Set the resize direction. Expects an int from ResizeDirection

setResizeDirection(ResizeDirection.Left | ResizeDirection.Top)
Parameters:

direction (int) – ResizeDirection

Widgets

class TitleBar(*args: Any, **kwargs: Any)

Bases: QFrame

moving

alias of object

class TitleStyle

Bases: object

Default = 'DEFAULT'
Thin = 'THIN'
setDebugColors(debug)
initUi()

Init UI

setTitleSpacing(spacing)
Parameters:

spacing

Returns:

setTitleAlign(align)

Set Title Align

Parameters:

align

setDockable(dockable)
setMoveEnabled(enabled)

Window moving enabled

Parameters:

enabled

Returns:

Return type:

setTitleStyle(style)

Set the title style

Parameters:

style (TitleStyle) –

Returns:

TitleStyle.Default or TitleStyle.Thin

Return type:

moveEnabled()

If the titlebar can drive movement.

Returns:

Return type:

setMaxButtonVisible(vis)

Set max button visible

Parameters:

vis

Returns:

Return type:

setMinButtonVisible(vis)

Set Minimize button visible

Parameters:

vis

Returns:

Return type:

titleStyle()

Return the title style

Returns:

Return type:

mouseDoubleClickEvent(event)

Mouse double clicked event

Parameters:

event (QtGui.QMouseEvent) –

Returns:

Return type:

setLogoHighlight(highlight)

Set logo highlight.

Highlight the logo

Parameters:

highlight

Returns:

Return type:

refreshTitleBar()

Workaround for mainLayout not showing

Returns:

setTitleClosesFirst(closeFirst)

Enabled means the title will disappear first after resizing if the width is too small

If its disabled, the contentsLayout will resize at the same speed as the titleLayout

Parameters:

closeFirst

Returns:

setTitleText(value='')

The text of the title bar in the window

Parameters:

value

Returns:

Return type:

connections()
Returns:

openHelp()

Open help url

Returns:

closeWindow()

Close the window.

Returns:

Return type:

setWindowIconSize(size)

Sets the icon size of the titlebar icons :param size: :return:

setMaximiseVisible(show=True)

Set Maximise button visible

Parameters:

show

setMinimiseVisible(show=True)

Set minimize button visibility

Parameters:

show

toggleContents()

Show or hide the additional contents in the titlebar

mousePressEvent(event)

Mouse click event to start the moving of the window

mouseReleaseEvent(event)

Mouse release for title bar

startMove()
endMove()
mouseMoveEvent(event)

Move the window based on if the titlebar has been clicked or not

class TitleSplitter(*args: Any, **kwargs: Any)

Bases: QSplitter

resizeEvent(event)

Makes sure the right widget closes first by keeping the left most widget size constant

Parameters:

event

Returns:

addWidget(*args, **kwargs)

Hides the handles on widget add

Parameters:
  • args

  • kwargs

Returns:

hideHandles()

Hides the handles and disable them

Returns:

class FramelessOverlay(*args: Any, **kwargs: Any)

Bases: OverlayWidget

mousePressEvent(event)

Alt-Middle click to move window

Parameters:

event

Returns:

classmethod isModifier()
mouseReleaseEvent(event)

Send events back down to parent

Parameters:

event

Returns:

mouseMoveEvent(event)
Parameters:

event

quadrant()

Get the quadrant of where the mouse is pointed, and return the direction

Returns:

The direction ResizeDirection

Return type:

ResizeDirection

show()
setEnabled(enabled)
updateStyleSheet()

Set style sheet

Returns:

class WindowContents(*args: Any, **kwargs: Any)

Bases: QFrame

For CSS purposes

class TitleLabel(*args: Any, **kwargs: Any)

Bases: ClippedLabel

For CSS purposes

Window

class KeyboardModifierFilter(*args: Any, **kwargs: Any)

Bases: QObject

windowEvent

alias of object

currentEvent = None
eventFilter(obj, event)
class ZooWindow(*args: Any, **kwargs: Any)

Bases: QWidget

helpUrl = ''
windowSettingsPath = ''
property windowEvent
setDefaultStyleSheet()

Try to set the default stylesheet, if not, just ignore it

Returns:

property titleContentsLayout
property cornerLayout
showOverlay()

Show overlay

Returns:

setOnTop(t)
move(*args, **kwargs)

Move window, offset the resizers if they are visible

Parameters:
  • args

  • kwargs

Returns:

classmethod getZooWindow(widget)

Gets the zoo window based on the widget

Parameters:

widget (QtWidgets.QWidget) –

Returns:

Return type:

ZooWindow

property docked

Docked signal

Returns:

Return type:

QtCore.Signal

property undocked

Undocked signal

Returns:

Return type:

QtCore.Signal

setMainLayout(layout)

Set the main layout

Parameters:

layout

Returns:

Return type:

mainLayout()

Main Layout

Will generate a vBoxLayout if it is empty.

Returns:

Return type:

titleDoubleClicked()

Title double-clicked

isMinimized()

Window is minimized

Returns:

Return type:

bool

setMinimizeEnabled(enabled)
Parameters:

enabled (bool) –

dockEvent(container)

Dock event

Returns:

Return type:

undockedEvent()

Undocked event

Returns:

Return type:

maximize()

Maximize UI

minimize()

Minimize UI

setUiMinimized(minimize)

Resizes the spacing, icons and hides only. It doesn’t resize the window.

Parameters:

minimize (bool) –

showResizers()

Show resizers

Returns:

Return type:

hideResizers()

Hide resizers

Returns:

Return type:

hide()

Hide the window

show(move=None)

Show the window

setTitleStyle(style)

Set title style

Parameters:

style – TitleStyle.Default or TitleStyle.Thin

titleStyle()

Get title style

Returns:

setLogoColor(color)
setMaxButtonVisible(vis)
setMinButtonVisible(vis)
centerToParent()

Center widget to parent

Returns:

showWindow()
setName(name)

Set the name of the widget

Parameters:

name

Returns:

Return type:

setTitle(text)

Set the title text

Parameters:

text

Returns:

Return type:

property windowResizedFinished
setResizable(active)

Window is resizable

Parameters:

active

Returns:

Return type:

resizerHeight()

Resizer height

Returns:

Return type:

resizerWidth()

Resizer Width

Returns:

Return type:

attachFramelessWindow(show=False, saveWindowPref=True)

Attach widget to frameless window

Parameters:
  • show

  • saveWindowPref – Restores positions from saved settings

Returns:

Return type:

FramelessWindow

resizeWindow(width=-1, height=-1)
Parameters:
Returns:

keyPressEvent(event)

Key Press event

Parameters:

event

Returns:

property parentContainer
Returns:

Return type:

FramelessWindow or DockingContainer

isDocked()
Returns:

Return type:

setMovable(movable)

Movable through the titlebar

Parameters:

movable (bool) –

Returns:

Return type:

movable()
close()

Close window

Returns:

Return type:

class ZooWindowThin(*args: Any, **kwargs: Any)

Bases: ZooWindow

Same as ZooWindow with modified title style

overlay
parentWindow()
Returns:

Return type:

QtWidgets.QWidget

getZooWindows()

Gets all frameless windows in the scene

Returns:

All found window widgets under the Maya window