35 from python_qt_binding.QtCore
import Qt, Signal
36 from python_qt_binding.QtWidgets
import QWidget, QVBoxLayout, QCheckBox, QScrollArea, QPushButton
37 from .node_selection
import NodeSelection
42 recordSettingsSelected = Signal(bool, list)
45 super(TopicSelection, self).
__init__()
46 master = rosgraph.Master(
'rqt_bag_recorder')
47 self.setWindowTitle(
"Select the topics you want to record")
54 self.
area = QScrollArea(self)
73 topic_data_list = master.getPublishedTopics(
'')
74 topic_data_list.sort()
75 for topic, datatype
in topic_data_list:
85 item = QCheckBox(topic, self)
86 item.stateChanged.connect(
lambda x: self.
updateList(x, topic))
92 if item.text() == topic:
93 item.setCheckState(state)
96 def updateList(self, state, topic=None, force_update_state=False):
98 if state == Qt.Checked:
101 if item.checkState() == Qt.Unchecked:
102 item.setCheckState(Qt.Checked)
103 elif state == Qt.Unchecked:
106 if item.checkState() == Qt.Checked:
107 item.setCheckState(Qt.Unchecked)
109 if state == Qt.Checked:
113 if self.
item_all.checkState() == Qt.Checked:
114 self.
item_all.setCheckState(Qt.PartiallyChecked)
def updateList(self, state, topic=None, force_update_state=False)
def changeTopicCheckState(self, topic, state)
def addCheckBox(self, topic)
def onButtonClicked(self)
def onFromNodesButtonClicked(self)