Quick Menu (quickmenu)
Quick Menu
A QuickMenu widget provides lists of actions organized in tabs
with a quick search functionality.
- class orangecanvas.document.quickmenu.QuickMenu(parent: QWidget | None = None, **kwargs: Any)[source]
Bases:
FramelessWindowA quick menu popup for the widgets.
The widgets are set using
QuickMenu.setModel()which must be a model as returned byQtWidgetRegistry.model()- triggered(QAction)
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- hovered(QAction)
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- setSizeGripEnabled(enabled: bool) → None[source]
Enable the resizing of the menu with a size grip in a bottom right corner (enabled by default).
- addPage(name: str, page: MenuPage) → int[source]
Add the page (
MenuPage) with name and return it’s index. The page.icon() will be used as the icon in the tab bar.
- createPage(index: QModelIndex) → MenuPage[source]
Create a new page based on the contents of an index (
QModeIndex) item.
- setSortingFunc(func: Callable[[Any, Any], bool] | None) → None[source]
Set a sorting function in the suggest (search) menu.
- popup(pos: QPoint | None = None, searchText: str = '') → None[source]
Popup the menu at pos (in screen coordinates). ‘Search’ text field is initialized with searchText if provided.
- class orangecanvas.document.quickmenu.MenuPage(parent: ~PyQt5.QtWidgets.QWidget | None = None, title: str = '', icon: ~PyQt5.QtGui.QIcon = <PyQt5.QtGui.QIcon object>, **kwargs: ~typing.Any)[source]
Bases:
ToolTreeA menu page in a
QuickMenuwidget, showing a list of actions. Shown actions can be disabled by setting a filtering function using thesetFilterFunc().