2018-09-17 18:29:00 +02:00
|
|
|
#!/usr/bin/env python
|
|
|
|
import os
|
|
|
|
import rospy
|
|
|
|
import rospkg
|
|
|
|
|
2018-09-18 18:11:39 +02:00
|
|
|
from python_qt_binding.QtGui import QPalette
|
|
|
|
from python_qt_binding.QtWidgets import QPushButton
|
2018-09-17 18:29:00 +02:00
|
|
|
# from python_qt_binding.QtWidgets import QWidget, QDialog
|
|
|
|
|
|
|
|
class QtWrapper:
|
|
|
|
|
2018-09-17 21:39:35 +02:00
|
|
|
def __init__(self,widget):
|
2018-09-17 18:29:00 +02:00
|
|
|
|
2018-09-17 21:39:35 +02:00
|
|
|
self.widget = widget
|
2018-09-18 18:11:39 +02:00
|
|
|
# self.widget.setStyleSheet("background-color:black;")
|
|
|
|
# self.widget.setBackgroundRole(QPalette.Button)
|
|
|
|
# self.widget.setStyleSheet("QPushButton { background-color: yellow }")
|
|
|
|
self.widget.logsBrowser.setText('Sukces')
|
2018-09-17 18:29:00 +02:00
|
|
|
|
2018-09-17 21:39:35 +02:00
|
|
|
def connect_signals(self):
|
2018-09-18 18:11:39 +02:00
|
|
|
# self.widget.openButton.clicked.connect(self.handle_openButton_clicked)
|
|
|
|
self.widget.clutchButton.clicked.connect(self.handle_clutchButton_clicked)
|
|
|
|
|
|
|
|
def set_robot_selection_callback(self,callback):
|
|
|
|
# self.handle_openButton_clicked = callback
|
|
|
|
pass
|
|
|
|
|
|
|
|
def set_user_stop_state_updated_callback(self,callback):
|
|
|
|
# raise NotImplementedError
|
2018-09-18 14:56:21 +02:00
|
|
|
pass
|
2018-09-17 18:29:00 +02:00
|
|
|
|
2018-09-18 18:11:39 +02:00
|
|
|
def set_clutch_switched_callback(self,callback):
|
|
|
|
self.handle_clutchButton_clicked = callback
|
|
|
|
|
2018-09-17 21:39:35 +02:00
|
|
|
def select_robot(self,robot_id):
|
|
|
|
raise NotImplementedError
|
2018-09-17 19:41:31 +02:00
|
|
|
|
2018-09-18 14:56:21 +02:00
|
|
|
def release_robot(self):
|
2018-09-17 21:39:35 +02:00
|
|
|
raise NotImplementedError
|
2018-09-17 19:41:31 +02:00
|
|
|
|
2018-09-18 14:56:21 +02:00
|
|
|
def update_robots_list_gui(self,robots_id_list):
|
|
|
|
# raise NotImplementedError
|
|
|
|
pass
|
|
|
|
|
2018-09-17 21:39:35 +02:00
|
|
|
def update_selected_robot_info(self,robot_info):
|
|
|
|
raise NotImplementedError
|
|
|
|
|
2018-09-18 01:46:10 +02:00
|
|
|
def master_stopped(self):
|
2018-09-17 21:39:35 +02:00
|
|
|
raise NotImplementedError
|
|
|
|
|
2018-09-18 01:46:10 +02:00
|
|
|
def master_started(self):
|
2018-09-17 21:39:35 +02:00
|
|
|
raise NotImplementedError
|
|
|
|
|
2018-09-18 01:46:10 +02:00
|
|
|
def user_stopped(self):
|
2018-09-17 21:39:35 +02:00
|
|
|
raise NotImplementedError
|
|
|
|
|
2018-09-18 01:46:10 +02:00
|
|
|
def user_started(self):
|
2018-09-17 21:39:35 +02:00
|
|
|
raise NotImplementedError
|
|
|
|
|
2018-09-18 14:56:21 +02:00
|
|
|
def engage_clutch(self):
|
|
|
|
raise NotImplementedError
|
|
|
|
|
|
|
|
def disengage_clutch(self):
|
|
|
|
raise NotImplementedError
|
|
|
|
|
2018-09-18 01:46:10 +02:00
|
|
|
def master_is_stopped_notify(self):
|
2018-09-18 14:56:21 +02:00
|
|
|
raise NotImplementedError
|
|
|
|
|
|
|
|
def update_restrictions_gui(self,restrictions):
|
|
|
|
raise NotImplementedError
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def connection_to_robot_lost(self,lost_robot_id):
|
2018-09-17 21:39:35 +02:00
|
|
|
raise NotImplementedError
|