safety_user_plugin/scripts/user_widget.py
2021-08-13 14:43:56 +02:00

18 lines
594 B
Python

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