taurus taurus

Previous topic

TaurusXValues

Next topic

taurus.qt.qtgui.style

This Page

taurus.qt.qtgui.resource

Functions

getElementTypeIcon(elemType, fallback=None)

Gets a PyQt4.QtGui.QIcon object for the given taurus.core.TaurusElementType.

If an icon cannot be found for the given taurus.core.TaurusElementType, fallback is returned.

Parameters:
  • elemType (:class:~`TaurusElementType`) – the taurus element type
  • fallback (:class:~`PyQt4.QtGui.QIcon`) – the fallback icon. Default is None.
Return type:

:class:~`PyQt4.QtGui.QIcon`

Returns:

a PyQt4.QtGui.QIcon for the given taurus.core.TaurusElementType

getElementTypeIconName(elemType)

Gets an icon name string for the given taurus.core.TaurusElementType.

If an icon name cannot be found for the given taurus.core.TaurusElementType, None is returned.

Parameters:elemType (:class:~`TaurusElementType`) – the taurus element type
Return type::class:~`str`
Returns:a string representing the icon name for the given taurus.core.TaurusElementType
getElementTypePixmap(elemType, size=None)

Gets a PyQt4.QtGui.QPixmap object for the given taurus.core.TaurusElementType.

If a pixmap cannot be found for the given taurus.core.TaurusElementType, fallback is returned.

Parameters:
  • elemType (:class:~`TaurusElementType`) – the taurus element type
  • fallback (:class:~`PyQt4.QtGui.QPixmap`) – the fallback pixmap. Default is None.
Return type:

:class:~`PyQt4.QtGui.QPixmap`

Returns:

a PyQt4.QtGui.QPixmap for the given taurus.core.TaurusElementType

getElementTypeSize(elemType)
getElementTypeToolTip(elemType)
getIcon(key)

Returns a PyQt4.QtGui.QIcon object for the given key

Parameters:key (:class:~`str`) – a string with the pixmap resource key (ex.: ‘:/status/folder_open.svg’)
Return type::class:~`PyQt4.QtGui.QIcon`
Returns:a PyQt4.QtGui.QIcon for the given key
getPixmap(key, size=None)

Returns a PyQt4.QtGui.QPixmap object for the given key and size

Parameters:
  • key (:class:~`str`) – a string with the pixmap resource key (ex.: ‘:/status/folder_open.svg’)
  • size (:class:~`int`) – the pixmap size in pixels (will get a square pixmap). Default is None meaning it will return the original size
Return type:

:class:~`PyQt4.QtGui.QPixmap`

Returns:

a PyQt4.QtGui.QPixmap for the given key and size

getSWDevHealthIcon(elemHealth, fallback=None)

Gets a PyQt4.QtGui.QIcon object for the given taurus.core.TaurusSWDevHealth.

If an icon cannot be found for the given taurus.core.TaurusSWDevHealth, fallback is returned.

Parameters:
  • elemHealth (:class:~`TaurusSWDevHealth`) – the taurus software device health status
  • fallback (:class:~`PyQt4.QtGui.QIcon`) – the fallback icon. Default is None.
Return type:

:class:~`PyQt4.QtGui.QIcon`

Returns:

a PyQt4.QtGui.QIcon for the given taurus.core.TaurusSWDevHealth

getSWDevHealthPixmap(elemHealth, size=None)

Gets a PyQt4.QtGui.QPixmap object for the given taurus.core.TaurusSWDevHealth.

If a pixmap cannot be found for the given taurus.core.TaurusSWDevHealth, fallback is returned.

Parameters:
  • elemHealth (:class:~`TaurusSWDevHealth`) – the taurus software device health status
  • fallback (:class:~`PyQt4.QtGui.QPixmap`) – the fallback icon. Default is None.
Return type:

:class:~`PyQt4.QtGui.QPixmap`

Returns:

a PyQt4.QtGui.QPixmap for the given taurus.core.TaurusSWDevHealth

getSWDevHealthToolTip(elemHealth)
getStandardIcon(key, widget=None)

Returns a PyQt4.QtGui.QIcon object for the given key. Key should be a QStyle.StandardPixmap enumeration member. The widget argument is optional and can also be used to aid the determination of the icon.

Parameters:
  • key (:class:~`QStyle.StandardPixmap`) – a standard pixmap which can follow some existing GUI style or guidelin
  • widget (:class:~`Qt.QWidget`) – the widget argument (optional) can also be used to aid the determination of the icon.
Return type:

:class:~`PyQt4.QtGui.QIcon`

Returns:

a PyQt4.QtGui.QIcon for the given key

getThemeIcon(key)

Returns a PyQt4.QtGui.QIcon object for the given key. Key should be a valid theme key. See Icon Naming Specification for the list of valid theme keys.

If theme is not supported by Qt (version < 4.6) or by the OS, the method will return a theme icon from the Tango Icon Library.

If the key cannot be found, it will return a null content QIcon.

Parameters:key (:class:~`str`) – a string with the icon theme key (ex.: ‘folder_open’)
Return type::class:~`PyQt4.QtGui.QIcon`
Returns:a PyQt4.QtGui.QIcon for the given key
getThemeMembers()

Returns the current icon theme elements

Returns:the current icon theme elements in a dictionary where each key is a group name and the value is a sequence of theme icon name.
Return type:dict<str,seq<str>>
getThemePixmap(key, size=None)

Returns a PyQt4.QtGui.QPixmap object for the given key and size. Key should be a valid theme key. See Icon Naming Specification for the list of valid theme keys.

If theme is not supported by Qt (version < 4.6) or by the OS, the method will return a theme pixmap from the Tango Icon Library.

If the key cannot be found, it will return a null content Pixmap.

Parameters:
  • key (:class:~`str`) – a string with the pixmap theme key (ex.: ‘folder_open’)
  • size (:class:~`int`) – the pixmap size in pixels (will get a square pixmap). Default is None meaning it will return the original size
Return type:

:class:~`PyQt4.QtGui.QPixmap`

Returns:

a PyQt4.QtGui.QPixmap for the given key and size