ptrail.GUI package

Submodules

ptrail.GUI.GUI_driver module

This file launches PTRAIL’s GUI module.

Author: Yaksh J Haranwala
ptrail.GUI.GUI_driver.run_app()[source]

ptrail.GUI.InputDialog module

This class is an abstraction that can be used to create input dialog boxes for virtually any number of inputs.

Authors: Yaksh J Haranwala
class ptrail.GUI.InputDialog.InputDialog(*args: Any, **kwargs: Any)[source]

Bases: QDialog

__init__(labels: List[str], title: str, placeHolders: List[str], parent=None)[source]
getInputs()[source]

ptrail.GUI.Table module

This python module is the abstract definition of the Table view for viewing the dataframe inside the GUI.

Authors: Yaksh J Haranwala
class ptrail.GUI.Table.TableModel(*args: Any, **kwargs: Any)[source]

Bases: QAbstractTableModel

__init__(data)[source]
columnCount(parent=None)[source]
data(index, role=PyQt5.QtCore.Qt.DisplayRole)[source]
headerData(section, orientation, role=PyQt5.QtCore.Qt.DisplayRole)[source]
rowCount(parent=None)[source]

ptrail.GUI.gui module

This module contains the design of PTRAIL’s GUI module. It is to be noted that this class does not handle the functionalities, it is rather handled by the handler class.

Author: Yaksh J Haranwala
class ptrail.GUI.gui.Ui_MainWindow(*args: Any, **kwargs: Any)[source]

Bases: QMainWindow

__init__(OuterWindow)[source]
add_df_controller()[source]
add_tree_options()[source]
open_file()[source]

Open the file and load the dataframe to perform operations.

Return type:

None

retranslateUi(OuterWindow)[source]

Auto Generated method by PyQt Designer.

save_file()[source]

Save the dataframe to a .csv file.

Return type:

None

setupUi(OuterWindow)[source]

Set the main window of the GUI up and start the application.

Parameters:

OuterWindow (PyQt5.QtWidgets.QOuterWindow') –

setup_command_palette()[source]

Set up the pane that displays the command palette.

Return type:

None

setup_df_pane()[source]

Set up the pane that displays the dataframe.

Return type:

None

setup_map_pane()[source]

Set up the pane that displays the map.

Return type:

None

setup_menubar()[source]

Create the menu bar of the window.

Return type:

None

setup_stats_palette()[source]

Set up the pane that displays the statistics.

Return type:

None

setup_statusbar()[source]
version_button_clicked()[source]

Show the version info of the application.

Return type:

None

ptrail.GUI.handler module

This class is used to connect the PTRAIL GUI to PTRAIL backend. All the GUI’s functionalities are handled in this class.

Authors: Yaksh J Haranwala, Salman Haidri
class ptrail.GUI.handler.GuiHandler(filename, window)[source]

Bases: object

__init__(filename, window)[source]
add_column_drop_widget()[source]

Add a List Widget to drop columns from the dataset. This widget is added to the CommandPalette.

Note

It is to be noted that the following columns are mandatory for PTrailDataFrame:

1. traj_id
2. DateTime
3. lat
4. lon

Hence, these columns are not presented as options for deletion.

display_df(filename)[source]

Display the DataFrame on the DFPane of the GUI.

Parameters:

filename (str) – The name of the file. This is obtained from the GUI.

Raises:

AttributeError: – If the user gives incorrect column names, then we ask the user to enter them again.

draw_stats()[source]

Handle the objects of the statistics pane from here.

drop_col()[source]

Drop the columns based on the user selection.

generate_feature_imp_plot()[source]

Take the input from the user and draw the mutual info plot.

redraw_map()[source]

Redraw the map when the traj_id is changed from the DropDown list.

redraw_stat()[source]

Redraw the statistics plot when the user changes the option from the Dropdown menu.

run_command()[source]

When the user pushes the Run button, run the user’s selected function on the dataset.

Return type:

None

update_dropCol_options()[source]

Update the options in the QListWidget for dropping the columns.

Module contents