GUI Components¶
Interactive XPCS data visualization interface with modern theming and user experience features.
Main Application¶
The main GUI application window built with PySide6. Provides tab-based interface for different analysis modes (SAXS 2D/1D, G2, stability, two-time).
The main application module (xpcsviewer.xpcs_viewer) provides the entry point
for the GUI.
Note
The GUI components have limited automated testing due to their interactive nature. Manual testing and user feedback are primary validation methods.
Viewer Kernel¶
Backend kernel that bridges GUI and data processing operations. Manages file collections, averaging operations, and plot state.
File Locator¶
File discovery and management utilities for XPCS datasets. Handles file system navigation and dataset validation.
Default Settings¶
Application default settings (window size, etc.).
Command Line Interface¶
The GUI is launched via the xpcsviewer-gui command. For CLI batch processing,
use the xpcsviewer command with subcommands.
See Command-Line Interface for complete CLI and entry point documentation.
GUI Modernization Components¶
The following modules provide modern UI/UX capabilities.
Theme System¶
Light/dark mode theming with consistent visual styling.
Modules:
xpcsviewer.gui.theme- Theme management and color tokensxpcsviewer.gui.theme.manager- Theme switching and applicationxpcsviewer.gui.theme.tokens- Design tokens for colors, spacing, typographyxpcsviewer.gui.theme.plot_themes- Theme integration for PyQtGraph and Matplotlib
Features:
Automatic system theme detection
Persistent theme preferences
QSS stylesheets for consistent widget styling
Plot backend theme synchronization
State Management¶
Session persistence and preferences management.
Modules:
xpcsviewer.gui.state- State management utilitiesxpcsviewer.gui.state.session_manager- Session save/restore functionalityxpcsviewer.gui.state.preferences- User preferences storagexpcsviewer.gui.state.recent_paths- Recently opened files tracking
Features:
Automatic session persistence across restarts
Window geometry and state restoration
Recent files management with validation
Type-safe preference access
Keyboard Shortcuts¶
Customizable keyboard shortcut management.
Modules:
xpcsviewer.gui.shortcuts- Shortcut management systemxpcsviewer.gui.shortcuts.shortcut_manager- Shortcut registration and handling
Features:
Centralized shortcut registry
Conflict detection and resolution
User-customizable keybindings
Context-aware shortcut activation
Modern Widgets¶
Enhanced UI components for improved user experience.
Modules:
xpcsviewer.gui.widgets- Modern UI widgetsxpcsviewer.gui.widgets.command_palette- VS Code-style command palette (Ctrl+Shift+P)xpcsviewer.gui.widgets.toast_notification- Non-intrusive status notificationsxpcsviewer.gui.widgets.drag_drop_list- Enhanced drag-and-drop file handlingxpcsviewer.gui.widgets.error_dialog- Actionable error display with copy-to-clipboardxpcsviewer.gui.widgets.empty_state- Empty state placeholders with action buttons
Features:
Fuzzy search command palette
Animated toast notifications with auto-dismiss
Drag-and-drop support with visual feedback
Theme-aware styling
Actionable error dialogs with technical details
Plot Handler Integration¶
Theme-aware plotting backends.
Modules:
xpcsviewer.plothandler- Plot rendering backendsxpcsviewer.plothandler.plot_constants- Theme-aware plot colors and stylesxpcsviewer.plothandler.matplot_qt- Matplotlib Qt integration with themingxpcsviewer.plothandler.pyqtgraph_handler- PyQtGraph backend with theming
Features:
Automatic plot theme switching with application theme
Consistent color palettes across backends
High-contrast modes for accessibility
Qt Compatibility Layer¶
Unified import interface for Qt classes supporting both PySide6 and PyQt6.
Layout Helpers¶
Convenience functions for building Qt layouts programmatically.
SVG Icon System¶
Scalable SVG icons with theme-aware color replacement.
The icon system provides runtime SVG loading with automatic currentColor
replacement, ensuring icons match the active light or dark theme.
Icons are cached after first load for efficient reuse across the UI.
Category Tab Bar¶
Visual tab grouping with category separators.
Overlays painted separator lines between logical tab groups (Scattering, Correlation, Utilities) so users can visually parse the 12-tab interface.
Initialization Validator¶
Startup validation for GUI dependencies and configuration.