Public Member Functions | |
def | __init__ |
def | add_image_path |
def | build_icon |
def | find_image |
def | make_icon |
def | set_icon_lists |
Private Attributes | |
_image_paths | |
_name |
Helper class to easily access images and build QIcons out of lists of file names
def rqt_robot_dashboard.util.IconHelper.__init__ | ( | self, | |
paths = None , |
|||
name = "IconHelper" |
|||
) |
def rqt_robot_dashboard.util.IconHelper.add_image_path | ( | self, | |
path | |||
) |
Paths added will be searched for images by the _find_image function Paths will be searched in revearse order by add time The last path to be searched is always rqt_robot_dashboard/images Subdirectories are not recursively searched :param path: The path to add to the image paths list :type path: str
def rqt_robot_dashboard.util.IconHelper.build_icon | ( | self, | |
image_name_list, | |||
mode = QIcon.Normal , |
|||
state = QIcon.On |
|||
) |
Convenience function to create an icon from a list of file names :param image_name_list: List of file image names to make into an icon :type image_name_list: list of str :param mode: The mode of the QIcon to be created. :type mode: int :param state: the state of the QIcon to be created. :type state: int
def rqt_robot_dashboard.util.IconHelper.find_image | ( | self, | |
path | |||
) |
def rqt_robot_dashboard.util.IconHelper.make_icon | ( | self, | |
image_list, | |||
mode = QIcon.Normal , |
|||
state = QIcon.On |
|||
) |
Helper function to create QIcons from lists of image files Warning: svg files interleaved with other files will not render correctly :param image_list: list of image paths to layer into an icon. :type image: list of str :param mode: The mode of the QIcon to be created. :type mode: int :param state: the state of the QIcon to be created. :type state: int
def rqt_robot_dashboard.util.IconHelper.set_icon_lists | ( | self, | |
icons, | |||
clicked_icons = None , |
|||
suppress_overlays = False |
|||
) |
Sets up the icon lists for the button states. There must be one index in icons for each state. :raises IndexError: if ``icons`` is not a list of lists of strings :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