sigimax.widgets — Reusable Qt Widgets#

SigimaX widgets#

Reusable Qt widgets for SigimaX-derived applications.

Convenience imports#

The most commonly used widgets are re-exported here for easy access:

from sigimax.widgets import H5Browser, Wizard, LogViewerWindow

Specialized scientific dialogs (fit, peak detection, baseline, etc.) remain accessible via their submodule:

from sigimax.widgets.fitdialog import gaussian_fit
from sigimax.widgets.signalpeak import SignalPeakDetectionDialog

Submodules#

plotdock

Docks

connection

Connection dialog

filedialog

Module providing a file dialog widget based on Qt's QFileDialog.getOpenFileNames but supporting multiple file preselection (Qt original dialog only supports single file selection).

fileviewer

Module providing a file viewer widget

fitdialog

Curve fitting dialog widgets

h5browser

SigimaX HDF5 browser module

imagebackground

Image background selection dialog.

logviewer

Module providing a log viewer widget, a log viewer window and SigimaX's log viewer

objectdialog

Object dialog

signalbaseline

Signal base line selection dialog.

signalcursor

Signal horizontal or vertical cursor selection dialog.

signaldeltax

GUI dialog for analyzing signals and calculating full width at Y.

signalpeak

Signal peak detection feature

splashscreen

Splash screen

status

SigimaX main window status bar widgets

warningerror

Module providing a warning/error message box

wizard

SigimaX Wizard Widget

Submodules#

Docks#

The sigimax.widgets.plotdock module provides the dockable plot widgets for the SigimaX main window.

Plot widget#

class sigimax.widgets.plotdock.SigimaXPlotWidget(plot_type: PlotType)[source]#

SigimaX PlotWidget

This class is a subclass of plotpy.plot.PlotWidget that provides a customized widget for SigimaX, with a specific set of tools and a customized appearance.

Parameters:

plot_type – Plot type

register_tools() → None[source]#

Register the plotting tools according to the plot type

Dockable plot widget#

class sigimax.widgets.plotdock.DockablePlotWidget(parent: QWidget, plot_type: PlotType)[source]#

Docked plotting widget

Parameters:
  • parent – Parent widget

  • plot_type – Plot type

PLOTWIDGET_CLASS#

Plot widget class instantiated by this dock: override in subclasses to provide an application-specific one.

alias of SigimaXPlotWidget

setup_layout() → None[source]#

Setup layout

update_toolbar_position() → None[source]#

Update toolbar position

setup_plotwidget() → None[source]#

Setup plotting widget

update_color_mode() → None[source]#

Update plot widget styles according to application color mode

get_plot() → BasePlot[source]#

Return plot instance

update_watermark(plot: BasePlot) → None[source]#

Update watermark visibility

visibility_changed(enable: bool) → None[source]#

DockWidget visibility has changed

Splash screen#

The sigimax.widgets.splashscreen module provides a configurable splash screen for SigimaX-derived applications.

Derived applications can customize the splash screen by providing a SplashScreenConfig instance, or by subclassing SigimaXSplashScreen for advanced rendering.

Basic usage:

from sigimax.widgets.splashscreen import SplashScreenConfig, SigimaXSplashScreen

config = SplashScreenConfig(
    image_path="path/to/splash.png",
    app_name="MyApp",
    app_version="1.0.0",
    tagline="Scientific Data Processing",
)
splash = SigimaXSplashScreen(config)
splash.show()
splash.show_message("Loading modules...")
# ... heavy initialization ...
splash.finish(main_window)

Factory from global configuration:

splash = SigimaXSplashScreen.from_conf()
if splash is not None:
    splash.show()
    # ...
    splash.finish(main_window)
class sigimax.widgets.splashscreen.SplashScreenConfig(image_path: str | None = None, app_name: str = '', app_version: str = '', tagline: str = '', show_progress: bool = True, text_color: QColor = <factory>, text_alignment: AlignmentFlag = <factory>)[source]#

Configuration for a splash screen.

All fields are optional except image_path. When image_path is empty or None, no splash screen is shown.

Parameters:
  • image_path – Absolute or relative path to the splash image (PNG, SVG, or any format supported by QPixmap), or name of an image registered in guidata’s image paths. A @2x high-resolution variant of the image (e.g. splash@2x.png next to splash.png) is used on high-DPI displays, if available. If empty or None, the splash screen is disabled.

  • app_name – Application name overlaid on the splash image.

  • app_version – Application version overlaid on the splash image.

  • tagline – Optional subtitle displayed below the version.

  • show_progress – If True, progress messages are displayed at the bottom of the splash screen via SigimaXSplashScreen.show_message().

  • text_color – Color used for overlay text (default: white).

  • text_alignment – Qt alignment flags for overlay text (default: bottom-left).

property is_enabled: bool#

Return True if the splash screen should be shown.

classmethod from_conf() → SplashScreenConfig[source]#

Build a SplashScreenConfig from the global sigimax.config.CONF options.

Returns:

Configuration instance populated from global options.

class sigimax.widgets.splashscreen.SigimaXSplashScreen(config: SplashScreenConfig | None = None)[source]#

Configurable splash screen for SigimaX-derived applications.

Creates a QSplashScreen from a SplashScreenConfig. If the configuration specifies an application name/version, they are painted as overlay text on top of the splash image.

Parameters:

config – Splash screen configuration. If None, a default configuration is built from sigimax.config.CONF.

show_message(message: str) → None[source]#

Display a progress message on the splash screen.

The message is shown only if SplashScreenConfig.show_progress is True.

Parameters:

message – The progress message to display.

classmethod from_conf() → SigimaXSplashScreen | None[source]#

Factory: build a splash screen from the global configuration.

Returns:

A SigimaXSplashScreen instance, or None if the configuration does not specify a splash image.

SigimaX HDF5 browser module

class sigimax.widgets.h5browser.H5Browser(parent: QWidget | None = None)[source]#

HDF5 Browser Widget

Parameters:

parent – Parent widget

open_file(fname: str) → None[source]#

Open HDF5 file, and select its default NeXus NXdata group, if any

Parameters:

fname – HDF5 file name

close_file(fname: str) → None[source]#

Close HDF5 file

Parameters:

fname – HDF5 file name

cleanup() → None[source]#

Clean up widget

get_node(item: QW.QTreeWidgetItem | None = None) → BaseNode[source]#

Return (selected) dataset

Parameters:

item – Tree item

Returns:

HDF5 node

show_array() → None[source]#

Show array of the current node, if it is an array

The “Show array” button is enabled when an array is selected with the mouse: the current node may have changed since (e.g. with the keyboard). Read errors are reported.

class sigimax.widgets.h5browser.H5BrowserDialog(parent: QWidget | None = None, size: tuple[int, int] = (1150, 700))[source]#

HDF5 Browser Dialog

Parameters:
  • parent – Parent widget

  • size – Dialog size

accept() → None[source]#

Accept changes, once confirmed if many frames of multidimensional datasets are to be imported (the frames are counted, and only created once confirmed)

done(result: int) → None[source]#

Close dialog, once the preview being read is done: the selected nodes are then read by the caller, and the files closed

is_empty() → bool[source]#

Return True if tree is empty

cleanup() → None[source]#

Cleanup dialog

refresh_buttons() → None[source]#

Refresh buttons

show_only_checkable_items(state: int) → None[source]#

Show only checkable items

Parameters:

state – If True, only checkable items are shown

open_file(fname: str) → None[source]#

Open file

Parameters:

fname – HDF5 file name

open_files(fnames: list[str]) → None[source]#

Open files

Parameters:

fnames – HDF5 file names

select_new_file(fname: str) → None[source]#

Select new file

Parameters:

fname – HDF5 file name

remove_file(fname: str) → None[source]#

Remove file

Parameters:

fname – HDF5 file name

get_all_nodes() → list[BaseNode][source]#

Return all supported datasets

Returns:

List of HDF5 nodes

get_nodes() → list[BaseNode][source]#

Return datasets

Returns:

List of HDF5 nodes

install_button_layout() → None[source]#

Install button layout

class sigimax.widgets.h5browser.H5TreeWidget(parent: QWidget)[source]#

HDF5 Browser Tree Widget

Parameters:

parent – Parent widget

add_root(fname: str) → QTreeWidgetItem | None[source]#

Add HDF5 root (new file)

Parameters:

fname – HDF5 file name

Returns:

Item of the default NeXus NXdata group of the file (@default attributes), expanded, or None

find_node_item(rootitem: QTreeWidgetItem, node_id: str) → QTreeWidgetItem | None[source]#

Return the item of a node of a file, by node id

Parameters:
  • rootitem – root item of the file

  • node_id – node id

set_item_importable(item: QTreeWidgetItem, state: bool) → None[source]#

Make the item of a multidimensional node checkable and checked, once the import of its frames is enabled, or neither of them

Parameters:
  • item – tree item

  • state – True if the frames of the node are to be imported

remove_root(fname: str) → None[source]#

Remove HDF5 root

Parameters:

fname – HDF5 file name

cleanup() → None[source]#

Clean up widget

get_node(item: QW.QTreeWidgetItem) → BaseNode[source]#

Get HDF5 dataset associated to item

Parameters:

item – Tree item

Returns:

HDF5 node

get_nodes(only_checked_items: bool = True, expand: bool = True) → list[BaseNode][source]#

Get all nodes associated to checked items

Multidimensional nodes are replaced by the nodes of the frames of their view (see sigimax.h5.views.expand_views()), unless expand is False.

Parameters:
  • only_checked_items – If True, only checked items are returned

  • expand – If True, multidimensional nodes are replaced by the nodes of their frames

Returns:

List of HDF5 nodes

activated(item: QTreeWidgetItem) → None[source]#

Double-click event

clicked(item: QTreeWidgetItem) → None[source]#

Click event

get_actions_from_items(items)[source]#

Get actions from item

is_empty() → bool[source]#

Return True if tree is empty

is_any_item_checked() → bool[source]#

Return True if any item is checked

select_all(state: bool) → None[source]#

Select all items

Parameters:

state – If True, all items are selected

toggle_all(state: bool) → None[source]#

Toggle all item state from ‘unchecked’ to ‘checked’ (or vice-versa)

Parameters:

state – If True, all items are checked

update_item(item: QTreeWidgetItem) → None[source]#

Update the item of a node from its current state: texts, tooltip, icon and check box (e.g. once problems were found when reading its data, which make it no longer supported)

Parameters:

item – tree item

expand_all_children(item: QTreeWidgetItem) → None[source]#

Expand all children (recursively)

Parameters:

item – Tree item

add_root_to_tree(importer: H5Importer) → None[source]#

Add root to tree

Parameters:

importer – HDF5 importer

toggle_show_only_checkable_items(state: bool) → None[source]#

Show only checkable items

Parameters:

state – If True, only checkable items are shown

toggle_show_values(state: bool) → None[source]#

Show values

Parameters:

state – If True, values are shown

set_current_file(fname: str) → None[source]#

Set current file

Parameters:

fname – HDF5 file name

Module providing a log viewer widget, a log viewer window and SigimaX’s log viewer

class sigimax.widgets.logviewer.LogViewerWindow(fnames: list[str], parent: QWidget | None = None)[source]#

Log viewer window

property is_empty: bool#

Return True if there is no log available

sigimax.widgets.logviewer.get_log_filenames() → list[str][source]#

Return log filenames

sigimax.widgets.logviewer.get_log_prompt_message() → str | None[source]#

Return prompt message for log files, i.e. a message informing the user whether log files were generated during last session or current session.

sigimax.widgets.logviewer.exec_sigimax_logviewer_dialog(parent: QWidget | None = None) → None[source]#

View SigimaX logs

SigimaX main window status bar widgets

class sigimax.widgets.status.BaseStatus(delay: int | None = None, parent: QWidget | None = None)[source]#

Base status widget.

Parameters:
  • delay (int | None) – update interval (s). If None, widget will not be updated.

  • parent (QWidget) – parent widget

stop_updates() → None[source]#

Stop the periodic updates of the widget (e.g. when its window is closed)

set_icon(icon: QIcon | str | None) → None[source]#

Set icon.

Parameters:

icon (QIcon | None) – icon

update_status() → None[source]#

Update status widget

class sigimax.widgets.status.ConsoleStatus(parent: QWidget | None = None)[source]#

Console status widget.

Shows a message if an error or warning has been logged to the console. Shows a button to show the console, only if the console is hidden.

Parameters:

parent (QWidget) – parent widget

on_click(event: QMouseEvent) → None[source]#

Handle mouse click event on label.

Parameters:

event – mouse event

console_visibility_changed(visible: bool) → None[source]#

Handle console visibility changed event.

Parameters:

visible (bool) – console visibility

exception_occurred() → None[source]#

Handle exception occurred event

update_status() → None[source]#

Update status widget

class sigimax.widgets.status.MemoryStatus(threshold: int = 500, delay: int = 2, parent: QWidget | None = None)[source]#

Memory status widget.

Parameters:
  • threshold (int) – available memory thresold (MB)

  • delay (int) – update interval (s)

  • parent (QWidget) – parent widget

set_demo_mode(state: bool) → None[source]#

Set demo mode state (used when taking screenshots). The demo mode allows to take screenshots which always look the same. (this will set memory usage to a constant value). If demo mode is set to False, memory usage will be set to actual value.

Parameters:

state (bool) – demo mode state

update_status() → None[source]#

Update status widget

Curve fitting dialog widgets

sigimax.widgets.fitdialog.guifit(x, y, fitfunc, fitparams, fitargs=None, fitkwargs=None, wintitle=None, title=None, xlabel=None, ylabel=None, param_cols=1, auto_fit=True, winsize=None, winpos=None, parent=None, name=None, formula=None)[source]#

GUI-based curve fitting tool

The optional formula (Qt rich text) is displayed below the fit parameters, so that the user knows which model is fitted.

sigimax.widgets.fitdialog.create_formula_label(formula: str, parent: QWidget | None = None) → QLabel[source]#

Create a selectable rich-text label showing a fit model formula.

Parameters:
Returns:

Formula label.

sigimax.widgets.fitdialog.linear_fit(x: ndarray, y: ndarray, parent=None, name=None)[source]#

Compute linear fit using polynomialfit.

Returns (yfit, params, fit_params), where yfit is the fitted curve, params are the fitting parameters and fit_params is the canonical metadata dictionary

sigimax.widgets.fitdialog.polynomial_fit(x, y, degree, parent=None, name=None, fit_type='polynomial')[source]#

Compute polynomial fit

Returns (yfit, params, fit_params), where yfit is the fitted curve, params are the fitting parameters and fit_params is the canonical metadata dictionary

sigimax.widgets.fitdialog.gaussian_fit(x, y, parent=None, name=None)[source]#

Compute Gaussian fit

Returns (yfit, params), where yfit is the fitted curve and params are the fitting parameters

sigimax.widgets.fitdialog.lorentzian_fit(x, y, parent=None, name=None)[source]#

Compute Lorentzian fit

Returns (yfit, params), where yfit is the fitted curve and params are the fitting parameters

sigimax.widgets.fitdialog.voigt_fit(x, y, parent=None, name=None)[source]#

Compute Voigt fit

Returns (yfit, params), where yfit is the fitted curve and params are the fitting parameters

sigimax.widgets.fitdialog.multigaussian_fit(x, y, peak_indices, parent=None, name=None)[source]#

Compute Multi-Gaussian fit

Returns (yfit, params), where yfit is the fitted curve and params are the fitting parameters

sigimax.widgets.fitdialog.multilorentzian_fit(x: ndarray, y: ndarray, peak_indices, parent=None, name=None)[source]#

Compute Multi-Lorentzian fit

Returns (yfit, params), where yfit is the fitted curve and params are the fitting parameters

sigimax.widgets.fitdialog.exponential_fit(x: ndarray, y: ndarray, parent=None, name=None)[source]#

Compute exponential fit

Returns (yfit, params, fit_params), where yfit is the fitted curve, params are the fitting parameters and fit_params is the canonical metadata dictionary

sigimax.widgets.fitdialog.sinusoidal_fit(x: ndarray, y: ndarray, parent=None, name=None)[source]#

Compute sinusoidal fit

Returns (yfit, params, fit_params), where yfit is the fitted curve, params are the fitting parameters and fit_params is the canonical metadata dictionary

sigimax.widgets.fitdialog.cdf_fit(x: ndarray, y: ndarray, parent=None, name=None)[source]#

Compute Cumulative Distribution Function (CDF) fit

Returns (yfit, params, fit_params), where yfit is the fitted curve, params are the fitting parameters and fit_params is the canonical metadata dictionary

sigimax.widgets.fitdialog.planckian_fit(x: ndarray, y: ndarray, parent=None, name=None)[source]#

Compute Planckian (blackbody radiation) fit

Returns (yfit, params, fit_params), where yfit is the fitted curve, params are the fitting parameters and fit_params is the canonical metadata dictionary

sigimax.widgets.fitdialog.twohalfgaussian_fit(x: ndarray, y: ndarray, parent=None, name=None)[source]#

Compute two half-Gaussian fit for asymmetric peaks

Returns (yfit, params, fit_params), where yfit is the fitted curve, params are the fitting parameters and fit_params is the canonical metadata dictionary

sigimax.widgets.fitdialog.piecewiseexponential_fit(x: ndarray, y: ndarray, parent=None, name=None)[source]#

Compute piecewise exponential fit (raise-decay)

Returns (yfit, params, fit_params), where yfit is the fitted curve, params are the fitting parameters and fit_params is the canonical metadata dictionary

Signal peak detection feature

class sigimax.widgets.signalpeak.SignalPeakDetectionDialog(signal: SignalObj, parent: QWidget | None = None)[source]#

Signal Peak detection dialog

Parameters:
  • signal – signal object

  • parent – parent widget. Defaults to None.

populate_plot_layout() → None[source]#

Populate the plot layout

get_peaks() → list[tuple[float, float]][source]#

Return peaks coordinates

get_peak_indices() → list[int][source]#

Return peak indices

get_threshold() → float[source]#

Return relative threshold

get_min_dist() → int[source]#

Return minimum distance

compute_peaks() → None[source]#

Compute peak detection

hcursor_changed(marker: Marker) → None[source]#

Horizontal cursor position has changed

Parameters:

marker – marker item

minimum_distance_changed(value: int) → None[source]#

Minimum distance changed

Parameters:

value – minimum distance value

Signal base line selection dialog.

class sigimax.widgets.signalbaseline.SignalBaselineDialog(signal: SignalObj, parent: QWidget | None = None)[source]#

Signal baseline selection dialog.

Parameters:
  • signal – signal object

  • parent – parent widget. Defaults to None.

xrange_changed(item: XRangeSelection, xmin: float, xmax: float) → None[source]#

X range changed

cursor_changed(item: Marker) → None[source]#

Cursor changed

get_baseline() → float[source]#

Get baseline

get_x_range() → tuple[float, float][source]#

Get x range

Signal horizontal or vertical cursor selection dialog.

class sigimax.widgets.signalcursor.SignalCursorDialog(signal: SignalObj, cursor_orientation: Literal['horizontal', 'vertical'], parent: QWidget | None = None)[source]#

Signal horizontal or vertical cursor selection dialog.

Parameters:
  • signal – signal object

  • parent – parent widget. Defaults to None.

cursor_changed(item: Marker) → None[source]#

Cursor changed

xlineedit_editing_finished() → None[source]#

X line edit editing finished

ylineedit_editing_finished() → None[source]#

Y line edit editing finished

get_cursor_position() → tuple[float, float][source]#

Get cursor position

get_x_value() → float[source]#

Get cursor x value

get_y_value() → float[source]#

Get cursor y value

GUI dialog for analyzing signals and calculating full width at Y.

class sigimax.widgets.signaldeltax.SignalDeltaXDialog(signal: SignalObj, parent: QWidget | None = None)[source]#

Signal Delta X dialog.

Parameters:
  • signal – signal object

  • parent – parent widget. Defaults to None.

cursor_changed(item: Marker) → None[source]#

Cursor changed

ylineedit_editing_finished() → None[source]#

Y line edit editing finished

get_coords() → tuple[float, float, float, float][source]#

Return coordinates of segment associated to the width at Y

get_y_value() → float[source]#

Get cursor y value

Image background selection dialog.

class sigimax.widgets.imagebackground.ImageBackgroundDialog(image: ImageObj, parent: QWidget | None = None, options: PlotOptions | dict[str, Any] | None = None)[source]#

Image background selection dialog.

Parameters:
  • image – image object

  • parent – parent widget. Defaults to None.

  • options – plot options. Defaults to None.

test_compute_background() → None[source]#

Method to test background computation.

get_background() → float[source]#

Get background value

get_rect_coords() → tuple[float, float, float, float][source]#

Get rectangle coordinates

Returns:

rectangle coordinates (x0, y0, x1, y1)

Return type:

tuple

Raises:

ValueError – if rectangle coordinates are not set

SigimaX Wizard Widget#

The SigimaX Wizard is a widget that guides the user through a series of steps to complete a task. It is implemented as a series of pages, each of which is a separate widget.

The Wizard class is the main widget that contains the pages. The WizardPage class is the base class for the pages.

This module is strongly inspired from Qt’s QWizard and QWizardPage classes.

Note

The only motivation for reimplementing the wizard widget is to support complete styling with QPalette and QStyle (e.g. guidata’s dark mode is not supported on Windows).

class sigimax.widgets.wizard.Wizard(parent: QWidget | None = None)[source]#

Wizard base class

cleanup() → None[source]#

Release page resources before the dialog is destroyed.

Pages that embed native-heavy widgets (e.g. a PlotPy plot) may expose a cleanup method to tear those resources down deterministically. This avoids a Qt/PlotPy native teardown race (access violation) when several wizards are created and destroyed in sequence.

closeEvent(event: QCloseEvent) → None[source]#

Release page resources when the dialog is closed

add_page(page: WizardPage, last_page: bool = False) → None[source]#

Add a page to the wizard

go_to_previous_page() → None[source]#

Go to the previous page

go_to_next_page() → None[source]#

Go to the next page

initialize_page() → None[source]#

Initialize the page

validate_page() → bool[source]#

Validate the page

accept() → None[source]#

Accept the wizard

class sigimax.widgets.wizard.WizardPage(parent: QWidget | None = None)[source]#

Wizard page base class

We create our own wizard page class instead of using QWizardPage because the latter does not support complete styling with QPalette and QStyle (e.g. guidata’s dark mode is not supported on Windows).

This class reimplements the QWizardPage features.

set_wizard(wizard: Wizard) → None[source]#

Set the wizard

get_wizard() → Wizard[source]#

Return the wizard

set_title(title: str) → None[source]#

Set the title of the page

set_subtitle(subtitle: str) → None[source]#

Set the subtitle of the page

set_valid(is_valid: bool) → None[source]#

Set the page as valid

is_valid() → bool[source]#

Return whether the page is valid

add_to_layout(layout: QLayout | QWidget) → None[source]#

Add a layout to the user layout

add_stretch() → None[source]#

Add a stretch to the user layout

initialize_page() → None[source]#

Initialize the page

validate_page() → bool[source]#

Validate the page

Module providing a warning/error message box

class sigimax.widgets.warningerror.WarningErrorMessageBox(parent: QWidget | None, category: str, context: str = None, message: str = None, tip: str = None)[source]#

Warning/Error message box

Parameters:
  • parent (QW.QWidget | None) – parent widget (if None, the dialog is titled with the application name)

  • category (str) – message category (“error” or “warning”)

  • context (str | None) – context. Defaults to None.

  • message (str | None) – message. Defaults to None.

  • tip (str | None) – tip. Defaults to None.

ignore()[source]#

Ignore warning next time

sigimax.widgets.warningerror.show_warning_error(parent: QWidget | None, category: str, context: str = None, message: str = None, tip: str = None) → None[source]#

Show error message

Parameters:
  • parent (QW.QWidget | None) – parent widget

  • category (str) – message category (“error” or “warning”)

  • context (str | None) – context. Defaults to None.

  • message (str | None) – message. Defaults to None.

  • tip (str | None) – tip. Defaults to None.

Module providing a file dialog widget based on Qt’s QFileDialog.getOpenFileNames but supporting multiple file preselection (Qt original dialog only supports single file selection).

sigimax.widgets.filedialog.get_open_file_names(parent: QWidget | None = None, caption: str = '', basedir: str | list[str] = '', filters: str = '', selectedfilter: str = '', options: Options = None) → tuple[list[str], str][source]#

Wrapper around QtGui.QFileDialog.getOpenFileNames static method Returns a tuple (filenames, selectedfilter) – when dialog box is canceled, returns a tuple (empty list, empty string)

Parameters:
  • parent – Parent widget for the dialog.

  • caption – Dialog title.

  • basedir – Initial directory to open the dialog in, or preselected files (single string or list of strings).

  • filters – File filters for the dialog.

  • selectedfilter – Default filter to be selected.

  • options – Additional options for the dialog.

Returns:

A tuple containing a list of selected filenames and the selected filter.

Module providing a file viewer widget

Connection dialog#

This module provides a dialog box showing the progress of a connection to a DataLab-derived application server, to be used together with sigima.client.SimpleRemoteProxy (or any remote proxy exposing a similarly blocking connect method).

class sigimax.widgets.connection.ConnectionDialog(connect_callback: Callable, parent: QWidget = None, icon: QIcon | None = None, banner: QPixmap | None = None)[source]#

Connection dialog, showing the progress of a connection attempt.

The connect callback runs in a background thread. When the dialog is closed before the callback returns (e.g. cancelled while connecting), the dialog no longer waits for it: the callback keeps running in the background until it returns, and its result is ignored.

Parameters:
  • connect_callback – Callback function to connect to the remote server

  • parent – Parent widget. Defaults to None.

  • icon – Window icon. Defaults to None (no icon override).

  • banner – Optional banner pixmap displayed above the progress bar.

get_error_message() → str[source]#

Get error message if connection failed

done(result: int) → None[source]#

Close the dialog, without waiting for the connection attempt

Parameters:

result – dialog result code

exec() → int[source]#

Execute dialog

Object dialog#

This module provides a dialog box to select an object (signal or image) from a remote DataLab-derived application, using sigima.client.SimpleRemoteProxy (or any proxy exposing the same get_group_titles_with_object_info/get_current_panel/ set_current_panel methods).

class sigimax.widgets.objectdialog.GetObjectDialog(parent: QW.QWidget, proxy: SimpleRemoteProxy, panel: str | None = None, title: str | None = None)[source]#

Get object dialog box

Parameters:
  • parent – Parent widget

  • proxy – Remote proxy

  • panel – Panel to retrieve objects from (‘signal’, ‘image’ or None for both)

  • title – Dialog title

get_current_object_uuid() → str[source]#

Return current object uuid