Public Member Functions | Private Attributes
rqt_robot_dashboard.util.IconHelper Class Reference

List of all members.

Public Member Functions

def __init__
def add_image_path
def build_icon
def find_image
def make_icon

Private Attributes

 _image_paths

Detailed Description

Helper class to easily access images and build QIcons out of lists of file names

Definition at line 105 of file util.py.


Constructor & Destructor Documentation

def rqt_robot_dashboard.util.IconHelper.__init__ (   self,
  paths = None 
)

Definition at line 109 of file util.py.


Member Function Documentation

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

Definition at line 112 of file util.py.

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

Definition at line 192 of file util.py.

Convenience function to help with finding images.
Path can either be specified as absolute paths or relative to any path in ``_image_paths``

:param path: The path or name of the image.
:type path: str

Definition at line 175 of file util.py.

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

Definition at line 124 of file util.py.


Member Data Documentation

Definition at line 109 of file util.py.


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


rqt_robot_dashboard
Author(s): Ze'ev Klapow
autogenerated on Fri Jan 3 2014 11:56:25