status_indicator.py
Go to the documentation of this file.
00001 #! /usr/bin/env python
00002 
00003 from python_qt_binding.QtGui import QLabel, QStyle
00004 import rospy
00005 
00006 
00007 class StatusIndicator(QLabel):
00008     def __init__(self, *args):
00009         super(StatusIndicator, self).__init__(*args)
00010         self.set_stopped()
00011 
00012     def set_running(self):
00013         self.setPixmap(
00014            self.style().standardIcon(QStyle.SP_DialogApplyButton).pixmap(16))
00015 
00016     def set_starting(self):
00017         rospy.logdebug('StatusIndicator.set_starting')
00018         self.setPixmap(self.style().standardIcon(
00019                                       QStyle.SP_DialogResetButton).pixmap(16))
00020 
00021     def set_stopping(self):
00022         """
00023         Show msg that the process is "stopping".
00024 
00025         cf. set_stopped()
00026         """
00027         self.setPixmap(self.style().standardIcon(
00028                                       QStyle.SP_DialogResetButton).pixmap(16))
00029 
00030     def set_stopped(self):
00031         """
00032         Show msg that the process is "stopped".
00033 
00034         cf. set_stopping()
00035         """
00036         self.setText(" ")
00037 
00038     def set_died(self):
00039         self.setPixmap(self.style().standardIcon(
00040                                       QStyle.SP_MessageBoxCritical).pixmap(16))


rqt_launch
Author(s): Isaac Saito , Stuart Glaser
autogenerated on Mon Oct 6 2014 07:15:40