:orphan: :py:mod:`pyqtribbon.gallery` ============================ .. py:module:: pyqtribbon.gallery Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: pyqtribbon.gallery.RibbonPopupWidget pyqtribbon.gallery.RibbonGalleryListWidget pyqtribbon.gallery.RibbonGalleryButton pyqtribbon.gallery.RibbonGalleryPopupListWidget pyqtribbon.gallery.RibbonGallery .. py:class:: RibbonPopupWidget Bases: :py:obj:`qtpy.QtWidgets.QFrame` The popup widget for the gallery widget. .. py:class:: RibbonGalleryListWidget(parent=None) Bases: :py:obj:`qtpy.QtWidgets.QListWidget` Gallery list widget. .. py:method:: resizeEvent(e: qtpy.QtGui.QResizeEvent) -> None Resize the list widget. .. py:method:: scrollToNextRow() -> None Scroll to the next row. .. py:method:: scrollToPreviousRow() -> None Scroll to the previous row. .. py:class:: RibbonGalleryButton Bases: :py:obj:`qtpy.QtWidgets.QToolButton` Gallery button. .. py:class:: RibbonGalleryPopupListWidget(parent=None) Bases: :py:obj:`RibbonGalleryListWidget` Gallery popup list widget. .. py:class:: RibbonGallery(minimumWidth=800, popupHideOnClick=False, parent=None) RibbonGallery(parent=None) Bases: :py:obj:`qtpy.QtWidgets.QFrame` A widget that displays a gallery of buttons. .. py:method:: resizeEvent(a0: qtpy.QtGui.QResizeEvent) -> None Resize the gallery. .. py:method:: popupMenu() -> pyqtribbon.menu.RibbonPermanentMenu Return the popup menu. .. py:method:: showPopup() Show the popup window .. py:method:: hidePopupWidget() Hide the popup window .. py:method:: popupWindowSize() Return the size of the popup window :return: size of the popup window .. py:method:: setPopupWindowSize(size: qtpy.QtCore.QSize) Set the size of the popup window :param size: size of the popup window .. py:method:: setSelectedButton() Set the selected button .. py:method:: setPopupHideOnClick(popupHideOnClick: bool) Set the hide on click flag :param popupHideOnClick: hide on click flag .. py:method:: addButton(text: str = None, icon: qtpy.QtGui.QIcon = None, slot=None, shortcut=None, tooltip=None, statusTip=None, checkable=False) -> pyqtribbon.toolbutton.RibbonToolButton Add a button to the gallery :param text: text of the button :param icon: icon of the button :param slot: slot to call when the button is clicked :param shortcut: shortcut of the button :param tooltip: tooltip of the button :param statusTip: status tip of the button :param checkable: checkable flag of the button. :return: the button added .. py:method:: addToggleButton(text: str = None, icon: qtpy.QtGui.QIcon = None, slot=None, shortcut=None, tooltip=None, statusTip=None) -> pyqtribbon.toolbutton.RibbonToolButton Add a toggle button to the gallery :param text: text of the button :param icon: icon of the button :param slot: slot to call when the button is clicked :param shortcut: shortcut of the button :param tooltip: tooltip of the button :param statusTip: status tip of the button. :return: the button added