Absolute image paths changed to relative

This commit is contained in:
Olek Bojda 2018-10-01 14:04:38 +02:00
parent 2990338281
commit a6ac4c8dfd
2 changed files with 13 additions and 8 deletions

View File

@ -33,9 +33,11 @@ class QtWrapper:
# self.disable_sliders_tracking() # self.disable_sliders_tracking()
self.distance_pixmap = QPixmap('/home/olek/safetysystemL1.5/src/SafetySystem/safety_master_plugin/ui/Distance.png') ui_directory_path = '{0}/ui'.format(rospkg.RosPack().get_path('safety_master_plugin'))
self.angular_pixmap = QPixmap('/home/olek/safetysystemL1.5/src/SafetySystem/safety_master_plugin/ui/Angular.png')
self.linear_pixmap = QPixmap('/home/olek/safetysystemL1.5/src/SafetySystem/safety_master_plugin/ui/Linear.png') self.distance_pixmap = QPixmap('{0}/Distance.png'.format(ui_directory_path))
self.angular_pixmap = QPixmap('{0}/Angular.png'.format(ui_directory_path))
self.linear_pixmap = QPixmap('{0}/Linear.png'.format(ui_directory_path))
self.widget.distanceImage.setPixmap(self.distance_pixmap) self.widget.distanceImage.setPixmap(self.distance_pixmap)
self.widget.angularImage.setPixmap(self.angular_pixmap) self.widget.angularImage.setPixmap(self.angular_pixmap)
self.widget.linearImage.setPixmap(self.linear_pixmap) self.widget.linearImage.setPixmap(self.linear_pixmap)

View File

@ -22,15 +22,18 @@ class QtWrapper:
self.clear_robot_info() self.clear_robot_info()
self.distance_pixmap = QPixmap('/home/olek/safetysystemL1.5/src/SafetySystem/safety_user_plugin/ui/Distance.png') ui_directory_path = '{0}/ui'.format(rospkg.RosPack().get_path('safety_user_plugin'))
self.angular_pixmap = QPixmap('/home/olek/safetysystemL1.5/src/SafetySystem/safety_user_plugin/ui/Angular.png')
self.linear_pixmap = QPixmap('/home/olek/safetysystemL1.5/src/SafetySystem/safety_user_plugin/ui/Linear.png') self.distance_pixmap = QPixmap('{0}/Distance.png'.format(ui_directory_path))
self.angular_pixmap = QPixmap('{0}/Angular.png'.format(ui_directory_path))
self.linear_pixmap = QPixmap('{0}/Linear.png'.format(ui_directory_path))
self.widget.distanceImage.setPixmap(self.distance_pixmap.scaled(66,46)) self.widget.distanceImage.setPixmap(self.distance_pixmap.scaled(66,46))
self.widget.angularImage.setPixmap(self.angular_pixmap) self.widget.angularImage.setPixmap(self.angular_pixmap)
self.widget.linearImage.setPixmap(self.linear_pixmap.scaled(20,48)) self.widget.linearImage.setPixmap(self.linear_pixmap.scaled(20,48))
self.ok_pixmap = QPixmap('/home/olek/safetysystemL1.5/src/SafetySystem/safety_user_plugin/ui/Ok.jpg') self.ok_pixmap = QPixmap('{0}/Ok.jpg'.format(ui_directory_path))
self.cancel_pixmap = QPixmap('/home/olek/safetysystemL1.5/src/SafetySystem/safety_user_plugin/ui/Cancel.jpg') self.cancel_pixmap = QPixmap('{0}/Cancel.jpg'.format(ui_directory_path))
def disconnect_signals(self): def disconnect_signals(self):
self.widget.clutchButton.clicked.disconnect() self.widget.clutchButton.clicked.disconnect()