:right-sidebar: True PreferencesPage =================================================================== .. currentmodule:: gi.repository.Adw .. class:: PreferencesPage(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.Gtk.Widget`, :class:`~gi.repository.GObject.InitiallyUnowned`, :class:`~gi.repository.GObject.Object` Implemented Interfaces: :class:`~gi.repository.Gtk.Accessible`, :class:`~gi.repository.Gtk.Buildable`, :class:`~gi.repository.Gtk.ConstraintTarget` A page from :obj:`~gi.repository.Adw.PreferencesDialog`\. .. image:: https://gnome.pages.gitlab.gnome.org/libadwaita/doc/1-latest/preferences-page.png The ``AdwPreferencesPage`` widget gathers preferences groups into a single page of a preferences window. CSS nodes -------------------------------------------------------------------------------- ``AdwPreferencesPage`` has a single CSS node with name ``preferencespage``\. Accessibility -------------------------------------------------------------------------------- ``AdwPreferencesPage`` uses the :obj:`~gi.repository.Gtk.AccessibleRole.group` role. Constructors ------------ .. rst-class:: interim-class .. class:: PreferencesPage :no-index: .. classmethod:: new() -> ~gi.repository.Gtk.Widget Creates a new ``AdwPreferencesPage``\. Methods ------- .. rst-class:: interim-class .. class:: PreferencesPage :no-index: .. method:: add(group: ~gi.repository.Adw.PreferencesGroup) -> None Adds a preferences group to ``self``\. :param group: the group to add .. method:: get_banner() -> ~gi.repository.Adw.Banner | None Gets the banner displayed at the top of the page. .. versionadded:: 1.7 .. method:: get_description() -> str Gets the description of ``self``\. .. versionadded:: 1.4 .. method:: get_description_centered() -> bool Gets whether the description is centered. .. versionadded:: 1.6 .. method:: get_group(index: int) -> ~gi.repository.Adw.PreferencesGroup | None Gets the group at ``index``\. Can return ``NULL`` if ``index`` is larger than the number of groups in the page. .. versionadded:: 1.8 :param index: a group index .. method:: get_icon_name() -> str | None Gets the icon name for ``self``\. .. method:: get_name() -> str | None Gets the name of ``self``\. .. method:: get_title() -> str Gets the title of ``self``\. .. method:: get_use_underline() -> bool Gets whether an embedded underline in the title indicates a mnemonic. .. method:: insert(group: ~gi.repository.Adw.PreferencesGroup, index: int) -> None Inserts a preferences group to ``self`` at ``index``\. If ``index`` is negative or larger than the number of groups, appends the group, same as :obj:`~gi.repository.PreferencesPage.add`\. .. versionadded:: 1.8 :param group: the group to add :param index: the index to insert ``group`` a .. method:: remove(group: ~gi.repository.Adw.PreferencesGroup) -> None Removes a group from ``self``\. :param group: the group to remove .. method:: scroll_to_top() -> None Scrolls the scrolled window of ``self`` to the top. .. versionadded:: 1.3 .. method:: set_banner(banner: ~gi.repository.Adw.Banner | None = None) -> None Sets the banner displayed at the top of the page. .. versionadded:: 1.7 :param banner: the banner to display at the top of the page .. method:: set_description(description: str) -> None Sets the description of ``self``\. The description is displayed at the top of the page. .. versionadded:: 1.4 :param description: the description .. method:: set_description_centered(centered: bool) -> None Sets whether the description should be centered. .. versionadded:: 1.6 :param centered: If the description should be centered .. method:: set_icon_name(icon_name: str | None = None) -> None Sets the icon name for ``self``\. :param icon_name: the icon name .. method:: set_name(name: str | None = None) -> None Sets the name of ``self``\. :param name: the name .. method:: set_title(title: str) -> None Sets the title of ``self``\. :param title: the title .. method:: set_use_underline(use_underline: bool) -> None Sets whether an embedded underline in the title indicates a mnemonic. :param use_underline: ``TRUE`` if underlines in the text indicate mnemonics Properties ---------- .. rst-class:: interim-class .. class:: PreferencesPage :no-index: .. attribute:: props.banner :type: ~gi.repository.Adw.Banner A :obj:`~gi.repository.Adw.Banner` displayed at the top of the page. .. versionadded:: 1.7 .. attribute:: props.description :type: str The description to be displayed at the top of the page. .. versionadded:: 1.4 .. attribute:: props.description_centered :type: bool Whether the description should be centered. .. versionadded:: 1.6 .. attribute:: props.icon_name :type: str The icon name for this page. .. attribute:: props.name :type: str The name of this page. .. attribute:: props.title :type: str The title for this page. .. attribute:: props.use_underline :type: bool Whether an embedded underline in the title indicates a mnemonic. Fields ------ .. rst-class:: interim-class .. class:: PreferencesPage :no-index: .. attribute:: parent_instance