:right-sidebar: True ShortcutsSection =================================================================== .. currentmodule:: gi.repository.Adw .. versionadded:: 1.8 .. class:: ShortcutsSection(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.GObject.Object` Implemented Interfaces: :class:`~gi.repository.Gio.ListModel`, :class:`~gi.repository.Gtk.Buildable` An object representing a section in :obj:`~gi.repository.Adw.ShortcutsDialog`\. It contains :obj:`~gi.repository.Adw.ShortcutsItem` objects, use :obj:`~gi.repository.ShortcutsSection.add` to add them. ``AdwShortcutsSection`` implements the :obj:`~gi.repository.Gio.ListModel` interface and allows to access the added shortcut items through it. -------------------------------------------------------------------------------- ``AdwShortcutsSection`` allows adding ``AdwShortcutsItem`` objects as children. Constructors ------------ .. rst-class:: interim-class .. class:: ShortcutsSection :no-index: .. classmethod:: new(title: str | None = None) -> ~gi.repository.Adw.ShortcutsSection Creates a new ``AdwShortcutsSection`` with ``title`` as its title if provided. .. versionadded:: 1.8 :param title: the section title Methods ------- .. rst-class:: interim-class .. class:: ShortcutsSection :no-index: .. method:: add(item: ~gi.repository.Adw.ShortcutsItem) -> None Adds ``item`` to ``self``\. .. versionadded:: 1.8 :param item: the item to add .. method:: get_title() -> str | None Gets the title of ``self``\. .. versionadded:: 1.8 .. method:: set_title(title: str | None = None) -> None Sets the title of ``self``\. .. versionadded:: 1.8 :param title: the title to use Properties ---------- .. rst-class:: interim-class .. class:: ShortcutsSection :no-index: .. attribute:: props.item_type :type: ~gobject.GType The type of the None singleton. .. versionadded:: 1.9 .. attribute:: props.n_items :type: int The type of the None singleton. .. versionadded:: 1.9 .. attribute:: props.title :type: str The type of the None singleton. .. versionadded:: 1.8