labscript_utils.qtwidgets.dragdroptab.DragDropTabBar
- class labscript_utils.qtwidgets.dragdroptab.DragDropTabBar(parent, group_id)[source]
Bases:
_BaseDragDropTabBar
Methods
__init__
(parent, group_id)acceptDrops
(self)accessibleDescription
(self)accessibleName
(self)accessibleTabName
(self, index)actionEvent
(self, a0)actions
(self)activateWindow
(self)addAction
(self, action)addActions
(self, actions)addTab
(-> int)add_dragged_tab
(index, tab)Insert the tab at the given index and set all of its configuration
adjustSize
(self)autoFillBackground
(self)autoHide
(self)backgroundRole
(self)baseSize
(self)blockSignals
(self, b)changeCurrentOnDrag
(self)changeEvent
(self, a0)childAt
(-> Optional[QWidget])childEvent
(self, a0)children
(self)childrenRect
(self)childrenRegion
(self)clearFocus
(self)clearMask
(self)close
(self)closeEvent
(self, a0)colorCount
(self)connectNotify
(self, signal)contentsMargins
(self)contentsRect
(self)contextMenuEvent
(self, a0)contextMenuPolicy
(self)count
(self)create
(self[, window, initializeWindow, ...])createWindowContainer
(window[, parent, flags])currentIndex
(self)cursor
(self)customEvent
(self, a0)deleteLater
(self)depth
(self)destroy
(self[, destroyWindow, destroySubWindows])devType
(self)devicePixelRatio
(self)devicePixelRatioF
(self)devicePixelRatioFScale
()disconnect
(-> bool)disconnectNotify
(self, signal)documentMode
(self)dragEnterEvent
(self, a0)dragLeaveEvent
(self, a0)dragMoveEvent
(self, a0)drawBase
(self)dropEvent
(self, a0)dumpObjectInfo
(self)dumpObjectTree
(self)dynamicPropertyNames
(self)effectiveWinId
(self)elideMode
(self)ensurePolished
(self)ensure_visible
(index[, prefer_left])enterEvent
(self, a0)event
(self, a0)eventFilter
(self, a0, a1)expanding
(self)find
(a0)findChild
(-> QObjectT)findChildren
(...)focusInEvent
(self, a0)focusNextChild
(self)focusNextPrevChild
(self, next)focusOutEvent
(self, a0)focusPolicy
(self)focusPreviousChild
(self)focusProxy
(self)focusWidget
(self)font
(self)fontInfo
(self)fontMetrics
(self)foregroundRole
(self)frameGeometry
(self)frameSize
(self)geometry
(self)getContentsMargins
(self)grab
(self[, rectangle])grabGesture
(self, type[, flags])grabKeyboard
(self)grabMouse
()grabShortcut
(self, key[, context])graphicsEffect
(self)graphicsProxyWidget
(self)hasFocus
(self)hasHeightForWidth
(self)hasMouseTracking
(self)hasTabletTracking
(self)height
(self)heightForWidth
(self, a0)heightMM
(self)hide
(self)hideEvent
(self, a0)iconSize
(self)inherits
(self, classname)initPainter
(self, painter)initStyleOption
(self, option, tabIndex)inputMethodEvent
(self, a0)inputMethodHints
(self)inputMethodQuery
(self, a0)insertAction
(self, before, action)insertActions
(self, before, actions)insertTab
(-> int)insertion_index_at
(pos)Compute at which index the tab with given upper left corner position in global coordinates should be inserted into the tabBar.
installEventFilter
(self, a0)isActiveWindow
(self)isAncestorOf
(self, child)isEnabled
(self)isEnabledTo
(self, a0)isFullScreen
(self)isHidden
(self)isLeftToRight
(self)isMaximized
(self)isMinimized
(self)isModal
(self)isMovable
(self)isRightToLeft
(self)isSignalConnected
(self, signal)isTabEnabled
(self, index)isTabVisible
(self, index)isVisible
(self)isVisibleTo
(self, a0)isWidgetType
(self)isWindow
(self)isWindowModified
(self)isWindowType
(self)is_dragged_tab
(index)Return whether the tab at the given index is currently being dragged
keyPressEvent
(self, a0)keyReleaseEvent
(self, a0)keyboardGrabber
()killTimer
(self, id)layout
(self)layoutDirection
(self)leaveEvent
(self, a0)locale
(self)logicalDpiX
(self)logicalDpiY
(self)lower
(self)mapFrom
(self, a0, a1)mapFromGlobal
(self, a0)mapFromParent
(self, a0)mapTo
(self, a0, a1)mapToGlobal
(self, a0)mapToParent
(self, a0)mask
(self)maximumHeight
(self)maximumSize
(self)maximumWidth
(self)metaObject
(self)metric
(self, a0)minimumHeight
(self)minimumSize
(self)minimumSizeHint
(self)minimumTabSizeHint
(self, index)minimumWidth
(self)mouseDoubleClickEvent
(self, a0)mouseGrabber
()mouseMoveEvent
(event)Update the parent of the tab to be the DragDropTabWidget under the mouse, if any, otherwise update it to the limbo object.
mousePressEvent
(event)Take note of the tab that was clicked so it can be dragged on mouseMoveEvents
mouseReleaseEvent
(event)Same as mouseMove event - update the DragDropTabWidget and position of the tab to the current mouse position.
move
()moveEvent
(self, a0)moveTab
(self, from_, to)moveToThread
(self, thread)nativeEvent
(self, eventType, message)nativeParentWidget
(self)nextInFocusChain
(self)normalGeometry
(self)objectName
(self)on_scroll_button_clicked
(button)overrideWindowFlags
(self, type)overrideWindowState
(self, state)paintEngine
(self)paintEvent
(self, a0)paint_tab
(index, painter, option)paintingActive
(self)palette
(self)parent
(self)parentWidget
(self)physicalDpiX
(self)physicalDpiY
(self)pos
(self)previousInFocusChain
(self)property
(self, name)pyqtConfigure
(...)Each keyword argument is either the name of a Qt property or a Qt signal.
raise_
(self)receivers
(self, signal)rect
(self)releaseKeyboard
(self)releaseMouse
(self)releaseShortcut
(self, id)removeAction
(self, action)removeEventFilter
(self, a0)removeTab
(self, index)remove_dragged_tab
(index)Remove the tab at the given index and return all its configuration
render
(, sourceRegion, flags, ...)repaint
(-> None -> None)resize
()resizeEvent
(self, a0)restoreGeometry
(self, geometry)saveGeometry
(self)screen
(self)scroll
()selectionBehaviorOnRemove
(self)sender
(self)senderSignalIndex
(self)setAcceptDrops
(self, on)setAccessibleDescription
(self, description)setAccessibleName
(self, name)setAccessibleTabName
(self, index, name)setAttribute
(self, attribute[, on])setAutoFillBackground
(self, enabled)setAutoHide
(self, hide)setBackgroundRole
(self, a0)setBaseSize
()setChangeCurrentOnDrag
(self, change)setContentsMargins
()setContextMenuPolicy
(self, policy)setCurrentIndex
(self, index)setCursor
(self, a0)setDisabled
(self, a0)setDocumentMode
(self, set)setDrawBase
(self, drawTheBase)setElideMode
(self, a0)setEnabled
(self, a0)setExpanding
(self, enabled)setFixedHeight
(self, h)setFixedSize
()setFixedWidth
(self, w)setFocus
()setFocusPolicy
(self, policy)setFocusProxy
(self, a0)setFont
(self, a0)setForegroundRole
(self, a0)setGeometry
()setGraphicsEffect
(self, effect)setHidden
(self, hidden)setIconSize
(self, size)setInputMethodHints
(self, hints)setLayout
(self, a0)setLayoutDirection
(self, direction)setLocale
(self, locale)setMask
()setMaximumHeight
(self, maxh)setMaximumSize
()setMaximumWidth
(self, maxw)setMinimumHeight
(self, minh)setMinimumSize
()setMinimumWidth
(self, minw)setMouseTracking
(self, enable)setMovable
(self, movable)setObjectName
(self, name)setPalette
(self, a0)setParent
()setProperty
(self, name, value)setSelectionBehaviorOnRemove
(self, behavior)setShape
(self, shape)setShortcutAutoRepeat
(self, id[, enabled])setShortcutEnabled
(self, id[, enabled])setSizeIncrement
()setSizePolicy
()setStatusTip
(self, a0)setStyle
(self, a0)setStyleSheet
(self, styleSheet)setTabButton
(self, index, position, widget)setTabData
(self, index, data)setTabEnabled
(self, index, a1)setTabIcon
(self, index, icon)setTabOrder
(a0, a1)setTabText
(self, index, text)setTabTextColor
(self, index, color)setTabToolTip
(self, index, tip)setTabVisible
(self, index, visible)setTabWhatsThis
(self, index, text)setTabletTracking
(self, enable)setTabsClosable
(self, closable)setToolTip
(self, a0)setToolTipDuration
(self, msec)setUpdatesEnabled
(self, enable)setUsesScrollButtons
(self, useButtons)setVisible
(self, visible)setWhatsThis
(self, a0)setWindowFilePath
(self, filePath)setWindowFlag
(self, a0[, on])setWindowFlags
(self, type)setWindowIcon
(self, icon)setWindowIconText
(self, a0)setWindowModality
(self, windowModality)setWindowModified
(self, a0)setWindowOpacity
(self, level)setWindowRole
(self, a0)setWindowState
(self, state)setWindowTitle
(self, a0)set_tab_parent
(dest[, index, pos])Move the tab to the given parent DragDropTabBar if it's not already there.
shape
(self)sharedPainter
(self)show
(self)showEvent
(self, a0)showFullScreen
(self)showMaximized
(self)showMinimized
(self)showNormal
(self)signalsBlocked
(self)size
(self)sizeHint
(self)sizeIncrement
(self)sizePolicy
(self)stackUnder
(self, a0)startTimer
(self, interval[, timerType])statusTip
(self)style
(self)styleSheet
(self)tabAt
(self, pos)tabButton
(self, index, position)tabData
(self, index)tabIcon
(self, index)tabInserted
(self, index)tabLayoutChange
(self)tabRect
(self, index)tabRemoved
(self, index)tabSizeHint
(self, index)tabText
(self, index)tabTextColor
(self, index)tabToolTip
(self, index)tabWhatsThis
(self, index)tabletEvent
(self, a0)tabsClosable
(self)testAttribute
(self, attribute)thread
(self)timerEvent
(self, event)toolTip
(self)toolTipDuration
(self)tr
(self, sourceText[, disambiguation, n])underMouse
(self)ungrabGesture
(self, type)unsetCursor
(self)unsetLayoutDirection
(self)unsetLocale
(self)update
(-> None -> None)updateGeometry
(self)updateMicroFocus
(self)update_tab_index
(index, pos)Check if the tab at the given index, being dragged by the mouse at the given position, needs to be moved.
updatesEnabled
(self)usesScrollButtons
(self)visibleRegion
(self)whatsThis
(self)wheelEvent
(self, event)widgetAt
(pos)If the given position is over a DragDropTabBar belonging to the current group, return the DragDropTabBar.
width
(self)widthMM
(self)winId
(self)window
(self)windowFilePath
(self)windowFlags
(self)windowHandle
(self)windowIcon
(self)windowIconText
(self)windowModality
(self)windowOpacity
(self)windowRole
(self)windowState
(self)windowTitle
(self)windowType
(self)x
(self)y
(self)Attributes
DrawChildren
DrawWindowBackground
IgnoreMask
LeftSide
PdmDepth
PdmDevicePixelRatio
PdmDevicePixelRatioScaled
PdmDpiX
PdmDpiY
PdmHeight
PdmHeightMM
PdmNumColors
PdmPhysicalDpiX
PdmPhysicalDpiY
PdmWidth
PdmWidthMM
RightSide
RoundedEast
RoundedNorth
RoundedSouth
RoundedWest
SelectLeftTab
SelectPreviousTab
SelectRightTab
TriangularEast
TriangularNorth
TriangularSouth
TriangularWest
currentChanged
int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
customContextMenuRequested
int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
destroyed
int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
dragged_tab_grab_point
objectNameChanged
int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
staticMetaObject
tabBarClicked
int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
tabBarDoubleClicked
int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
tabCloseRequested
int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
tabMoved
int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
windowIconChanged
int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
windowIconTextChanged
int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
windowTitleChanged
int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
- FLUSH_GAP = 5
- SCROLL_BUTTON_GAP = 2
- SCROLL_BUTTON_WIDTH = 15
- property drag_in_progress
- property dragged_tab_index
- property dragged_tab_parent
- insertion_index_at(pos)[source]
Compute at which index the tab with given upper left corner position in global coordinates should be inserted into the tabBar.
- limbo = None
- mouseMoveEvent(event)[source]
Update the parent of the tab to be the DragDropTabWidget under the mouse, if any, otherwise update it to the limbo object. Update the position of the tab in the widget it’s in.
- mousePressEvent(event)[source]
Take note of the tab that was clicked so it can be dragged on mouseMoveEvents
- mouseReleaseEvent(event)[source]
Same as mouseMove event - update the DragDropTabWidget and position of the tab to the current mouse position. Unless the mouse position is outside of any widgets at the time of mouse release, in which case move the tab to its last known parent and position.
- paintEvent(self, a0: QPaintEvent | None)[source]
- set_tab_parent(dest, index=None, pos=None)[source]
Move the tab to the given parent DragDropTabBar if it’s not already there. index=None will determined the insertion index from the given mouse position.
- tab_widgets = {}
- update(self)[source]
- update(self, a0: QRect) None
- update(self, a0: QRegion) None
- update(self, ax: int, ay: int, aw: int, ah: int) None