PyDMSymbol
- class pydm.widgets.symbol.PyDMSymbol(parent=None, init_channel=None)[source]
Bases:
QWidget
,PyDMWidget
PyDMSymbol will render an image (symbol) for each value of a channel.
- Parameters:
parent (QWidget) – The parent widget for the Label
init_channel (str, optional) – The channel to be used by the widget.
- aspectRatioMode
Which aspect ratio mode to use.
- Return type:
Qt.AspectRatioMode
- connection_changed(connected)[source]
Callback invoked when the connection state of the Channel is changed. This callback acts on the connection state to enable/disable the widget and also trigger the change on alarm severity to ALARM_DISCONNECTED.
- Parameters:
connected (int) – When this value is 0 the channel is disconnected, 1 otherwise.
- imageFiles
JSON-formatted dictionary keyed on states (integers), with filenames of the image file to display for the state.
- Return type:
str
- init_for_designer()[source]
Method called after the constructor to tweak configurations for when using the widget with the Qt Designer
- minimumSizeHint()[source]
This property holds the recommended minimum size for the widget.
- Return type:
QSize
- paintEvent(event)[source]
Paint events are sent to widgets that need to update themselves, for instance when part of a widget is exposed because a covering widget was moved.
At PyDMSymbol this method handles the alarm painting with parameters from the stylesheet and draws the proper image.
- Parameters:
event (QPaintEvent) –
Note
See QWidget Documentation for all inherited properties and methods.