Skip to content
Snippets Groups Projects
Commit 7bdccc39 authored by Lan Dam's avatar Lan Dam
Browse files

modify function and variable names to be more descriptive

parent d0322059
No related branches found
No related tags found
1 merge request!261Feature for users to hide/show and reorder channels
Pipeline #3623 passed with stage
in 6 minutes and 50 seconds
This commit is part of merge request !261. Comments created here will be created in the context of that merge request.
...@@ -19,11 +19,16 @@ class SelectChanelsToShowDialog(QDialog): ...@@ -19,11 +19,16 @@ class SelectChanelsToShowDialog(QDialog):
super(SelectChanelsToShowDialog, self).__init__() super(SelectChanelsToShowDialog, self).__init__()
self.parent = parent self.parent = parent
self.channel_list_widget1 = self.create_chan_list_widget( # reorderablable_chan_list_widget: list widget where channels can be
# reordered by dragging and dropping, used to display SOH and waveform
# channels
self.reorderable_chan_list_widget = self.create_chan_list_widget(
self.parent.plotting_data1, self.parent.pref_order, True self.parent.plotting_data1, self.parent.pref_order, True
) )
self.channel_list_widget2 = self.create_chan_list_widget( # unreorderable_chan_list_widget: list widget where channels can NOT be
# reordered, used to display mass position channels
self.unreorderable_chan_list_widget = self.create_chan_list_widget(
self.parent.plotting_data2, [], False self.parent.plotting_data2, [], False
) )
...@@ -86,11 +91,11 @@ class SelectChanelsToShowDialog(QDialog): ...@@ -86,11 +91,11 @@ class SelectChanelsToShowDialog(QDialog):
"* Check to show/ uncheck to hide a channel.\n\n" "* Check to show/ uncheck to hide a channel.\n\n"
"* Drop and drag channels in the first list to reorder.") "* Drop and drag channels in the first list to reorder.")
main_layout.addWidget(label) main_layout.addWidget(label)
main_layout.addWidget(self.channel_list_widget1) main_layout.addWidget(self.reorderable_chan_list_widget)
label = QLabel("* Mass Position channels won't be reorderable.") label = QLabel("* Mass Position channels won't be reorderable.")
main_layout.addWidget(label) main_layout.addWidget(label)
main_layout.addWidget(self.channel_list_widget2) main_layout.addWidget(self.unreorderable_chan_list_widget)
button_layout = QtWidgets.QHBoxLayout() button_layout = QtWidgets.QHBoxLayout()
main_layout.addLayout(button_layout) main_layout.addLayout(button_layout)
...@@ -132,10 +137,10 @@ class SelectChanelsToShowDialog(QDialog): ...@@ -132,10 +137,10 @@ class SelectChanelsToShowDialog(QDialog):
""" """
new_pref_order = ( new_pref_order = (
self.channel_list_widget_to_plotting_data( self.apply_selection_to_plotting_data_channel_visible(
self.channel_list_widget1, self.parent.plotting_data1)) self.reorderable_chan_list_widget, self.parent.plotting_data1))
self.channel_list_widget_to_plotting_data( self.apply_selection_to_plotting_data_channel_visible(
self.channel_list_widget2, self.parent.plotting_data2) self.unreorderable_chan_list_widget, self.parent.plotting_data2)
self.parent.clear() self.parent.clear()
self.parent.plot_channels( self.parent.plot_channels(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment