18 lines
594 B
Python
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)
|