32 from python_qt_binding.QtCore
import QSize
39 Dashboard widget to display PR2 Runstop state.
43 :param context: the plugin context
44 :type context: qt_gui.plugin.Plugin
46 ok_icon = [
'bg-green.svg',
'ic-runstop-off.svg']
47 physical_engaged_icon = [
'bg-red.svg',
'ic-runstop-on.svg']
48 wireless_engaged_icon = [
'bg-red.svg',
'ic-wireless-runstop-on.svg']
49 stale_icon = [
'bg-grey.svg',
'ic-runstop-off.svg',
'ol-stale-badge.svg']
51 icons = [ok_icon, physical_engaged_icon, wireless_engaged_icon, stale_icon]
52 super(PR2Runstops, self).
__init__(
'Runstop', icons, icons)
53 self.setToolTip(
'Runstop')
55 self.setFixedSize(self._icons[0].actualSize(QSize(50, 30)))