src.edit.channel_location package

Submodules

src.edit.channel_location.channel_location_controller module

Channel Location Controller

class src.edit.channel_location.channel_location_controller.channelLocationController(channel_locations, channel_names)[source]

Bases: edit.channel_location.channel_location_listener.channelLocationListener

cancel_button_clicked()[source]

Close the window.

channel_name_is_free(channel_name)[source]

Check if the channel name provided is available or not. If it is not available, display an error message and the user must set a new name for the channel. :param channel_name: The channel name. :type channel_name: str :return: True if the channel name is available. False otherwise. :rtype: bool

confirm_button_clicked(channel_name, x_coordinate, y_coordinate, z_coordinate)[source]

Close the window and send the information to the main controller. Save the information of the last channel displayed before sending the information to the controller. :param channel_name: Channel name :type channel_name: str :param x_coordinate: X coordinate of the channel’s location :type x_coordinate: float :param y_coordinate: Y coordinate of the channel’s location :type y_coordinate: float :param z_coordinate: Z coordinate of the channel’s location :type z_coordinate: float

delete_button_clicked()[source]

Delete the information of the channel displayed.

editing_finished_clicked(channel_number)[source]

Load the channel’s information based on the channel number given. :param channel_number: Channel number :type channel_number: int

get_channel_info_from_number(channel_number)[source]

Get the information of a channel based on a channel number. :param channel_number: The channel number :type channel_number: int :return: channel_name: The channel name. channel_location: The channel location. :rtype: str, list of float

insert_button_clicked(channel_name, x_coordinate, y_coordinate, z_coordinate)[source]

Save the information of the last channel displayed before inserting a new channel. :param channel_name: Channel name :type channel_name: str :param x_coordinate: X coordinate of the channel’s location :type x_coordinate: float :param y_coordinate: Y coordinate of the channel’s location :type y_coordinate: float :param z_coordinate: Z coordinate of the channel’s location :type z_coordinate: float

insert_new_channel()[source]

Insert a new channel in the data.

next_button_clicked(channel_name, x_coordinate, y_coordinate, z_coordinate)[source]

Save the information of the last channel displayed before displaying the information of the next channel. :param channel_name: Channel name :type channel_name: str :param x_coordinate: X coordinate of the channel’s location :type x_coordinate: float :param y_coordinate: Y coordinate of the channel’s location :type y_coordinate: float :param z_coordinate: Z coordinate of the channel’s location :type z_coordinate: float

previous_button_clicked(channel_name, x_coordinate, y_coordinate, z_coordinate)[source]

Save the information of the last channel displayed before displaying the information of the previous channel. :param channel_name: Channel name :type channel_name: str :param x_coordinate: X coordinate of the channel’s location :type x_coordinate: float :param y_coordinate: Y coordinate of the channel’s location :type y_coordinate: float :param z_coordinate: Z coordinate of the channel’s location :type z_coordinate: float

set_listener(listener)[source]

Set the main listener so that the controller is able to communicate with the main controller. :param listener: main listener :type listener: mainController

update_channel_data(channel_name, x_coordinate, y_coordinate, z_coordinate)[source]

Update the information of a channel. :param channel_name: Channel name :type channel_name: str :param x_coordinate: X coordinate of the channel’s location :type x_coordinate: float :param y_coordinate: Y coordinate of the channel’s location :type y_coordinate: float :param z_coordinate: Z coordinate of the channel’s location :type z_coordinate: float

update_channel_displayed()[source]

Update the information of the channel displayed based on the current channel number (could have change because of the next, previous, etc. button pushed.

src.edit.channel_location.channel_location_listener module

Channel location listener

class src.edit.channel_location.channel_location_listener.channelLocationListener[source]

Bases: abc.ABC

Listener doing the connection between the controller and the view for displaying the channels’ information. It retrieves the information from the view to send it to the controller.

cancel_button_clicked()[source]
confirm_button_clicked(channel_name, x_coordinate, y_coordinate, z_coordinate)[source]
delete_button_clicked()[source]
editing_finished_clicked(channel_number)[source]
insert_button_clicked(channel_name, x_coordinate, y_coordinate, z_coordinate)[source]
next_button_clicked(channel_name, x_coordinate, y_coordinate, z_coordinate)[source]
previous_button_clicked(channel_name, x_coordinate, y_coordinate, z_coordinate)[source]

src.edit.channel_location.channel_location_view module

Channel location view

class src.edit.channel_location.channel_location_view.channelLocationView(number_of_channels)[source]

Bases: PyQt5.QtWidgets.QWidget

cancel_channel_location_trigger()[source]

Send the information to the controller that the computation is cancelled.

confirm_channel_location_trigger()[source]

Retrieve the channel name and location and send the information to the controller.

delete_button_trigger()[source]

Send the information to the controller to delete the current channel.

editing_finished_trigger()[source]

Retrieve the new channel number wanted to be displayed and send the information to the controller to display the wanted channel.

insert_button_trigger()[source]

Retrieve the channel name and location and send the information to the controller to insert a new channel.

next_button_trigger()[source]

Retrieve the channel name and location and send the information to the controller to display the next channel.

previous_button_trigger()[source]

Retrieve the channel name and location and send the information to the controller to display the previous channel.

set_listener(listener)[source]

Set the listener to the controller. :param listener: Listener to the controller. :type listener: channelLocationController

update_channel_displayed(channel_number, channel_name, x_coordinate, y_coordinate, z_coordinate, number_of_channels)[source]

Update the channel displayed on the window. :param channel_number: The channel number :type channel_number: int :param channel_name: Channel name :type channel_name: str :param x_coordinate: X coordinate of the channel’s location :type x_coordinate: float :param y_coordinate: Y coordinate of the channel’s location :type y_coordinate: float :param z_coordinate: Z coordinate of the channel’s location :type z_coordinate: float :param number_of_channels: The number of channels :type number_of_channels: int

Module contents