ComparisonTab package
Variant comparison module for district heating project analysis.
Provides automatic variant discovery, KPI dashboards, and comparative visualization of economic and technical metrics.
- author:
Dipl.-Ing. (FH) Jonas Pfeiffer
- districtheatingsim.gui.ComparisonTab.comparison_tab.debug_print(msg)[source]
Print debug message with ProjectExplorer prefix.
- Parameters:
msg (str) – Debug message
- class districtheatingsim.gui.ComparisonTab.comparison_tab.ProjectExplorer(folder_manager, config_manager, parent=None)[source]
Bases:
QWidgetProject explorer for automatic variant discovery and selection.
Scans project folder for available variants and allows multi-selection for comparison analysis.
- variants_changed
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- set_base_path(base_path)[source]
Set base path and refresh project list.
- Parameters:
base_path (str) – Project data base path
- discover_projects()[source]
Discover and populate project variants.
Scans parent directory for variant folders and validates them.
- class districtheatingsim.gui.ComparisonTab.comparison_tab.ComparisonDashboard(parent=None)[source]
Bases:
QWidgetDashboard widget showing comparison overview and KPIs.
Displays economic, environmental, and technical metrics across selected variants with interactive charts.
- class districtheatingsim.gui.ComparisonTab.comparison_tab.ComparisonTab(folder_manager, data_manager, config_manager, parent=None)[source]
Bases:
QWidgetComparison tab with comprehensive variant analysis.
Integrates project explorer, KPI dashboard, and comparative visualizations for multi-variant evaluation.
- __init__(folder_manager, data_manager, config_manager, parent=None)[source]
Initialize comparison tab.
- Parameters:
folder_manager (ProjectFolderManager) – Project folder manager
data_manager (DataManager) – Application data manager
config_manager (ProjectConfigManager) – Configuration manager
parent (QWidget) – Parent widget (optional)
- create_comparison_content()[source]
Create main comparison content area.
- Returns:
Content widget with dashboard tabs
- Return type:
QWidget
- on_variants_changed(selected_variants)[source]
Handle variant selection changes from explorer.
- Parameters:
selected_variants (list) – List of selected variant info dicts
- load_variant_data(selected_variants)[source]
Load data for selected variants.
- Parameters:
selected_variants (list) – List of selected variant info dicts
- process_variant_results(results)[source]
Process raw variant results for comparison.
- Parameters:
results (dict) – Raw results from JSON file
- Returns:
Processed results for dashboard display
- Return type:
- Raises:
ValueError – If processing fails