PreferencesPage#

class PreferencesPage(**properties: Any)#

Superclasses: Widget, InitiallyUnowned, Object

Implemented Interfaces: Accessible, Buildable, ConstraintTarget

A page from PreferencesDialog.

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 group role.

Constructors#

class PreferencesPage
classmethod new() Widget#

Creates a new AdwPreferencesPage.

Methods#

class PreferencesPage
add(group: PreferencesGroup) None#

Adds a preferences group to self.

Parameters:

group – the group to add

get_banner() Banner | None#

Gets the banner displayed at the top of the page.

Added in version 1.7.

get_description() str#

Gets the description of self.

Added in version 1.4.

get_description_centered() bool#

Gets whether the description is centered.

Added in version 1.6.

get_group(index: int) PreferencesGroup | None#

Gets the group at index.

Can return NULL if index is larger than the number of groups in the page.

Added in version 1.8.

Parameters:

index – a group index

get_icon_name() str | None#

Gets the icon name for self.

get_name() str | None#

Gets the name of self.

get_title() str#

Gets the title of self.

get_use_underline() bool#

Gets whether an embedded underline in the title indicates a mnemonic.

insert(group: 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 add.

Added in version 1.8.

Parameters:
  • group – the group to add

  • index – the index to insert group a

remove(group: PreferencesGroup) None#

Removes a group from self.

Parameters:

group – the group to remove

scroll_to_top() None#

Scrolls the scrolled window of self to the top.

Added in version 1.3.

set_banner(banner: Banner | None = None) None#

Sets the banner displayed at the top of the page.

Added in version 1.7.

Parameters:

banner – the banner to display at the top of the page

set_description(description: str) None#

Sets the description of self.

The description is displayed at the top of the page.

Added in version 1.4.

Parameters:

description – the description

set_description_centered(centered: bool) None#

Sets whether the description should be centered.

Added in version 1.6.

Parameters:

centered – If the description should be centered

set_icon_name(icon_name: str | None = None) None#

Sets the icon name for self.

Parameters:

icon_name – the icon name

set_name(name: str | None = None) None#

Sets the name of self.

Parameters:

name – the name

set_title(title: str) None#

Sets the title of self.

Parameters:

title – the title

set_use_underline(use_underline: bool) None#

Sets whether an embedded underline in the title indicates a mnemonic.

Parameters:

use_underlineTRUE if underlines in the text indicate mnemonics

Properties#

class PreferencesPage
props.banner: Banner#

A Banner displayed at the top of the page.

Added in version 1.7.

props.description: str#

The description to be displayed at the top of the page.

Added in version 1.4.

props.description_centered: bool#

Whether the description should be centered.

Added in version 1.6.

props.icon_name: str#

The icon name for this page.

props.name: str#

The name of this page.

props.title: str#

The title for this page.

props.use_underline: bool#

Whether an embedded underline in the title indicates a mnemonic.

Fields#

class PreferencesPage
parent_instance#