35 from python_qt_binding.QtCore
import Qt
36 from python_qt_binding.QtWidgets
import QWidget, QVBoxLayout, QCheckBox, QScrollArea, QPushButton
42 super(NodeSelection, self).
__init__()
45 self.setWindowTitle(
"Select the nodes you want to record")
47 self.
area = QScrollArea(self)
51 self.ok_button.setEnabled(
False)
53 self.main_vlayout.addWidget(self.
area)
54 self.main_vlayout.addWidget(self.
ok_button)
67 item = QCheckBox(node, self)
68 item.stateChanged.connect(
lambda x: self.
updateNode(x, node))
69 self.selection_vlayout.addWidget(item)
72 if state == Qt.Checked:
73 self.selected_nodes.append(node)
75 self.selected_nodes.remove(node)
77 self.ok_button.setEnabled(
True)
79 self.ok_button.setEnabled(
False)
82 master = rosgraph.Master(
'rqt_bag_recorder')
83 state = master.getSystemState()
84 subs = [t
for t, l
in state[1]
85 if len([node_name
for node_name
in self.
selected_nodes if node_name
in l]) > 0]
87 self.parent_widget.changeTopicCheckState(topic, Qt.Checked)
88 self.parent_widget.updateList(Qt.Checked, topic)
def __init__(self, parent)
def addCheckBox(self, node)
def updateNode(self, state, node)
def onButtonClicked(self)