dicogis.ui.tab_database module

Name: TabDatabase Purpose: Tab containing database widgets in DicoGIS Notebook.

Author: Julien Moura (@geojulien)

class dicogis.ui.tab_database.DatabaseNewConnectionForm(parent, localized_strings=None, init_widgets=True, is_modal=True)

Bases: Toplevel

Form to create a new database connection.

__init__(parent, localized_strings=None, init_widgets=True, is_modal=True)

Initialize the DatabaseForm modal dialog.

Parameters:
  • parent (Widget) – The parent widget.

  • localized_strings (Optional[dict]) – translated strings. Defaults to None.

  • init_widgets (bool) – option to create widgets during init or not. Defaults to True.

  • is_modal (bool) – option to make the dialog a modal. Defaults to True.

create_widgets()

Create and layout the widgets.

Return type:

None

property get_form_as_database_connection: DatabaseConnection | None

Return the collected data.

Returns:

The collected data if available, None otherwise.

Return type:

dict

on_close()

Handle the window close event.

Return type:

None

out_database_connection: DatabaseConnection | None = None
submit()

Collect data from the entries and process it.

Return type:

None

class dicogis.ui.tab_database.TabDatabaseServer(parent, localized_strings=None, init_widgets=True)

Bases: Frame

Tab form for server database connections.

Parameters:

Frame – inherited ttk.Frame

__init__(parent, localized_strings=None, init_widgets=True)

UI tab for databases initialization.

Parameters:
  • parent (Widget) – tkinter parent object

  • localized_strings (Optional[dict]) – translated strings. Defaults to None.

  • init_widgets (bool) – option to create widgets during init or not. Defaults to True.

create_widgets()

Create and layout the widgets for the frame.

Return type:

None

open_form()

Open the modal dialog for database form.

Return type:

None