def wrapped(*args, **kwargs): cursor = QtGui.QCursor(QtCore.Qt.ArrowCursor) QtWidgets.QApplication.setOverrideCursor(cursor) try: return fn(*args, **kwargs) finally: QtWidgets.QApplication.restoreOverrideCursor()
def showSelectionSetsMenu(self, **kwargs): """ Show the selection sets menu for this item at the cursor position. :rtype: QtWidgets.QAction """ menu = self.createSelectionSetsMenu(**kwargs) position = QtGui.QCursor().pos() action = menu.exec_(position) return action
def showFrameRangeMenu(): """ Show the frame range menu at the current cursor position. :rtype: QtWidgets.QAction """ menu = FrameRangeMenu() position = QtGui.QCursor().pos() action = menu.exec_(position) return action
def showSetsMenu(path, **kwargs): """ Show the frame range menu at the current cursor position. :type path: str :rtype: QtWidgets.QAction """ menu = SetsMenu.fromPath(path, **kwargs) position = QtGui.QCursor().pos() action = menu.exec_(position) return action
def showThemesMenu(parent=None, themes=None): """ Show a menu with the given themes. :type themes: list[Theme] :type parent: QtWidgets.QWidget :rtype: QtWidgets.QAction """ theme = Theme() menu = ThemesMenu(parent=parent, theme=theme, themes=themes) position = QtGui.QCursor().pos() action = menu.exec_(position) return theme
def showSelectionSetsMenu(self): """ Show the selection sets menu for the current folder path. :rtype: None """ import setsmenu path = self.folderPath() position = QtGui.QCursor().pos() libraryWindow = self.libraryWindow() menu = setsmenu.SetsMenu.fromPath(path, libraryWindow=libraryWindow) menu.exec_(position)