Tepl.AbstractFactory

g GObject.Object GObject.Object Tepl.AbstractFactory Tepl.AbstractFactory GObject.Object->Tepl.AbstractFactory

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

get_singleton ()

create_file ()

create_main_window (app)

create_metadata_manager_file ()

create_tab ()

create_tab_label (tab)

fill_prefs_dialog (dialog)

set_singleton ()

Virtual Methods

Inherited:

GObject.Object (7)

do_create_file ()

do_create_main_window (app)

do_create_metadata_manager_file ()

do_create_tab ()

do_create_tab_label (tab)

do_fill_prefs_dialog (dialog)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class Tepl.AbstractFactory(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Tepl.AbstractFactoryClass

classmethod get_singleton()
Returns:

the Tepl.AbstractFactory singleton instance.

Return type:

Tepl.AbstractFactory

Gets the Tepl.AbstractFactory singleton instance.

If Tepl.AbstractFactory.set_singleton() has not been called, the singleton is created with a Tepl.AbstractFactory instance.

New in version 3.0.

create_file()
Returns:

a new Tepl.File.

Return type:

Tepl.File

New in version 4.0.

create_main_window(app)
Parameters:

app (Gtk.Application) – a Gtk.Application.

Returns:

a new main application window, or None if the vfunc is not implemented.

Return type:

Gtk.ApplicationWindow or None

Creates a main Gtk.ApplicationWindow in the sense of Tepl.ApplicationWindow.is_main_window().

create_metadata_manager_file()
Returns:

a new Gio.File, or None if the vfunc is not implemented.

Return type:

Gio.File or None

Creates a new Gio.File that is then intended to be used as an argument to Tepl.MetadataManager.load_from_disk() and Tepl.MetadataManager.save_to_disk(). This function just creates the Gio.File object, it doesn’t call any Tepl.MetadataManager function.

New in version 5.0.

create_tab()
Returns:

a new Tepl.Tab.

Return type:

Tepl.Tab

New in version 3.0.

create_tab_label(tab)
Parameters:

tab (Tepl.Tab) – a Tepl.Tab.

Returns:

a new Gtk.Widget, or None for the default tab label (“page N” with Gtk.Notebook).

Return type:

Gtk.Widget or None

Creates a new tab label for tab, suitable for Gtk.Notebook.set_tab_label().

New in version 3.0.

fill_prefs_dialog(dialog)
Parameters:

dialog (Tepl.PrefsDialog) – a Tepl.PrefsDialog.

dialog is a newly-created Tepl.PrefsDialog. This function fills dialog with the intended content.

New in version 6.2.

set_singleton()

Sets the Tepl.AbstractFactory singleton. This should be called early in main(), for example just after calling Tepl.init().

This function must be called only once, before the first call to Tepl.AbstractFactory.get_singleton().

Tepl takes ownership of the self reference.

New in version 3.0.

do_create_file() virtual
Returns:

a new Tepl.File.

Return type:

Tepl.File

New in version 4.0.

do_create_main_window(app) virtual
Parameters:

app (Gtk.Application) – a Gtk.Application.

Returns:

a new main application window, or None if the vfunc is not implemented.

Return type:

Gtk.ApplicationWindow or None

Creates a main Gtk.ApplicationWindow in the sense of Tepl.ApplicationWindow.is_main_window().

do_create_metadata_manager_file() virtual
Returns:

a new Gio.File, or None if the vfunc is not implemented.

Return type:

Gio.File or None

Creates a new Gio.File that is then intended to be used as an argument to Tepl.MetadataManager.load_from_disk() and Tepl.MetadataManager.save_to_disk(). This function just creates the Gio.File object, it doesn’t call any Tepl.MetadataManager function.

New in version 5.0.

do_create_tab() virtual
Returns:

a new Tepl.Tab.

Return type:

Tepl.Tab

New in version 3.0.

do_create_tab_label(tab) virtual
Parameters:

tab (Tepl.Tab) – a Tepl.Tab.

Returns:

a new Gtk.Widget, or None for the default tab label (“page N” with Gtk.Notebook).

Return type:

Gtk.Widget or None

Creates a new tab label for tab, suitable for Gtk.Notebook.set_tab_label().

New in version 3.0.

do_fill_prefs_dialog(dialog) virtual
Parameters:

dialog (Tepl.PrefsDialog) – a Tepl.PrefsDialog.

dialog is a newly-created Tepl.PrefsDialog. This function fills dialog with the intended content.

New in version 6.2.