pyqt_reactive.theming.style_generator
QStyleSheet Generator for OpenHCS PyQt6 GUI
Generates dynamic QStyleSheet strings from ColorScheme objects, enabling centralized styling with theme support. Replaces hardcoded color strings with semantic color scheme references.
Classes
|
Generates QStyleSheet strings from ColorScheme objects. |
- class pyqt_reactive.theming.style_generator.StyleSheetGenerator(color_scheme: ColorScheme)[source]
Generates QStyleSheet strings from ColorScheme objects.
Provides methods to generate complete stylesheets for different widget types, replacing hardcoded colors with centralized color scheme references.
- __init__(color_scheme: ColorScheme)[source]
Initialize the style generator with a color scheme.
- Parameters:
color_scheme – ColorScheme instance to use for styling
- update_color_scheme(color_scheme: ColorScheme)[source]
Update the color scheme used for style generation.
- Parameters:
color_scheme – New ColorScheme instance
- generate_dialog_style() str[source]
Generate QStyleSheet for dialog windows.
- Returns:
Complete QStyleSheet for dialog styling
- Return type:
- generate_tree_widget_style() str[source]
Generate QStyleSheet for tree widgets and list widgets.
- Returns:
Complete QStyleSheet for tree/list widget styling
- Return type:
- generate_list_widget_style() str[source]
Alias for generate_tree_widget_style (includes QListWidget styling).
- generate_table_widget_style() str[source]
Generate QStyleSheet for table widgets.
- Returns:
Complete QStyleSheet for table widget styling
- Return type:
- generate_button_style() str[source]
Generate QStyleSheet for buttons with all states.
- Returns:
Complete QStyleSheet for button styling
- Return type:
- generate_combobox_style() str[source]
Generate QStyleSheet for combo boxes with dropdown styling.
- Returns:
Complete QStyleSheet for combo box styling
- Return type:
- generate_progress_bar_style() str[source]
Generate QStyleSheet for progress bars.
- Returns:
Complete QStyleSheet for progress bar styling
- Return type:
- generate_frame_style() str[source]
Generate QStyleSheet for frames and panels.
- Returns:
Complete QStyleSheet for frame styling
- Return type:
- generate_tab_widget_style() str[source]
Generate QStyleSheet for tab widgets.
- Returns:
Complete QStyleSheet for tab widget styling
- Return type:
- generate_system_monitor_style() str[source]
Generate QStyleSheet for system monitor widget.
- Returns:
Complete QStyleSheet for system monitor styling
- Return type:
- generate_complete_application_style() str[source]
Generate complete application-wide QStyleSheet.
- Returns:
Complete QStyleSheet for entire application
- Return type:
- generate_config_window_style() str[source]
Generate QStyleSheet for configuration windows with button panel.
- Returns:
Complete QStyleSheet for config window styling
- Return type:
- generate_config_button_styles() dict[source]
Generate individual button styles for config window buttons.
- Returns:
Dictionary with button styles for generic, reset, cancel, save
- Return type: