insight_gui.widgets.pref_rows module

class insight_gui.widgets.pref_rows.AdditionalContentRow(*args: Any, **kwargs: Any)

Bases: PrefRow

class insight_gui.widgets.pref_rows.ButtonRow(*args: Any, **kwargs: Any)

Bases: PreferencesRow, PrefRowInterface

filter_text() str
class insight_gui.widgets.pref_rows.ColumnViewRow(*args: Any, **kwargs: Any)

Bases: AdditionalContentRow

add_column(title: str, property_name: str, is_sortable: bool = True, is_numeric: bool = False, expand: bool = False)
add_row(row_object: gi.repository.GObject.GObject) int
apply_filter(**filter_kwargs)

Applies column-specific filters using keyword arguments.

Example usage:

apply_filter(timestamp=”2023”, severity=[“ERROR”, “INFO”], message=”System”)

  • Filters apply to properties of the GObject.

  • A value can be:
    • None: No filtering for that property.

    • A str: The property must contain this substring.

    • A list[str]: The property must contain at least one of these substrings.

  • Properties not mentioned in kwargs will default to None (no filtering).

change_header(column_index: int, new_title: str)
clear_rows()
get_headers() list[str]
class insight_gui.widgets.pref_rows.ImageViewRow(*args: Any, **kwargs: Any)

Bases: AdditionalContentRow

on_copy_image(*args)
on_fit_to_width(*args)
on_open_image(*args)
on_save_image(*args)
on_zoom_in(*args)
on_zoom_out(*args)
reset_image_to_default_icon(tooltip_text: str = 'No image')
set_image_from_icon_name(*, icon_name: str, tooltip_text: str = '', size: int = 100)
set_image_from_opencv(cv_image)
class insight_gui.widgets.pref_rows.MultiBoxRow(*args: Any, **kwargs: Any)

Bases: PreferencesRow, PrefRowInterface

add_label_pair(title: str, subtitle: str, prop: bool = False, **kwargs) gi.repository.Gtk.Widget
class insight_gui.widgets.pref_rows.MultiButtonRow(*args: Any, **kwargs: Any)

Bases: PreferencesRow, PrefRowInterface

add_button(btn: gi.repository.Gtk.Button, prepend: bool = False)
class insight_gui.widgets.pref_rows.MultiToggleButtonRow(*args: Any, **kwargs: Any)

Bases: AdditionalContentRow

add_toggle_btn(unique_id: str | int, **kwargs)
get_active_buttons() dict
get_all_btn_states() dict
get_button_id(btn: ToggleButton) int | str
on_btn_toggled(btn: ToggleButton, is_active: bool, *args)
toggle_all(active: bool)
class insight_gui.widgets.pref_rows.MultiWidgetRow(*args: Any, **kwargs: Any)

Bases: PreferencesRow, PrefRowInterface

add_widget(widget: gi.repository.Gtk.Widget, prepend: bool = False) gi.repository.Gtk.Widget
add_widgets(widgets: list[gi.repository.Gtk.Widget], prepend: bool = False)
class insight_gui.widgets.pref_rows.PrefRow(*args: Any, **kwargs: Any)

Bases: ActionRow, PrefRowInterface

add_prefix(widget: gi.repository.Gtk.Widget, *, prepend: bool = False) gi.repository.Gtk.Widget
add_prefix_btn(*, icon_name: str, func: Callable, func_kwargs: dict = {}, tooltip_text: str = '', prepend: bool = False, **kwargs) gi.repository.Gtk.Button
add_prefix_icon(icon_name: str, *, tooltip_text: str = '', prepend: bool = False, **kwargs) gi.repository.Gtk.Image
add_prefix_lbl(label: str, *, prepend: bool = False, **kwargs) gi.repository.Gtk.Label
add_suffix(widget: gi.repository.Gtk.Widget, *, prepend: bool = False) gi.repository.Gtk.Widget
add_suffix_btn(*, icon_name: str, func: Callable, func_kwargs: dict = {}, tooltip_text: str = '', prepend: bool = False, **kwargs) gi.repository.Gtk.Button
add_suffix_icon(icon_name: str, *, tooltip_text: str = '', prepend: bool = False, **kwargs) gi.repository.Gtk.Image
add_suffix_lbl(label: str, *, prepend: bool = False, **kwargs) gi.repository.Gtk.Label
filter_text() str
set_subtitle(subtitle: str, max_lines: int = 1)
class insight_gui.widgets.pref_rows.PrefRowInterface(*args: Any, **kwargs: Any)

Bases: GObject

Interface Class for common row properties.

add_tag(tag)
filter_text(value: str)
filterable() bool
has_tag(tag) bool
is_filtered() bool
remove_tag(tag)
set_filtered(visible: bool) bool
set_unfiltered()
class insight_gui.widgets.pref_rows.ScaleRow(*args: Any, **kwargs: Any)

Bases: PrefRow

get_value() float
on_minus_btn_clicked(*args)
on_plus_btn_clicked(*args)
on_scale_value_changed(*args)
set_digits(num_digits: int = 0)
set_range(value: float = None, lower: float = None, upper: float = None, step: float = None)
class insight_gui.widgets.pref_rows.SearchRow(*args: Any, **kwargs: Any)

Bases: PreferencesRow, PrefRowInterface

property filter_text: str
on_search_entry_changed(*args)
class insight_gui.widgets.pref_rows.SuggestionEntryRow(*args: Any, **kwargs: Any)

Bases: EntryRow, PrefRowInterface

filter_func(item) bool
on_apply(*args)
on_search_changed(*args)
on_selected_item_changed(selection, pspec)
class insight_gui.widgets.pref_rows.TextViewRow(*args: Any, **kwargs: Any)

Bases: AdditionalContentRow

add_tag(tag: str, **prop_kwargs)
add_tags(tags: list[str], **prop_kwargs)
append_tagged_text(text: str, tag: str)
append_text(text: str)
clear()
filter_by_tags(tag_names: list[str])
filter_by_text(filter_snippets: list[str])
property filter_text: str
get_text() str
property line_count: int
on_text_changed(*args)
prepend_tagged_text(text: str, tag: str)
prepend_text(text: str)
scroll_to_end()
set_subtitle(subtitle: str)
set_text(text: str)
set_title(title: str)
update_height()