Foundry.ForgeListing

g Foundry.ForgeListing Foundry.ForgeListing GObject.GInterface GObject.GInterface Gio.ListModel Gio.ListModel GObject.GInterface->Gio.ListModel GObject.Object GObject.Object GObject.Object->Foundry.ForgeListing Gio.ListModel->Foundry.ForgeListing

Subclasses:

None

Methods

Inherited:

GObject.Object (37), Gio.ListModel (4)

Structs:

GObject.ObjectClass (5)

get_auto_load ()

get_n_pages ()

get_page_size ()

load_all ()

load_page (page)

set_auto_load (auto_load)

Virtual Methods

Inherited:

GObject.Object (7), Gio.ListModel (3)

do_get_n_pages ()

do_get_page_size ()

do_load_page (page)

Properties

Name

Type

Flags

Short Description

auto-load

bool

r/w/en

n-pages

int

r

page-size

int

r

Signals

Inherited:

GObject.Object (1), Gio.ListModel (1)

Fields

Inherited:

GObject.Object (1), Gio.ListModel (1)

Name

Type

Access

Description

parent_instance

GObject.Object

r

Class Details

class Foundry.ForgeListing(**kwargs)
Bases:

GObject.Object, Gio.ListModel

Abstract:

Yes

Structure:

Foundry.ForgeListingClass

Abstract base class for managing paginated listings from forge services.

Foundry.ForgeListing provides functionality for handling paginated data from forge services including automatic loading, page management, and model integration. It supports efficient data loading and provides a unified interface for displaying large datasets from forge APIs.

New in version 1.1.

get_auto_load()
Returns:

True if auto-loading is enabled

Return type:

bool

Gets the auto-load property.

New in version 1.1.

get_n_pages()
Return type:

int

Gets the number of pages.

New in version 1.1.

get_page_size()
Return type:

int

Gets the number of items per page.

New in version 1.1.

load_all()
Returns:

a [class`Dex`.Future] that resolves to self or rejects with error.

Return type:

Dex.Future

Tries to load all pages of results.

This is done sequentially.

load_page(page)
Parameters:

page (int) –

Returns:

a [class`Dex`.Future] that resolves to a [iface`Gio`.ListModel] or rejects with error.

Return type:

Dex.Future

New in version 1.1.

set_auto_load(auto_load)
Parameters:

auto_load (bool) – True to enable auto-loading

Sets the auto-load property.

When enabled, the listing will automatically fetch the next page when a request for an item falls into the last currently loaded page.

New in version 1.1.

do_get_n_pages() virtual
Return type:

int

Gets the number of pages.

New in version 1.1.

do_get_page_size() virtual
Return type:

int

Gets the number of items per page.

New in version 1.1.

do_load_page(page) virtual
Parameters:

page (int) –

Returns:

a [class`Dex`.Future] that resolves to a [iface`Gio`.ListModel] or rejects with error.

Return type:

Dex.Future

New in version 1.1.

Property Details

Foundry.ForgeListing.props.auto_load
Name:

auto-load

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Foundry.ForgeListing.props.n_pages
Name:

n-pages

Type:

int

Default Value:

0

Flags:

READABLE

Foundry.ForgeListing.props.page_size
Name:

page-size

Type:

int

Default Value:

0

Flags:

READABLE