Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
rqt_robot_dashboard.icon_tool_button.IconToolButton Class Reference
Inheritance diagram for rqt_robot_dashboard.icon_tool_button.IconToolButton:
Inheritance graph
[legend]

Public Member Functions

def __init__ (self, name, icons, clicked_icons=None, suppress_overlays=False, icon_paths=None)
 
def state (self)
 
def update_state (self, state)
 

Public Attributes

 icon_helper
 
 name
 

Static Public Attributes

 state_changed = Signal(int)
 

Private Member Functions

def _pressed (self)
 
def _released (self)
 
def _update_state (self, state)
 

Private Attributes

 __state
 
 _clicked_icons
 
 _icons
 

Detailed Description

This is the base class for all widgets.
It provides state and icon switching support as well as convenience functions for creating icons.

:raises IndexError: if ``icons`` is not a list of lists of strings

:param name: name of the object
:type name: str
:param icons: A list of lists of strings to create icons for the states of this button.\
If only one is supplied then ok, warn, error, stale icons will be created with overlays

:type icons: list
:param clicked_icons: A list of clicked state icons. len must equal icons
:type clicked_icons: list
:param suppress_overlays: if false and there is only one icon path supplied
:type suppress_overlays: bool
:param icon_paths: list of lists of package and subdirectory in the form\
['package name', 'subdirectory'] example ['rqt_pr2_dashboard', 'images/svg']

:type icon_paths: list of lists of strings

Definition at line 42 of file icon_tool_button.py.

Constructor & Destructor Documentation

def rqt_robot_dashboard.icon_tool_button.IconToolButton.__init__ (   self,
  name,
  icons,
  clicked_icons = None,
  suppress_overlays = False,
  icon_paths = None 
)

Definition at line 66 of file icon_tool_button.py.

Member Function Documentation

def rqt_robot_dashboard.icon_tool_button.IconToolButton._pressed (   self)
private

Definition at line 121 of file icon_tool_button.py.

def rqt_robot_dashboard.icon_tool_button.IconToolButton._released (   self)
private

Definition at line 124 of file icon_tool_button.py.

def rqt_robot_dashboard.icon_tool_button.IconToolButton._update_state (   self,
  state 
)
private

Definition at line 115 of file icon_tool_button.py.

def rqt_robot_dashboard.icon_tool_button.IconToolButton.state (   self)
Read-only accessor for the widgets current state.

Definition at line 109 of file icon_tool_button.py.

def rqt_robot_dashboard.icon_tool_button.IconToolButton.update_state (   self,
  state 
)
Set the state of this button.
This will also update the icon for the button based on the ``self._icons`` list

:raises IndexError: If state is not a proper index to ``self._icons``

:param state: The state to set.
:type state: int

Definition at line 92 of file icon_tool_button.py.

Member Data Documentation

rqt_robot_dashboard.icon_tool_button.IconToolButton.__state
private

Definition at line 89 of file icon_tool_button.py.

rqt_robot_dashboard.icon_tool_button.IconToolButton._clicked_icons
private

Definition at line 85 of file icon_tool_button.py.

rqt_robot_dashboard.icon_tool_button.IconToolButton._icons
private

Definition at line 84 of file icon_tool_button.py.

rqt_robot_dashboard.icon_tool_button.IconToolButton.icon_helper

Definition at line 82 of file icon_tool_button.py.

rqt_robot_dashboard.icon_tool_button.IconToolButton.name

Definition at line 69 of file icon_tool_button.py.

rqt_robot_dashboard.icon_tool_button.IconToolButton.state_changed = Signal(int)
static

Definition at line 64 of file icon_tool_button.py.


The documentation for this class was generated from the following file:


rqt_robot_dashboard
Author(s): Ze'ev Klapow
autogenerated on Fri May 15 2020 03:39:04