Widgets Extended

Extended Checkbox

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

Bases: QWidget, MenuCreateClickMethods

stateChanged

alias of object

setText(text)
text()
mousePressEvent(event)

mouseClick emit

Checks to see if a menu exists on the current clicked mouse button, if not, use the original Qt behaviour

Parameters:

event (QEvent) – the mouse pressed event from the QLineEdit

setCheckedQuiet(value)

Sets the checkbox in quiet box without emitting a signal

Parameters:

value (bool) – True if checked, False if not checked

Extended Clippedlabel

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

Bases: QLabel

paintEvent(event)

Extended Color

class ColorButtonPressedEvent(index, color, srgb)

Bases: object

color = (-1, -1, -1)
index = -1
srgb = (-1, -1, -1)
class ColorPaletteColorList(*args: Any, **kwargs: Any)

Bases: QWidget

colorPressed

alias of ColorButtonPressedEvent

emitPaletteButtonPressed()
updatePaletteColors(newColorList)

Updates the palettes colors with the startHsvColor and hueRange

Parameters:

newColorList (list(tuple(float))) – list of colors (in what colour space?)

rebuildPalette(rows=2, columns=10, totalHeight=70, startHsvColor=(0.0, 0.8, 0.8), hueRange=280.0)

Currently not working???

Parameters:
  • rows

  • columns

  • totalHeight

  • startHsvColor

  • hueRange

Returns:

Return type:

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

Bases: QWidget

Creates a label and a color button (with no text) which opens a QT color picker, returns both rgb (0-255) and rgbF (0-1.0) values

colorChanged

alias of object

setColorSrgbInt(rgbList)

Sets the color of the button as per a rgb list in 0-255 range

Parameters:

rgbList (list) – r g b color in 255 range eg [255, 0, 0]

setColorSrgbFloat(rgbList)

Sets the color of the button as per a rgb list in 0-1 range, colors are not rounded

Parameters:

rgbList (list) – r g b color in float range eg [1.0, 0.0, 0.0]

pickColor()

Opens the color picker window If ok is pressed then the new color is returned in 0-255 ranges Eg (128, 255, 12) If Cancel is pressed the color is invalid and nothing happens

rgbColor()

returns rgb tuple with 0-255 ranges Eg (128, 255, 12)

rgbColorF()

returns rgb tuple with 0-1.0 float ranges Eg (1.0, .5, .6666)

connections()

Open the color picker when the button is pressed

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

Bases: QWidget, MenuCreateClickMethods

colorChanged

alias of tuple

colorDragged

alias of tuple

text()

returns the label name as a string

Return labelName:

the text name of the label

Rtype labelName:

str

fullName()
setWidth(width)

Sets the size of the color widget, dpi scale handled

Parameters:

width (int) – Width in pixels of the color btn

setHeight(height)

sets the size of the color widget, dpi scale handled

setDisabled(disabled=True)
setEnabled(enabled=True)
setDisabledLabel(disabled=True)
setColorLinearFloat(color, noEmit=True)

Sets the color as linear color in 0-1.0 float ranges Eg (1.0, .5, .6666) emits the color as a Srgb Int color Eg (0, 255, 134)

setColorSrgbFloat(col, noEmit=True)

sets the color as srgb tuple with 0-1.0 float ranges Eg (1.0, .5, .6666) emits the color as a Srgb Int color Eg (0, 255, 134)

setColorSrgbInt(col, noEmit=True)

sets the color as srgb Int tuple with 0-255 float ranges Eg (0, 255, 134) emits the color as a Srgb Int color Eg (0, 255, 134)

colorLinearFloat()

returns the color of the color picker in linear color With 0-1.0 float ranges Eg (1.0, .5, .6666), the color is in Linear color, not SRGB

colorSrgbInt()

returns rgb tuple with 0-255 ranges Eg (128, 255, 12)

colorSrgbFloat()

returns rgb tuple with 0-1.0 float ranges Eg (1.0, .5, .6666)

data()

Returns the stored dictionary key (None by default) and a hex color. The key is usually a dictionary key that is passed in on creation of the instance, used in stylesheets This method is pretty specific to stylesheets and could be moved, method must be named data

Return self.key:

the dict key passed into the initialise function, stylesheet key “FRAMELESS_TITLELABEL_COLOR”

Rtype self.key:

str

Return hexColor:

the color as hex, 6 letters eg ffffff

Rtype hexColor:

str

setMenu(menu, modeList=None, mouseButton=MockExt.QtCore.Qt.RightButton)

Add the left/middle/right click menu by passing in a QMenu,

Note

only works on the label currently.

If a modeList is passed in then create/reset the menu to the modeList:

[("icon1", "menuName1"), ("icon2", "menuName2")]

If no modeList the menu won’t change

Parameters:
  • menu (QtWidgets.QMenu) – the Qt menu to show on middle click

  • modeList (list(tuple(str))) – a list of menu modes (tuples) eg [(“icon1”, “menuName1”), (“icon2”, “menuName2”)]

  • mouseButton (QtCore.Qt.ButtonClick) – the mouse button clicked QtCore.Qt.LeftButton, QtCore.Qt.RightButton, QtCore.Qt.MiddleButton

addActionList(modes, mouseButton=MockExt.QtCore.Qt.RightButton)

resets the appropriate mouse click menu with the incoming modes

Note

Only works on the label currently. modeList: [(“icon1”, “menuName1”), (“icon2”, “menuName2”), (“icon3”, “menuName3”)]

Resets the lists and menus:

self.menuIconList: ["icon1", "icon2", "icon3"]
self.menuIconList: ["menuName1", "menuName2", "menuName3"]
Parameters:
  • modes (list(tuple(str))) – a list of menu modes (tuples) eg [(“icon1”, “menuName1”), (“icon2”, “menuName2”)]

  • mouseButton (QtCore.Qt.ButtonClick) – the mouse button clicked QtCore.Qt.LeftButton, QtCore.Qt.RightButton, QtCore.Qt.MiddleButton

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

Bases: QLabel

colorChanged

alias of object

mousePressEvent(event)
setWidth(width)
setRGBColor(rgb)
Parameters:

rgb

Returns:

color()
pickerColorChanged(colorEvent)
Parameters:

colorEvent (zoo.libs.pyqt.extended.colors.colorpopup.PickerColors) –

Returns:

pickerClosed(colorEvent)
Parameters:

colorEvent (zoo.libs.pyqt.extended.colors.colorpopup.PickerColors) –

Returns:

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

Bases: ColorBtn

offsetClicked

alias of tuple

hsvShowHide(showHue=True, showSat=True, showValue=True)

Hide/show the hue saturation buttons

Parameters:
  • showHue (bool) – Show/hide the hues buttons

  • showSat (bool) – Show/hide the hues buttons

  • showValue (bool) – Show/hide the hues buttons

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

Bases: QWidget

colorChanged

alias of tuple

text()

returns the label name as a string

Return labelName:

the text name of the label

Rtype labelName:

str

setColorBtnWidth(width)

Sets the color button widget width, dpi scale handled, will scale with cmds as pyside has issues overriding.

Parameters:

width (int) – pixel width of the color button.

setColorBtnHeight(height)

Sets the size of the color button widget, dpi scale handled

setDisabled(disabled=True)

Disables the color button, slider and label so it cannot be clicked

setEnabled(enabled=True)

Enables the color button, slider and label so it cannot be clicked

setDisabledLabelSlider(disabled=True)

Disables the color widget label and slider, the color picker and slider will work as per normal

setColorLinearFloat(color, noEmit=True)

Sets the color as linear color in 0-1.0 float ranges Eg (1.0, .5, .6666) emits the color as a Srgb Int color Eg (0, 255, 134)

Parameters:
  • color (tuple(float)) – color as linearFloat (1.0, .5, .6666)

  • noEmit (bool) – Block the signals so no emit takes place

setColorSrgbFloat(color, noEmit=True)

Sets the color as srgb tuple with 0-1.0 float ranges Eg (1.0, .5, .6666) emits the color as a Srgb Int color Eg (0, 255, 134)

Parameters:
  • color (tuple(float)) – color as srgbFloat (1.0, .5, .6666)

  • noEmit (bool) – Block the signals so no emit takes place

setColorSrgbInt(color, noEmit=True)

Sets the color as srgb Int tuple with 0-255 int ranges Eg (0, 255, 134) emits the color as a Srgb Int color Eg (0, 255, 134)

Parameters:
  • color (tuple(int)) – color as srgbInt (0, 255, 134)

  • noEmit (bool) – Block the signals so no emit takes place

colorLinearFloat()

Returns the color of the color picker in linear color With 0-1.0 float ranges Eg (1.0, .5, .6666), the color is in Linear color, not srgb

Return colorLinearFloat:

color in linear float range, eg (1.0, .5, .6666)

Rtype colorLinearFloat:

tuple(float)

colorSrgbInt()

Returns rgb tuple with 0-255 ranges Eg (128, 255, 12)

Return colorSrgbInt:

color in srgb int range, eg (128, 255, 12)

Rtype colorSrgbInt:

tuple(int)

colorSrgbFloat()

Returns rgb tuple with 0-1.0 float ranges Eg (1.0, .5, .6666)

Return colorSrgbFloat:

color in srgb float range, eg (1.0, .5, .6666)

Rtype colorSrgbFloat:

tuple(float)

uiConnections()

Setup the emit signals

Extended Colorpopup

class PickerColors(rgb, hsv, hex, a)

Bases: tuple

a

Alias for field number 3

hex

Alias for field number 2

hsv

Alias for field number 1

rgb

Alias for field number 0

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

Bases: QLabel

qicon = None
move(pt)

Move the color handle

Parameters:

pt

Returns:

centerSize()

The Center point

(eg. self.width() / 2, self.height / 2)

Returns:

handlePos()

The handle position.

The returned point is the center.

Returns:

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

Bases: QLabel

colorChanged

alias of object

qicon = None
normalizedPoint()

Normalized point (y-down is positive, eg QT UI Coordinates)

Returns:

handlePos()

Returns the handle position

Returns:

mousePressEvent(event)

Mouse press event

Parameters:

event

Returns:

pointIsInside(pt)

Check if point is inside the circle

Parameters:

pt

Returns:

mouseMoveEvent(event)

Mouse Move event. Move handle if pressed

Parameters:

event

Returns:

moveHandle(pt)
rgbToPoint(rgb)
colorValue()
setPixelColor(pt)
rgbToNormPoint(rgb, yUp=False)

RGB to norm point (Y-Up) Y-Up is cartesian Y-Down is QT ui coordinates

Parameters:

rgb

Returns:

pointToRGB(x, y)

Converts x,y to rgb

Parameters:
  • x

  • y

Returns:

centerPoint()
keepInCircle(pt)
mouseReleaseEvent(event)
class ValueStrip(*args: Any, **kwargs: Any)

Bases: QLabel

valueChanged

alias of object

qicon = None
mousePressEvent(event)

Mouse press event

Parameters:

event

Returns:

setValue(val)

Set the value of the value strip. Will move the handle to the correct position

Parameters:

val

Returns:

mouseMoveEvent(event)

Mouse move event

Parameters:

event

Returns:

mouseReleaseEvent(event)
value()

Get Value

Returns:

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

Bases: ZooWindow

colorPickerClosed

alias of object

colorChanged

alias of object

popupClosed()

Popup closed

Returns:

colors()

Converts all the values and turns it into a colour picker event

Returns:

rgb()

Gets the rgb from the color picker

Returns:

hsv()

Returns the HSV from the color picker

Returns:

hexColor()

Returns the hex color

Returns:

valueChanged(value)

Value changed

Parameters:

value

Returns:

alphaChanged(text)

Alpha Changed

Parameters:

text

Returns:

colorWheelChanged(col)

Color wheel changed

Parameters:

color

Returns:

setHSVEdit(hsv)

Set the HSV Edit

Parameters:

hsv

Returns:

setHexEditRGB(rgb)

Set the Hex edit based on RGB

Parameters:

rgb

Returns:

setHexEditHSV(hsv)

Set the Hex edit based on HSV

Parameters:

hsv

Returns:

setRGBEdits(rgb)

Set the RGB edit widgets

Parameters:

rgb

Returns:

colorTabClicked(event)

Color tab clicked

Parameters:

event

Returns:

stackedWidgetColors()

Initialize stacked widget colors

Returns:

Extended Embeddedwindow

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

Bases: QFrame

targetSizeVPolicy = None
visibilityChanged

alias of bool

initUi()

Create the UI with an optional title and close icon top right. Pass in no title or close button and the

Embed Window will be empty.

If adding your own close button, pass into the class:

closeButton=None

and subclass this method with your own button named:

self.hidePropertiesBtn

The class will pick this button up and use it for close functionality.

self.propertiesLayout is the VLayout where other items can be added to the window. This can also be returned with the method getLayout()

getLayout()

Returns the QVLayout where other widgets can be added to the embedded window

getTitleLbl()

Returns the title QLabel widget so that it can be altered

getHideButton()

Returns the hide button so functionality can be assigned to it

setTitle(title)

Set the title of the embedded window

Parameters:

title (str) – the Title of the embedded window

hideEmbedWindow()

Hide the embedded window

showEmbedWindow()

Show the embedded window

setEmbedVisible(visible, resizeTarget=True)

Show or hide the embed window

If resizeTarget resize the target widget to it’s minimumHeight when the embed window on show, return to

default on hide. The widget should be passed in or set with self.setResizeTarget(widget)

Parameters:
  • visible (bool) – Is the embed window visible or not

  • resizeTarget – If True resize the target widget to it’s minimumHeight when the embed window is visable

sizeHint()

Size hint

Returns:

Return type:

connections()

UI interaction connections, hide button

setState(state)
state()
setResizeTarget(target)

The resize target widget

The Target to resize when this embedded window appears. For example, we want the embedded window to appear but that would make the window too big. It will shrink the target widget so our window will be the same size.

Parameters:

target (QtWidgets.QWidget) –

Returns:

Extended Hotkeydetectedit

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

Bases: SearchLineEdit

setText(text, resetCursor=True)

Set text of HotKeyEdit

Parameters:
  • text

  • resetCursor

Returns:

keyPressEvent(e)

Update the text edit to whatever the hotkey is inputted

For example type in Ctrl+Alt+P and it would set the text of the QLineEdit to “Ctrl+Alt+P”

Parameters:

e

Returns:

isKeySupported(key)
convertSpecChars(charInt)

Converts special characters back to the original keyboard number

Parameters:

charInt

Returns:

Extended Lineedit

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

Bases: QLineEdit, MenuCreateClickMethods

textModified

alias of object

mousePressed

alias of object

mouseReleased

alias of object

mouseMoved

alias of object

textChanged

alias of object

property textTouched
initValidator()

To be overridden in subclass

Returns:

Return type:

value()

Get Value

Returns:

Return type:

focusInEvent(event)

Mouse enter event

Parameters:

event

Returns:

setAlphanumericValidator()

Only allow numbers and letters.

Returns:

Return type:

setValue(value, updateText=True)

Set the value of the line edit

Parameters:
  • value

  • updateText

Returns:

Return type:

mousePressEvent(event)

mouseClick emit

Checks to see if a menu exists on the current clicked mouse button, if not, use the original Qt behaviour

Parameters:

event (Qt.QtGui.QMouseEvent) – the mouse pressed event from the QLineEdit

mouseReleaseEvent(event)
Parameters:

event (Qt.QtGui.QMouseEvent) –

Returns:

Return type:

mouseMoveEvent(event)
Parameters:

event (Qt.QtGui.QMouseEvent) –

Returns:

Return type:

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

Bases: LineEdit

initValidator()

Initialize the validator (in our case float)

Returns:

Return type:

setValue(value, updateText=True)

Set value for float event

Parameters:
  • value (float) –

  • updateText

Returns:

Return type:

classmethod convertValue(value)

Converts value to float

Parameters:

value

Returns:

Return type:

setText(text)
value()

Get float value

Returns:

Return type:

float

focusInEvent(event)

Focus In event

Parameters:

event

Returns:

Return type:

focusOutEvent(event)

Focus out event

Parameters:

event

Returns:

Return type:

setRounding(rounding)

Sets the padding of the text (usually for floats)

clearFocus()

On clear focus run some code

Returns:

Return type:

updateRoundText()

Round the text

Returns:

Return type:

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

Bases: LineEdit

initValidator()

Set validator, in this case Integer

Returns:

Return type:

setValue(value, updateText=True)

Set the value to an integer. Update the text as well if true

Parameters:
  • value

  • updateText

Returns:

Return type:

classmethod convertValue(value)

Converts value to int

Parameters:

value

Returns:

Return type:

value()

Get value as int

Returns:

Return type:

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

Bases: QWidget

A label with multiple QLineEdits (text boxes), no spin boxes usually for x y z numeric input use inputMode=”float” to restrict the data entry to decimal numbers

textChanged

alias of tuple

textModified

alias of tuple

widget(axis)

Gets the widget from the axis string name

Parameters:

axis (tuple(str)) – the single axis eg. “x”

Return widget:

the LineEdit as a widget

Rtype widget:

QWidget

value()

Gets the tuple values (text) of all the QLineEdits

Return textValues:

a tuple of string values from each QLineEdit textbox

Rtype textValues:

tuple(str)

setValue(value)

Sets the text values of all the QLineEdits, can be strings floats or ints depending on the inputMode

Parameters:

value (tuple[float] or list[float]) – the value of all text boxes, as a list of strings (or floats, ints depending on inputMode)

setLabelFixedWidth(width)

Set the fixed width of the label

hideLineEdit(axisInt)

hides one of the lineEdits from by index from self.axis list

Parameters:

axisInt (int) – the index of the lineEdit to hide

showLineEdit(axisInt)

shows one of the lineEdits from by index from self.axis list

Parameters:

axisInt (int) – the index of the lineEdit to hide

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

Bases: QObject

tickEvent

alias of object

deltaChanged

alias of object

sliderChanged

alias of object

setEnabled(enabled)

Set enabled

tick(delta)

Ran per tick

Parameters:

delta

Returns:

Return type:

mouseMoveEvent(event)

Mouse move event

Parameters:

event (Qt.QtGui.QMouseEvent) –

Returns:

Return type:

mousePressEvent(event)

mouse press event

Parameters:

event (Qt.QtGui.QMouseEvent) –

Returns:

Return type:

mouseReleaseEvent(event)

mouse release event

Parameters:

event (Qt.QtGui.QMouseEvent) –

Returns:

Return type:

Extended Listviewplus

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

Bases: QFrame

selectionChanged

alias of object

contextMenuRequested

alias of list

registerRowDataSource(dataSource)
expandAll()
setSearchRole(role)
setSearchable(value)
setToolBarVisible(value)
setToolBarSearchSlidingActive(state)
setShowTitleLabel(value)
setListViewSpacing(spacing)
setMainSpacing(spacing)
setSearchMargins(left, top, right, bottom)
selectionModel()
model()
rootModel()
onSelectionChanged(current, previous)
selectedItems()
selectedQIndices()
connections()
setModel(model)
refresh()
contextMenu(position)
class ListViewPlusSelectionChangedEvent(current, previous, parent)

Bases: object

Extended Menu

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

Bases: QMenu

mouseButtonClicked

alias of object

mouseReleaseEvent(event)

Emit signal for other mouse events like middle and right click for Menu Items

Parameters:

event (QtGui.QMouseEvent) –

Returns:

class MenuCreateClickMethods

Bases: object

This class can be added to any widget to help add left/right/middle click menus to any widget The widget must be extended to support the menus

To add a menu to a supported extended widget

myQMenu =  QtWidgets.QMenu(parent)  # create a menu, need to set it up with menu etc
zooQtWidget.setMenu(myQMenu, mouseButton=QtCore.Qt.RightButton)  # add menu to the UI with a mouse click

Or if you are using ExtendedMenu in zoocore_pro, you can easily automatically build the menu items/icons:

myExtMenu =  extendedmenu.ExtendedMenu()  # create an empty zoocore_pro menu (an extended QMenu)
theMenuModeList = [("menuIcon1", "Menu Item Name 1"),
                    (" menuIcon1  ", " Menu Item Name 2")]  # create the menu names and icons
zooQtWidget.setMenu(myExtMenu, modeList=theMenuModeList, mouseButton=QtCore.Qt.RightButton)  # add menu

ExtendedMenu in zoocore_pro can connect when a menu is changed with

theMenu.menuChanged.connect(runTheMenuFunction)

Then write a method or function that finds the menu and runs the appropriate code (must be a zoocore_pro ExtendedMenu)

def runTheMenuFunction(self):
    if theMenu.currentMenuItem() == theMenuModeList[0][1]:  # menu item name 1
        runSomeFunction("firstMenuItemClicked")
    elif theMenu.currentMenuItem() == theMenuModeList[1][1]:  # menu item name 1
        runSomeFunction("secondMenuItemClicked")
setupMenuClass(menuVOffset=20)

The __init__ of this class is not run with multi-inheritance, not sure why, so this is the __init__ code

Parameters:

menuVOffset (int) – The vertical offset (down) menu drawn from widget top corner. DPI is handled

setMenu(menu, modeList=None, mouseButton=MockExt.QtCore.Qt.RightButton)

Add the left/middle/right click menu by passing in a QMenu and assign it to the appropriate mouse click key

If a modeList is passed in then auto create/reset the menu to the modeList:

[(“icon1”, “menuName1”), (“icon2”, “menuName2”)]

If no modelist the menu won’t change

Parameters:
  • menu (QtWidgets.QMenu) – the Qt menu to show on middle click

  • modeList (list(tuple(str))) – a list of menu modes (tuples) eg [(“icon1”, “menuName1”), (“icon2”, “menuName2”)]

  • mouseButton (QtCore.Qt.ButtonClick) – the mouse button clicked QtCore.Qt.LeftButton, QtCore.Qt.RightButton, QtCore.Qt.MiddleButton

contextMenu(mouseButton)

Draw the menu depending on mouse click

Parameters:

mouseButton (QtCore.Qt.ButtonClick) – the mouse button clicked QtCore.Qt.LeftButton, QtCore.Qt.RightButton, QtCore.Qt.MiddleButton

getMenu(mouseButton=MockExt.QtCore.Qt.RightButton)

Get menu depending on the mouse button pressed

Parameters:

mouseButton (QtCore.Qt.ButtonClick) – the mouse button clicked QtCore.Qt.LeftButton, QtCore.Qt.RightButton, QtCore.Qt.MiddleButton

Returns:

The requested menu

Return type:

QtWidgets.QMenu

addActionList(modes, mouseButton=MockExt.QtCore.Qt.RightButton)

resets the appropriate menu with the incoming modes, Note: Use this method only if the menu is an ExtendedMenu from zoocore_pro

modeList: [(“icon1”, “menuName1”), (“icon2”, “menuName2”), (“icon3”, “menuName3”)]

resets the lists and menus:

self.menuIconList: [“icon1”, “icon2”, “icon3”] self.menuIconList: [“menuName1”, “menuName2”, “menuName3”]

Parameters:
  • modes (list(tuple(str))) – a list of menu modes (tuples) eg [(“icon1”, “menuName1”), (“icon2”, “menuName2”)]

  • mouseButton (QtCore.Qt.ButtonClick) – the mouse button clicked QtCore.Qt.LeftButton, QtCore.Qt.RightButton, QtCore.Qt.MiddleButton

Extended Snapshotui

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

Bases: ZooWindowThin

saved

alias of object

initUi()

Initialize Ui

updateUi()

Update Ui

setupTitleBar()

Make the title bar smaller

Returns:

Return type:

connections()

UI Connections

Returns:

Return type:

snapshot(hide=False)

Take the snapshot

Returns:

Return type:

heightOffset()
widthOffset()
sizeEditChanged()

Size Edit changed

setSnapshotSize(width, height)

Sets the size of the snapshot widget

Returns:

toggleAspectClicked()

Toggle Aspect button

Returns:

Return type:

toggleLockClicked()

Toggle Lock button

Returns:

Return type:

bottomSize()
windowResize()

Window resize (width and corner)

Returns:

Return type:

verticalResize()

Vertical Resize

Returns:

Return type:

resizeEvent(event)
updateWidgets()

Update the text edits

Returns:

Return type:

showEvent(event)
class SnapshotFrame(*args: Any, **kwargs: Any)

Bases: QFrame

For CSS Purposes

Extended Spinbox

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

Bases: QSpinBox

mousePressEvent(event)
mouseMoveEvent(event)
mouseReleaseEvent(event)
class DragDoubleSpinBox(*args: Any, **kwargs: Any)

Bases: QDoubleSpinBox

mousePressEvent(event)
mouseMoveEvent(event)
mouseReleaseEvent(event)
class VectorSpinBox(*args: Any, **kwargs: Any)

Bases: QWidget

Vector base Widget with spin box for transformations for n axis 3 x QDoubleSpinBox (numerical textEdit with spinBox)

valueChanged

alias of tuple

onValueChanged()
widget(axis)
value()
setValue(value)
class Matrix(*args: Any, **kwargs: Any)

Bases: QWidget

valueChanged

alias of tuple

onValueChanged()
Return type:

tuple(tuple(float))

widget(column)
class Transformation(*args: Any, **kwargs: Any)

Bases: QWidget

rotOrders = ('XYZ', 'YZX', 'ZXY', 'XZY', 'XYZ', 'ZYX')
axis = ('X', 'Y', 'Z')
valueChanged

alias of list

onValueChanged(value)
translation()
rotation()
scale()
rotationOrder()
Returns:

int of the rotation order combo box, not the str

Return type:

int

rotationOrderValue()
Returns:

str of the rotation order combo box, the literal value

Return type:

str

Extended Tableviewplus

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

Bases: QFrame

selectionChanged

alias of object

contextMenuRequested

alias of list

registerRowDataSource(dataSource)
registerColumnDataSources(dataSources)
setSearchable(value)
setAllowsManualRefresh(state)
setDragDropMode(mode)
selectionModel()
connections()
onSelectionChanged(current, previous)
onSearchBoxChanged(index, text)
model()
setModel(model)
refresh()
contextMenu(position)
openPersistentEditor(index)

Opens a persistent editor on the item at the given index. If no editor exists, the delegate will create a new editor.

Parameters:

index (QModelIndex) – The index to open.

selectedRows()

From all the selectedIndices grab the row numbers, this use selectionModel.selectedIndexes() to pull the rows out :return: A list of row numbers :rtype: list(int)

selectedColumns()
selectedItems()
selectedQIndices()
sort(column, order=MockExt.QtCore.Qt.AscendingOrder)
toggleColumn(column, state)

Extended Tabwidget

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

Bases: QTabWidget

Hotkey: Ctrl+T to add new Tab

contextMenuRequested

alias of object

newTabRequested

alias of object

renameTabRequested

alias of int

removeTabRequested

alias of int

addTabWidget(childWidget=None, dialog=False, name=None)

Will open dialog to get tab name and create a new tab with the childWidget set as the child of the new tab.

Parameters:

childWidget – QtWidget

onTabCloseRequested(index=-1, dialog=True)

Creates a inputDialog for removing the tab

renameTab(index=-1)

Creates a inputDialog for renaming the tab name

closeOtherTabs(index=-1)
keyPressEvent(event)

Extended Treeviewplus

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

Bases: QFrame

selectionChanged

alias of object

contextMenuRequested

alias of list

resizeToContents()
setDragDropMode(mode)
expandAll()
collapseAll()
setToolBarVisible(value)
setSearchable(value)
setShowTitleLabel(value)
supportShiftExpansion(state)
setAlternatingColorEnabled(alternating)

Disable alternating color for the rows

Returns:

selectionModel()
setSortingEnabled(enabled)
selectedItems()
selectedQIndices()
openPersistentEditor(index)

Opens a persistent editor on the item at the given index. If no editor exists, the delegate will create a new editor.

Parameters:

index (QModelIndex) – The index to open.

connections()
setModel(model)
onSelectionChanged(current, previous)
onSearchBoxChanged(index, text)
headerItems()
refresh()
contextMenu(position)
toggleColumn(column, state)
class TreeViewPlusSelectionChangedEvent(current, previous, parent)

Bases: object

property currentItems
property prevItems

Extended Viewfilterwidget

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

Bases: QWidget

Specialize widget for column row views eg. table view.

Contains Widgets.

  1. column Visibility combobox,

  2. column Filter combobox,

  3. Search Widget

Signals.

  1. ColumnVisibilityIndexChanged

  2. ColumnFilterIndexChanged

  3. SearchTextedChanged

  4. SearchTextedCleared

columnVisibilityIndexChanged

alias of int

columnFilterIndexChanged

alias of str

searchTextedChanged

alias of str

setHeaderVisibility(state)
setVisibilityItems(items)
setHeaderItems(items)
onVisibilityChanged(index, state)