safety_master_plugin/scripts/master_widget.py
2021-08-13 14:38:22 +02:00

18 lines
604 B
Python

#!/usr/bin/env python
import os
import rospkg
from python_qt_binding.QtWidgets import QWidget
from python_qt_binding import loadUi
class MasterWidget(QWidget):
def __init__(self,context):
super(MasterWidget, self).__init__()
ui_file = os.path.join(rospkg.RosPack().get_path('safety_master_plugin'), 'ui', 'master_view.ui')
loadUi(ui_file, self)
self.setObjectName('Master Plugin - L1.5 safety system')
if context.serial_number() > 1:
self.setWindowTitle(self.windowTitle() + (' (%d)' % context.serial_number()))
context.add_widget(self)