ProjectTab package
Project Tab Module
Project management tab with MVP architecture for CSV file editing and project tracking.
- author:
Dipl.-Ing. (FH) Jonas Pfeiffer
- class districtheatingsim.gui.ProjectTab.project_tab.ProjectModel[source]
Bases:
objectModel for managing project data including CSV and GeoJSON file operations.
- set_base_path(base_path)[source]
Set project base path.
- Parameters:
base_path (str) – Project base path.
- class districtheatingsim.gui.ProjectTab.project_tab.ProjectPresenter(model, view, folder_manager, data_manager, config_manager)[source]
Bases:
objectPresenter managing interaction between ProjectModel and ProjectTabView.
- __init__(model, view, folder_manager, data_manager, config_manager)[source]
Initialize project presenter.
- Parameters:
model (ProjectModel) – Data model.
view (ProjectTabView) – View component.
folder_manager (object) – Folder manager.
data_manager (object) – Data manager.
config_manager (object) – Configuration manager.
- on_variant_folder_changed(path)[source]
Handle project folder change.
- Parameters:
path (str) – New project folder path.
- on_tree_view_double_clicked(index)[source]
Handle double-click on file tree view.
- Parameters:
index (QModelIndex) – Tree view index.
- load_csv(file_path)[source]
Load CSV file into table view.
- Parameters:
file_path (str) – Path to CSV file.
- save_csv(show_dialog=True)[source]
Save current table data to CSV file.
- Parameters:
show_dialog (bool) – Show confirmation dialog if True.
- create_csv(fname=None, show_dialog=True)[source]
Create new CSV file with default building data headers.
- on_geojson_conversion_progress(current, total, message)[source]
Handle progress updates from GeoJSON conversion thread.
- on_geojson_conversion_done(output_file_path)[source]
Handle completion of GeoJSON conversion.
- Parameters:
output_file_path (str) – Path to created CSV file.
- on_geojson_conversion_error(error_message)[source]
Handle error during GeoJSON conversion.
- Parameters:
error_message (str) – Error message.
- geocode_addresses(inputfilename)[source]
Start geocoding thread for address processing.
- Parameters:
inputfilename (str) – Path to CSV file for geocoding.
- on_geocode_done(fname)[source]
Handle geocoding completion.
- Parameters:
fname (str) – Output filename.
- on_geocode_error(error_message)[source]
Handle geocoding errors.
- Parameters:
error_message (str) – Error message to display.
- check_csv_status(csv_file_path)[source]
Check detailed CSV status: missing, available without coordinates, or with coordinates.
- class districtheatingsim.gui.ProjectTab.project_tab.ProjectTabView(presenter=None, parent=None)[source]
Bases:
QWidgetView component for project tab UI with file browser and CSV editor.
- __init__(presenter=None, parent=None)[source]
Initialize project tab view.
- Parameters:
presenter (ProjectPresenter) – Presenter instance for signal connections.
parent (QWidget) – Parent widget.
- update_tree_view(path)[source]
Update file tree view root path.
- Parameters:
path (str) – New root path.
Show table context menu.
- Parameters:
position (QPoint) – Menu position.
- get_selected_file_path(index)[source]
Get selected file path from tree view.
- Parameters:
index (QModelIndex) – Tree view index.
- Returns:
Selected file path.
- Return type:
- update_progress(progress, csv_status=None)[source]
Update progress bar value and CSV status label with color-coded status.
- class districtheatingsim.gui.ProjectTab.project_tab.ProjectTab(folder_manager, data_manager, config_manager, parent=None)[source]
Bases:
QMainWindowMain project tab window integrating MVP components.
Note
Central interface for project management with file operations and progress tracking functionality.
Project Tab Dialogs Module
Dialog windows for project tab functionality including data input and progress display.
- author:
Dipl.-Ing. (FH) Jonas Pfeiffer
- class districtheatingsim.gui.ProjectTab.project_tab_dialogs.RowInputDialog(headers, parent=None)[source]
Bases:
QDialogDialog for adding new table rows with input fields.
- class districtheatingsim.gui.ProjectTab.project_tab_dialogs.OSMImportDialog(parent=None, sample_utm_coords=None)[source]
Bases:
QDialogDialog for OSM data import with default building parameters.
- class districtheatingsim.gui.ProjectTab.project_tab_dialogs.ProcessDetailsDialog(process_steps, parent=None)[source]
Bases:
QDialogDialog displaying detailed project progress information.
- __init__(process_steps, parent=None)[source]
Initialize process details dialog.
- Parameters:
process_steps (list) – List of process step dictionaries with progress info.
parent (QWidget) – Parent widget.
- class districtheatingsim.gui.ProjectTab.project_tab_dialogs.BuildingCSVDialog(headers, data=None, parent=None)[source]
Bases:
QDialogDialog for tabular input and editing of Quartier IST.csv building data.