Skip to content

Commit

Permalink
Update mermaid diagram
Browse files Browse the repository at this point in the history
  • Loading branch information
leorudczenko committed Aug 16, 2023
1 parent 6ef82bc commit badb52a
Show file tree
Hide file tree
Showing 2 changed files with 105 additions and 32 deletions.
137 changes: 105 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,57 +23,80 @@ Instructions for using the application can be found [here](https://github.com/Br
QApplication
Manages preloaded modes of the application
---
+Window
+developer_mode: bool
+testing_mode: bool
+window: Window
+graphics_view: GraphicsView
+graphics_scene: GraphicsScene
+table_model: TableModel
+table_view: TableView
+set_scale_dialog: Optional[SetScaleDialog]
+recoordinate_dialog: Optional[RecoordinateDialog]

developer_mode()
}

class Window {
QMainWindow
User Interface with data preprocessing and data flow
Main User Interface with data flow
---
+testing_mode: bool
+default_settings: dict[str, Any]
+image_filepath: str
+csv_filepath: str
+image_filepath: Optional[str]
+csv_filepath: Optional[str]
+point_colour: str
+status_bar_messages: dict[str, dict[str, Any]]
+graphics_view: GraphicsView
+graphics_scene: GraphicsScene
+table_model: TableModel
+table_view: TableView
+set_scale_dialog: SetScaleDialog
+set_scale_dialog: Optional[SetScaleDialog]
+recoordinate_dialog: Optional[RecoordinateDialog]
+current_message: Optional[QMessageBox]
+menu_bar: QMenuBar
+menu_bar_file: QMenu
+menu_bar_file_import_image: QAction
+menu_bar_file_export_image: QAction
+menu_bar_file_import_tactool_csv: QAction
+menu_bar_file_export_tactool_csv: QAction
+menu_bar_recoordinate_csv: QAction
+status_bar: QStatusBar
+sample_name_input: QLineEdit
+mount_name_input: QLineEdit
+material_input: QLineEdit
+label_input: QComboBox
+colour_button: QPushButton
+diameter_input: QSpinBox
+scale_value_input: QLineEdit
+set_scale_button: QPushButton
+clear_points_button: QPushButton
+reset_ids_button: QPushButton
+reset_settings_button: QPushButton
+status_bar_messages: dict[str, dict[str, Any]]
+main_input_widgets: list[QWidget]
+dialogs: list[QDialog]

+setup_ui_elements()
+set_colour_button_style()
+connect_signals_and_slots()
+set_colour_button_style()
+create_status_bar_messages()
+toggle_status_bar_messages()
+import_image_get_path()
+export_image_get_path()
+import_tactool_csv_get_path()
+load_tactool_csv_data(filepath)
+process_tactool_csv(filepath)
+parse_row_data(item, default_values)
+export_tactool_csv_get_path()
+validate_current_data(validate_image)
+add_analysis_point(x, y, label, diameter, scale, colour, notes, apid, sample_name, mount_name, material, from_click)
+remove_analysis_point(x, y, apid)
+reload_analysis_points()
+reset_analysis_points()
+reload_analysis_points(index, transform)
+clear_analysis_points()
+update_analysis_points()
+remove_analysis_point(x, y, apid)
+set_point_colour()
+toggle_scaling_mode()
+toggle_main_input_widgets(enable)
+clear_scale_clicked()
+set_scale(scale)
+get_point_settings(analysis_point, clicked_column_index)
+reset_settings()
+update_point_settings(sample_name, mount_name, material, label, diameter, scale, colour)
+toggle_main_input_widgets(enable)
+set_scale(scale)
+toggle_scaling_mode()
+toggle_recoordinate_dialog()
+data_error_message(error)
+show_message(title, message, type)
+closeEvent(event)
Expand All @@ -83,7 +106,7 @@ Instructions for using the application can be found [here](https://github.com/Br
QTableView
Manage the display of TableModel data
---
+set_column_sizes()
+format_columns()
+mousePressEvent(event)
+signal: selected_analysis_point(analysis_point, column)
}
Expand All @@ -95,8 +118,9 @@ Instructions for using the application can be found [here](https://github.com/Br
+_zoom: int
+_empty: bool
+_image: QGraphicsPixmapItem
+disable_analysis_points: bool
+navigation_mode: bool
+set_scale_mode: bool
+scaling_mode: bool
+scale_start_point: QPointF
+scale_end_point: QPointF
+graphics_scene: GraphicsScene
Expand All @@ -111,7 +135,7 @@ Instructions for using the application can be found [here](https://github.com/Br
+save_image(filepath)
+show_entire_image()
+toggle_scaling_mode()
+reset_scale_line_points()
+reset_scaling_elements()
+signal: left_click(x, y)
+signal: right_click(x, y)
+signal: scale_move_event(pixel_distance)
Expand All @@ -123,32 +147,62 @@ Instructions for using the application can be found [here](https://github.com/Br
---
+testing_mode: bool
+pixel_input_default: str
+set_scale_button: QPushButton
+clear_scale_button: QPushButton
+cancel_button: QPushButton
+distance_input: QSpinBox
+pixel_input: QLineEdit
+scale_value: QLineEdit

+setup_ui_elements()
+connect_signals_and_slots()
+update_scale()
+scale_move_event_handler(pixel_distance)
+set_scale()
+clear_scale()
+closeEvent(event)
signal: clear_scale()
signal: clear_scale_clicked()
signal: set_scale_clicked(scale)
signal: closed_set_scale_dialog()
}

class RecoordinateDialog{
QDialog
Allows the user to recoordinate an SEM CSV file
---
+testing_mode: bool
+ref_points: list[AnalysisPoint]
+image_size: QSize
+input_csv_button: QPushButton
+input_csv_filepath_label: QLineEdit
+output_csv_button: QPushButton
+output_csv_filepath_label: QLineEdit
+recoordinate_button: QPushButton
+cancel_button: QPushButton

+setup_ui_elements()
+connect_signals_and_slots()
+get_input_csv()
+get_output_csv()
+recoordinate_and_export()
+recoordinate_sem_points(input_csv, output_csv, invert_x_axis_dest, x_header, y_header, ref_col, ref_label)
+closeEvent(event)
signal: show_message(title, message, type)
signal: closed_recoordinate_dialog()
}

class GraphicsScene{
QGraphicsScene
Manage items painted on image
---
+_maximum_point_id: int
+scaling_rect: QGraphicsRectItem
+scaling_group: QGraphicsItemGroup
+scaling_line: QGraphicsLineItem
+table_model: TableModel

+add_analysis_point(x, y, label, diameter, scale, colour, notes, apid, sample_name, mount_name, material)
+add_analysis_point(apid, x, y, label, diameter, scale, colour, notes, sample_name, mount_name, material)
+remove_analysis_point(x, y, apid)
+get_ellipse_at(x, y)
+next_point_id()
+toggle_transparent_window(graphics_view_image)
+draw_scale_line(start_point, end_point)
+draw_scale_point(x, y)
Expand All @@ -162,6 +216,10 @@ Instructions for using the application can be found [here](https://github.com/Br
+headers: list[str]
+_data: list[list[Any]]
+editable_columns: list[int]
+public_headers: list[str]
+analysis_points: list[AnalysisPoint]
+reference_points: list[AnalysisPoint]
+next_point_id: int

+headerData(section, orientation, role)
+columnCount(*args)
Expand All @@ -173,11 +231,6 @@ Instructions for using the application can be found [here](https://github.com/Br
+remove_point(target_id)
+get_point_by_ellipse(target_ellipse)
+get_point_by_apid(target_id)
+reference_points()
+analysis_points()
+export_csv(filepath)
+convert_export_headers()
+convert_export_point()
signal: invalid_label_entry(title, message, type)
signal: updated_analysis_point(index)
}
Expand All @@ -186,9 +239,9 @@ Instructions for using the application can be found [here](https://github.com/Br
Create AnalysisPoint data
---
+id: int
+label: str
+x: int
+y: int
+label: str
+diameter: int
+scale: float
+colour: str
Expand All @@ -204,18 +257,38 @@ Instructions for using the application can be found [here](https://github.com/Br
+aslist()
}

class analysis_point{
Functions for AnalysisPoint processing
---

+parse_tactool_csv(filepath, default_settings)
+parse_row_data(item, fields)
+export_tactool_csv(filepath, headers, analysis_points)
+convert_export_headers(headers)
+convert_export_point(analysis_point, headers)
+parse_sem_csv(filepath, required_headers)
+export_sem_csv(filepath, headers, points)
+reset_id(analysis_point)
+affine_transform_matrix(source, dest)
+affine_transform_point(matrix, point)
}

TACtool *-- Window
Window *-- GraphicsView
Window *-- TableView
Window *-- SetScaleDialog
Window *-- RecoordinateDialog
GraphicsView *-- GraphicsScene
GraphicsScene *-- TableModel
TableModel *-- AnalysisPoint
AnalysisPoint *-- analysis_point

Window <.. TableView : selected_analysis_point(analysis_point, column)
Window <.. SetScaleDialog : clear_scale()
Window <.. SetScaleDialog : clear_scale_clicked()
Window <.. SetScaleDialog : set_scale_clicked(scale)
Window <.. SetScaleDialog : closed_set_scale_dialog()
Window <.. RecoordinateDialog : show_message(title, message, type)
Window <.. RecoordinateDialog : closed_recoordinate_dialog()
Window <.. GraphicsView : left_click(x, y)
Window <.. GraphicsView : right_click(x, y)
Window <.. GraphicsView : scale_move_event(pixel_distance)
Expand Down
Binary file modified class_relationship_diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit badb52a

Please sign in to comment.