Tepl.AbstractFactory¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class Tepl.AbstractFactory(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod get_singleton()¶
- Returns:
the
Tepl.AbstractFactory
singleton instance.- Return type:
Gets the
Tepl.AbstractFactory
singleton instance.If
Tepl.AbstractFactory.set_singleton
() has not been called, the singleton is created with aTepl.AbstractFactory
instance.New in version 3.0.
- create_main_window(app)¶
- Parameters:
app (
Gtk.Application
) – aGtk.Application
.- Returns:
a new main application window, or
None
if the vfunc is not implemented.- Return type:
Creates a main
Gtk.ApplicationWindow
in the sense ofTepl.ApplicationWindow.is_main_window
().
- create_metadata_manager_file()¶
-
Creates a new
Gio.File
that is then intended to be used as an argument toTepl.MetadataManager.load_from_disk
() andTepl.MetadataManager.save_to_disk
(). This function just creates theGio.File
object, it doesn’t call anyTepl.MetadataManager
function.New in version 5.0.
- create_prefs_dialog()¶
- Returns:
a new
Tepl.PrefsDialog
, orNone
if the vfunc is not implemented.- Return type:
New in version 6.13.
- create_tab_label(tab)¶
- Parameters:
- Returns:
a new
Gtk.Widget
, orNone
for the default tab label (“page N” withGtk.Notebook
).- Return type:
Gtk.Widget
orNone
Creates a new tab label for tab, suitable for
Gtk.Notebook.set_tab_label
().New in version 3.0.
- set_singleton()¶
Sets the
Tepl.AbstractFactory
singleton. This should be called early in main(), for example just after callingTepl.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¶
-
Virtual function pointer for
Tepl.AbstractFactory.create_file
(). By default theTepl.File
is created withTepl.File.new
().New in version 4.0.
- do_create_main_window(app) virtual¶
- Parameters:
app (
Gtk.Application
) – aGtk.Application
.- Returns:
a new main application window, or
None
if the vfunc is not implemented.- Return type:
Creates a main
Gtk.ApplicationWindow
in the sense ofTepl.ApplicationWindow.is_main_window
().
- do_create_metadata_manager_file() virtual¶
-
Creates a new
Gio.File
that is then intended to be used as an argument toTepl.MetadataManager.load_from_disk
() andTepl.MetadataManager.save_to_disk
(). This function just creates theGio.File
object, it doesn’t call anyTepl.MetadataManager
function.New in version 5.0.
- do_create_prefs_dialog() virtual¶
- Returns:
a new
Tepl.PrefsDialog
, orNone
if the vfunc is not implemented.- Return type:
Virtual function pointer for
Tepl.AbstractFactory.create_prefs_dialog
(). By default theTepl.PrefsDialog
is created withTepl.PrefsDialog.new
().New in version 6.13.
- do_create_tab() virtual¶
-
Virtual function pointer for
Tepl.AbstractFactory.create_tab
(). By default theTepl.Tab
is created withTepl.Tab.new
().New in version 3.0.
- do_create_tab_label(tab) virtual¶
- Parameters:
- Returns:
a new
Gtk.Widget
, orNone
for the default tab label (“page N” withGtk.Notebook
).- Return type:
Gtk.Widget
orNone
Creates a new tab label for tab, suitable for
Gtk.Notebook.set_tab_label
().New in version 3.0.