videof2b.ui package

Submodules

videof2b.ui.about_window module

The dialog window for the “about” information.

class videof2b.ui.about_window.AboutDialog(parent)

Bases: QDialog

About window.

setup_ui()

Designs the UI.

staticMetaObject = PySide6.QtCore.QMetaObject("AboutDialog" inherits "QDialog": )

videof2b.ui.camera_cal_dialog module

The dialog window for camera calibration.

class videof2b.ui.camera_cal_dialog.CameraCalibrationDialog(parent)

Bases: QDialog, StoreProperties

Camera calibration UI.

on_doc_open()

Open the calibration pattern PDF file.

on_fisheye_changed(state)

Update fisheye flag when checkbox state changes.

on_image_display()

Show a lightweight window in full screen with the calibration pattern. Esc key closes this window by default.

on_path_changed(new_path)

Update UI when the calibration path changes.

setup_ui()

Designs the UI.

staticMetaObject = PySide6.QtCore.QMetaObject("CameraCalibrationDialog" inherits "QDialog": )

videof2b.ui.camera_director_dialog module

Interactive tool for placing a camera in the field.

class videof2b.ui.camera_director_dialog.CamDirectorDialog(parent)

Bases: QDialog

Interactive camera placement aid.

on_new_solution(_)

Update results view when a new solution is available.

setup_model()

Create the models.

setup_ui()

Create the UI.

staticMetaObject = PySide6.QtCore.QMetaObject("CamDirectorDialog" inherits "QDialog": )
class videof2b.ui.camera_director_dialog.CamDirectorInputsModel(biz_obj, parent=None)

Bases: QAbstractListModel

Model that represents the cam director’s inputs.

data(index, role=Ellipsis)
Return type:

Any

flags(index)
Return type:

~qtpy.QtCore.

headerData(section, orientation, role=Ellipsis)
Return type:

Any

rowCount(parent=Ellipsis)
Return type:

int

setData(index, value, role=Ellipsis)
Return type:

bool

staticMetaObject = PySide6.QtCore.QMetaObject("CamDirectorInputsModel" inherits "QAbstractListModel": )
class videof2b.ui.camera_director_dialog.CamDirectorResultsModel(biz_obj, parent=None)

Bases: QAbstractTableModel

Model that represents the cam director’s results.

columnCount(parent=Ellipsis)
Return type:

int

data(index, role=Ellipsis)
Return type:

Any

flags(index)
Return type:

~qtpy.QtCore.

headerData(section, orientation, role=Ellipsis)
Return type:

Any

rowCount(parent=Ellipsis)
Return type:

int

staticMetaObject = PySide6.QtCore.QMetaObject("CamDirectorResultsModel" inherits "QAbstractTableModel": )

videof2b.ui.exception_dialog module

The exception dialog form.

class videof2b.ui.exception_dialog.ExceptionDialog(exc_msg)

Bases: QDialog, StoreProperties

User-friendly exception dialog.

exec()

Show the dialog.

on_attach_file_button_clicked()

Attach files to the bug report e-mail.

on_description_updated()

Update the minimum number of characters needed in the description.

on_save_report_button_clicked()

Save exception log and system information to a file.

setup_ui()

Set up the UI.

staticMetaObject = PySide6.QtCore.QMetaObject("ExceptionDialog" inherits "QDialog": )

videof2b.ui.icons module

Provides icons for the VideoF2B application.

class videof2b.ui.icons.MyIcons(*args, **kwargs)

Bases: object

Provide application-wide icons.

videof2b.ui.load_flight_dialog module

The dialog that loads the input video.

class videof2b.ui.load_flight_dialog.LoadFlightDialog(parent)

Bases: QDialog, StoreProperties

The dialog window that collects user inputs for a Flight instance.

accept()

Create a Flight instance if all inputs are valid. Store the instance as our flight attribute.

Return type:

None

on_skip_locate_changed()

Enable/disable the measurement widgets when the “skip locate” checkbox changes.

setup_ui()

Lay out the UI elements

staticMetaObject = PySide6.QtCore.QMetaObject("LoadFlightDialog" inherits "QDialog": )

videof2b.ui.main_window module

The main GUI window of VideoF2B application.

class videof2b.ui.main_window.MainWindow

Bases: QMainWindow, UIMainWindow, StoreProperties

The main UI window of the VideoF2B application.

clear_track
closeEvent(event)

Overridden to handle the closing of the main window in a safe manner. Handles all exit/close/quit requests here, ensuring all threads are stopped before we close.

figure_diags_changed
figure_mark
figure_state_changed
load_settings()

Load the settings of MainWindow.

locating_completed
maneuver_endpts_changed
manipulate_sphere
on_ar_geometry_available(is_available)

Update UI controls based on availability of AR geometry.

on_cal_finished(retcode)

Handle return codes and any possible exceptions that are reported by CameraCalibrator when its processing loop finishes. Update the UI as appropriate.

on_cal_thread_finished()

Handle cleanup when the calibrator thread finishes.

on_calibrate_cam()

Calibrate a camera via a specified video file.

on_chk_diag_changed()

Tell the processor to toggle the drawn state of figure diagnostics.

on_chk_endpts_changed()

Tell the processor to toggle the drawn state of maneuver start/end points.

on_chk_figure_changed()

Tell the processor to toggle the drawn state of a figure.

on_clear_track()

Clear the aircraft’s existing flight track.

on_figure_end()

Mark the end of a figure in 3D.

on_figure_start()

Mark the start of a figure in 3D.

on_help_about()

Display About window.

on_load_flight()

Loads a flight via LoadFlightDialog and starts processing it.

on_loc_pts_changed(points, msg)

Echoes changes in the VideoProcessor’s locator points and updates the instruction message.

on_loc_pts_defined()

Present the user with a confirm/redefine choice via messagebox.

on_locating_started()

Prepare UI for the camera locating procedure.

on_move_east()

Move AR sphere East.

on_move_north()

Move AR sphere North.

on_move_reset()

Reset AR sphere’s center to world origin.

on_move_south()

Move AR sphere South.

on_move_west()

Move AR sphere West.

on_next_figure()

Advance the current figure checkbox to next figure if appropriate.

Behavior: If multiple figures are checked, do nothing. If the last figure is checked, do nothing. If no figures are checked, check the first one. In all other cases, uncheck the current figure and check the next one.

on_pause_resume()

Pause/resume processing at the current frame.

on_paused_resumed(is_paused)

Slot that responds to VideoProcessor’s signal.

on_place_cam()

Open the camera placement dialog.

on_proc_finished(retcode)

Handle return codes and any possible exceptions that are reported by VideoProcessor when its processing loop finishes. Also update the UI as appropriate.

on_proc_starting()

Handle required preparations when the processing thread starts.

on_proc_thread_finished()

Handle cleanup when the processing thread finishes.

on_progress_updated(data)

Display video processing progress.

on_relocate_cam()

Relocate the camera.

on_restart_flight()

Reload the current flight and restart it.

on_rotate_ccw()

Rotate AR sphere CCW.

on_rotate_cw()

Rotate AR sphere CW.

on_stop_proc()

Request to stop the video processor.

on_track_cleared()

Slot that responds to the processor’s signal.

pause_resume
relocate_cam
save_settings()

Save the settings of MainWindow.

start_cal_thread()

Starts the calibrator on a worker thread.

start_proc_thread()

Starts the video processor on a worker thread.

staticMetaObject = PySide6.QtCore.QMetaObject("MainWindow" inherits "QMainWindow": Methods:   #40 type=Signal, signature=stop_processor()   #41 type=Signal, signature=locating_completed()   #42 type=Signal, signature=clear_track()   #43 type=Signal, signature=figure_state_changed(PyObject,bool), parameters=PyObject, bool   #44 type=Signal, signature=figure_diags_changed(bool), parameters=bool   #45 type=Signal, signature=maneuver_endpts_changed(bool), parameters=bool   #46 type=Signal, signature=relocate_cam()   #47 type=Signal, signature=manipulate_sphere(PyObject), parameters=PyObject   #48 type=Signal, signature=figure_mark(bool), parameters=bool   #49 type=Signal, signature=pause_resume() )
stop_processor
class videof2b.ui.main_window.UIMainWindow

Bases: object

Define the UI layout.

setup_ui(main_window)

Create the UI here.

videof2b.ui.style module

Define UI styles.

videof2b.ui.video_window module

The video window of VideoF2B application.

class videof2b.ui.video_window.VideoWindow(parent, **kwargs)

Bases: QLabel

The window that displays video frames during processing.

clear()

Overridden method to clear our custom pixmap.

Return type:

None

property is_mouse_enabled

Indicates whether the video window reacts to mouse events.

mousePressEvent(event)

Overridden event so that we react to mouse clicks as needed.

Return type:

None

point_added
point_removed
resizeEvent(event)

Overridden event so that our window resizes with its parent while maintaining the loaded image’s original aspect ratio.

Return type:

None

staticMetaObject = PySide6.QtCore.QMetaObject("VideoWindow" inherits "QLabel": Methods:   #47 type=Signal, signature=point_added(PyObject), parameters=PyObject   #48 type=Signal, signature=point_removed(PyObject), parameters=PyObject )
update_frame(frame)

Set a new video frame in the window.

Return type:

None

videof2b.ui.widgets module

This module contains various custom widgets for the UI.

class videof2b.ui.widgets.FileDialog

Bases: QFileDialog

A wrapped QFileDialog compatible with Path objects.

classmethod getExistingDirectory(*args, **kwargs)

Thin wrapper of getExistingDirectory compatible with Path objects as args.

Return type:

pathlib.Path

classmethod getOpenFileName(*args, **kwargs)

Thin wrapper of getOpenFileName compatible with Path objects as args.

Return type:

tuple[pathlib.Path, str]

classmethod getOpenFileNames(*args, **kwargs)

Thin wrapper of getOpenFileNames compatible with Path objects as args.

Return type:

tuple[list[pathlib.Path], str]

classmethod getSaveFileName(*args, **kwargs)

Thin wrapper of getSaveFileName compatible with Path objects as args.

Return type:

tuple[pathlib.Path | None, str]

staticMetaObject = PySide6.QtCore.QMetaObject("FileDialog" inherits "QFileDialog": )
class videof2b.ui.widgets.PathEdit(parent=None, path_type=PathEditType.FILES, caption=None, initial_path=None)

Bases: QWidget

Custom QWidget subclass for selecting a file or directory.

on_browse_button_clicked()

Shows the QFileDialog when the browse button is clicked. Emits path_changed if appropriate.

Return type:

None

on_line_edit_editing_finished()

Updates path and emits path_changed when the line edit has finished being edited.

Return type:

None

on_new_path(path)

If the given path is different from current path, updates path and emits the path_changed Signal.

Parameters:

path (Path) – The new path

Return type:

None

property path

Returns the selected path.

Returns:

The selected path

Return type:

Path

path_changed
property path_type

Returns the path type. Path type specifies selecting a file or directory.

Returns:

The type selected

Return type:

PathType

staticMetaObject = PySide6.QtCore.QMetaObject("PathEdit" inherits "QWidget": Methods:   #34 type=Signal, signature=path_changed(PyObject), parameters=PyObject )
update_button_tool_tips()

Updates the button tooltips during init and when path_type changes.

Return type:

None

class videof2b.ui.widgets.PathEditType(value)

Bases: Enum

Specifies the type of browser in a PathEdit.

DIRECTORIES = 2
FILES = 1
class videof2b.ui.widgets.QHLine

Bases: QFrame

A horizontal line widget.

staticMetaObject = PySide6.QtCore.QMetaObject("QHLine" inherits "QFrame": )
class videof2b.ui.widgets.QVLine

Bases: QFrame

A vertical line widget.

staticMetaObject = PySide6.QtCore.QMetaObject("QVLine" inherits "QFrame": )

Module contents

The ui module provides the core user interface for VideoF2B