instrumentserver.gui.misc#
Classes
|
|
|
Expanding the functionality of the AlertLabel to add green alerts to indicate successful things |
|
Base dialog for internal purposes. |
|
TabWidget whose tabs can be detached and moved around. |
|
|
|
- class instrumentserver.gui.misc.AlertLabel(parent: QWidget | None = None, pixmapSize: Tuple[int, int] = (20, 20))[source]#
Bases:
QLabel
- class instrumentserver.gui.misc.AlertLabelGreen(parent: QWidget | None = None, pixmapSize: Tuple[int, int] = (20, 20))[source]#
Bases:
AlertLabelExpanding the functionality of the AlertLabel to add green alerts to indicate successful things
- class instrumentserver.gui.misc.BaseDialog(parent: QWidget | None = None, flags: Any = <PyQt5.QtCore.Qt.WindowFlags object>, tittleBarButtonsWidth: int = 108)[source]#
Bases:
QDialogBase dialog for internal purposes. Has correct flags so that the question mark does not appear. Also overload set tittle such that the size of the window gets adjusted in a way that the tittle is not clipped.
- Parameters:
tittleBarButtonsWidth – The width of pixels that the icon, the width will be set such that it is this number plus whatever the tittle is plus 15 extra pixels of margin.
- class instrumentserver.gui.misc.DetachableTabWidget(*args: Any, **kwargs: Any)[source]#
Bases:
QTabWidgetTabWidget whose tabs can be detached and moved around. You can add 2 different kind of tabs, unclosable tabs and regular tabs. To add unclosable tabs used the addUnclosableTab method, while to add closable tabs use addTab method.
- onAttatchTab(widget: QWidget, name: str) None[source]#
Gets called when the user closes one of the detachable windows and properly attaches the tab back.
- onCloseTab(index: int, moving: bool = False) None[source]#
Closes the tab at index.
- Parameters:
index – Closes the tab at this index
moving – If True, will not emit any signals.
- onDetachTab(tab: int, point: QPoint) None[source]#
Gets triggered when the user drags out a tab. Opens a QMainWindow with the widget in the dragged tab.
- onTabClosed#
Signal(str) Emitted when a tab got closed.
- class instrumentserver.gui.misc.DetachedTab(contentWidget: QWidget, name: str, *args: Any, **kwargs: Any)[source]#
Bases:
QMainWindow- onCloseSignal#
Signal(QtWidgets.QWidget) emitted when a tab for the instrument is closed
- class instrumentserver.gui.misc.SeparableTabBar(*args: Any, **kwargs: Any)[source]#
Bases:
QTabBar- mouseMoveEvent(a0: QMouseEvent) None[source]#
Detects if the user is dragging a tab and starts the drag object.
- onDetachTab#
Signal(tabIndex, newPosition) Emitted when the user is dragging a tab out ofd the tab bar and should be detached.
- onMoveTab#
Signal(oldIndex, newIndex) Emitted when the user is moving the tabs.