BuildingTab package
Building data management and heat demand calculation module.
Provides MVP architecture for building heat requirement calculations using BDEW profiles and Test Reference Year (TRY) climate data.
- author:
Dipl.-Ing. (FH) Jonas Pfeiffer
- class districtheatingsim.gui.BuildingTab.building_tab.BuildingModel[source]
Bases:
objectData model for building information and heat demand calculations.
Manages CSV input data, JSON results, and heat profile generation.
- set_base_path(base_path)[source]
Set base path for file operations.
- Parameters:
base_path (str) – Base directory path
- set_json_path(json_path)[source]
Set JSON file path.
- Parameters:
json_path (str) – Path to JSON file
- class districtheatingsim.gui.BuildingTab.building_tab.BuildingPresenter(model, view, folder_manager, data_manager, config_manager)[source]
Bases:
objectPresenter managing interaction between BuildingModel and BuildingTabView.
Coordinates building data operations, heat demand calculations, and UI updates.
- __init__(model, view, folder_manager, data_manager, config_manager)[source]
Initialize building presenter.
- Parameters:
model (BuildingModel) – Data model
view (BuildingTabView) – View component
folder_manager (ProjectFolderManager) – Folder manager
data_manager (DataManager) – Data manager
config_manager (ProjectConfigManager) – Configuration manager
- save_csv(fname=None, show_dialog=True)[source]
Save CSV file with file dialog.
- Parameters:
fname (str, optional) – Filename to save.
- save_json(fname=None, show_dialog=True)[source]
Save JSON results with file dialog.
- Parameters:
fname (str, optional) – Filename to save.
- class districtheatingsim.gui.BuildingTab.building_tab.BuildingTabView(parent=None)[source]
Bases:
QWidgetView component for building tab UI.
Provides table for building data input and interactive plotting of heat demand profiles.
- load_csv_signal
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
- save_csv_signal
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
- load_json_signal
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
- save_json_signal
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
- calculate_heat_demand_signal
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
- __init__(parent=None)[source]
Initialize building tab view.
- Parameters:
parent (QWidget) – Parent widget (optional)
- populate_table(data)[source]
Populate table with DataFrame data.
- Parameters:
data (pd.DataFrame) – Data to display in table
- get_table_data()[source]
Extract data from table widget.
- Returns:
Table data as DataFrame
- Return type:
pd.DataFrame
- populate_building_combobox(results)[source]
Populate building selection combobox.
- Parameters:
results (dict) – Results data for building selection
- plot(results=None)[source]
Plot heat demand profiles for selected buildings and data types.
- Parameters:
results (dict) – Heat demand calculation results
- showEvent(event)[source]
Handle widget show event to trigger initial plot.
- Parameters:
event (QShowEvent) – Show event
- class districtheatingsim.gui.BuildingTab.building_tab.BuildingTab(folder_manager, data_manager, config_manager, parent=None)[source]
Bases:
QMainWindowMain building tab window integrating MVP components.
Central interface for building data management and heat demand analysis.
- __init__(folder_manager, data_manager, config_manager, parent=None)[source]
Initialize building tab with MVP architecture.
- Parameters:
folder_manager (ProjectFolderManager) – Folder manager
data_manager (DataManager) – Data manager
config_manager (ProjectConfigManager) – Configuration manager
parent (QWidget) – Parent widget (optional)