RodTracker.ui.dialogs

Includes classes which define various dialog widgets in RodTracker GUI.

Author: Adrian Niemann (adrian.niemann@ovgu.de)

Date: 2022-2024

class ConfirmDeleteDialog(to_delete: DataFrame, parent: QWidget)[source]

Bases: QDialog

Confirmation dialog for data that was marked for deletion automatically.

The user shall confirm/deny the deletion of rows that were automatically marked for deletion.

Parameters:
  • to_delete (DataFrame) – Rows of the main DataFrame that are automatically identified to be deleted and shall be confirmed by the user.

  • parent (QWidget) – Window/Widget that serves as this dialog’s parent.

confirmed_delete

Entries correspond to a row from the to_delete DataFrame. True -> user confirms deletion False -> user denies deletion

Type:

List[bool]

handle_item_clicked(item: QTableWidgetItem) None[source]

Handles the checking/unchecking of rows to mark for deletion.

Parameters:

item (QTableWidgetItem)

Returns:

None

setup_ui()[source]

Setup the UI elements.

class ConflictDialog(last_id, new_id, *args, **kwargs)[source]

Bases: QMessageBox

Dialog for switching rod numbers in various modes.

select_data_folder(title: str, start_folder: str, file_type_filter: str) None | Path[source]

Let users select a folder that shall contain a certain type of data.

Parameters:
  • title (str)

  • start_folder (str) – Initially displayed folder.

  • file_type_filter (str) – Filter for file types to display.

Returns:

Union[None, Path]None if selection was aborted. Otherwise, the selected folder is returned as a Path.

show_about(parent: QWidget)[source]
show_warning(text: str)[source]

Display a warning with custom text and Ok button.