Collapsible components

CollapsibleDialog: a collapsible/expandable tree dialog.

Overview

quatm/GUI/widgets/theexpandables.py provides the collapsible/expandable tree dialog CollapsibleDialog: each “section” consists of a tree item with an expand/collapse button and a content widget, which suits configuration interfaces and advanced parameter settings.

Components

ComponentDescription
SectionExpandButtonButton that expands/collapses a section
CollapsibleDialogDialog container; subclasses override define_sections() to define all panels

CollapsibleDialog provides add_section(title, widget) to add a panel directly; subclasses may also override define_sections() to organise the tree structure in detail with add_button / add_widget.

Usage

from quatm.GUI.widgets.theexpandables import CollapsibleDialog

class SetupDialog(CollapsibleDialog):
    def define_sections(self):
        self.add_section("Camera settings", some_widget)
        self.add_section("Trigger settings", trigger_widget)