Commit 3ae8389f authored by Maxime Perrotin's avatar Maxime Perrotin

Add timers to the random simulation choices

parent c1e96e33
......@@ -912,7 +912,8 @@ class sdlHandler(QObject):
(this feature is not implemented yet) '''
widget = self.dock_checker.widget()
checker_table = widget.findChild(QTableWidget, 'tableWidget')
checker_table.setRowCount(len(self.proc.input_signals))
checker_table.setRowCount(len(self.proc.input_signals)
+ len(self.proc.timers))
for idx, inp in enumerate(self.proc.input_signals):
name = inp['name']
sort = inp.get('type', None)
......@@ -929,6 +930,17 @@ class sdlHandler(QObject):
combo.addItems(('Manual', 'Random', 'Periodic'))
checker_table.setItem(idx, 0, item)
checker_table.setCellWidget(idx, 1, combo)
# add the timers
for each in self.proc.timers:
idx += 1
item = QTableWidgetItem(each)
item.setFlags(Qt.ItemIsEnabled)
item.setData(Qt.UserRole, None)
combo = QComboBox()
combo.addItems(('Manual', 'Random', 'Periodic'))
checker_table.setItem(idx, 0, item)
checker_table.setCellWidget(idx, 1, combo)
# Plug the "Random" button to the function handling random simulation
random_btn = widget.findChild(QToolButton, 'randomButton')
random_btn.pressed.connect(self.random_simulation)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment