napari_cellseg3d.interface#

User interface functions and aliases.

Module Attributes

LEFT_AL

Alias for Qt.AlignmentFlag.AlignLeft, to use in addWidget

RIGHT_AL

Alias for Qt.AlignmentFlag.AlignRight, to use in addWidget

HCENTER_AL

Alias for Qt.AlignmentFlag.AlignHCenter, to use in addWidget

CENTER_AL

Alias for Qt.AlignmentFlag.AlignCenter, to use in addWidget

ABS_AL

Alias for Qt.AlignmentFlag.AlignAbsolute, to use in addWidget

BOTT_AL

Alias for Qt.AlignmentFlag.AlignBottom, to use in addWidget

TOP_AL

Alias for Qt.AlignmentFlag.AlignTop, to use in addWidget

Functions

add_blank(widget[, layout])

Adds a space between consecutive buttons/labels in a layout when building a widget.

add_label(widget, label[, label_before, ...])

Adds a label to a widget.

add_widgets(layout, widgets[, alignment])

Adds all widgets in the list to layout, with the specified alignment.

combine_blocks(right_or_below, left_or_above)

Combines two QWidget objects and puts them side by side (first on the left/top and second on the right/bottom depending on "horizontal").

handle_adjust_errors(widget, warning_type, ...)

Qt message handler that attempts to react to errors when setting the window size and resizes the main window.

handle_adjust_errors_wrapper(widget)

Returns a callable that can be used with qInstallMessageHandler directly.

make_group(title[, l, t, r, b, parent])

Creates a group widget and layout, with a header (title) and content margins for top/left/right/bottom L, T, R, B (in pixels).

make_label(name[, parent])

Creates a QLabel.

make_n_spinboxes(class_[, n, min_value, ...])

Creates n increment counters with the specified parameters.

open_file_dialog(widget[, possible_paths, ...])

Opens a window to choose a file directory using QFileDialog.

open_folder_dialog(widget[, possible_paths])

Opens a window to choose a directory using QFileDialog.

open_url(url)

Opens the url given as a string in OS default browser using QDesktopServices.openUrl().

set_spinbox(box[, min_value, max_value, ...])

Sets the parameters of a QSpinBox or QDoubleSpinBox.

toggle_visibility(checkbox, widget)

Toggles the visibility of a widget based on the status of a checkbox.

Classes

AnisotropyWidgets([parent, default_x, ...])

Class that creates widgets for anisotropy handling.

Button([title, func, parent, fixed])

Class for a button with a title and connected to a function when clicked.

CheckBox([title, func, parent, fixed])

Shortcut class for creating QCheckBox with a title and a function.

ContainerWidget([l, t, r, b, vertical, ...])

Class for a container widget that can contain other widgets.

DoubleIncrementCounter([lower, upper, ...])

Class implementing a number counter with increments (spin box) for floats.

DropdownMenu([entries, parent, text_label, ...])

Creates a dropdown menu with a title and adds specified entries to it.

FilePathWidget(description, file_function[, ...])

Widget to handle the choice of file paths for data throughout the plugin.

GroupedWidget(title[, l, t, r, b, parent])

Subclass of QGroupBox designed to easily group widgets belonging to a same category.

IntIncrementCounter([lower, upper, default, ...])

Class implementing a number counter with increments (spin box) for int.

LayerSelecter(viewer[, name, layer_type, parent])

Class that creates a dropdown menu to select a layer from a napari viewer.

Log([parent])

Class to implement a log for important user info.

QWidgetSingleton

To be used as a metaclass when making a singleton QWidget, meaning only one instance exists at a time.

RadioButton([text, parent])

Class for a radio button with a title and connected to a function when clicked.

ScrollArea(contained_layout[, min_wh, ...])

Creates a QScrollArea and sets it up, then adds the contained_layout to it.

Slider([lower, upper, step, default, ...])

Shortcut class to create a Slider widget.

UtilsDropdown(*args, **kwargs)

Singleton class for use in instantiating only one Utility dropdown menu that can be accessed from the plugin.