PyDMDrawing Widgets
- class pydm.widgets.drawing.PyDMDrawingLine(parent=None, init_channel=None)[source]
Bases:
PyDMDrawingLineBaseA widget with a line drawn in it. This class inherits from PyDMDrawingLineBase.
- Parameters:
parent (QWidget) – The parent widget for the Label
init_channel (str, optional) – The channel to be used by the widget.
- class pydm.widgets.drawing.PyDMDrawingImage(parent=None, init_channel=None, filename='')[source]
Bases:
PyDMDrawingRenders an image given by the
filenameproperty. This class inherits from PyDMDrawing.- Parameters:
parent (QWidget) – The parent widget for the Label
init_channel (str, optional) – The channel to be used by the widget.
- null_color
QColor to fill the image if the filename is not found.
- Type:
Qt.Color
- draw_item(painter)[source]
Draws the image after setting up the canvas with a call to
`PyDMDrawing.draw_item`.
- movie_frame_changed(frame_no)[source]
Callback executed when a new frame is available at the QMovie.
- Parameters:
frame_no (int) – The new frame index
- Return type:
None
- prop_type
alias of
AspectRatioMode
- readAspectRatioMode() int | PyQt5.QtCore.Qt.AspectRatioMode[source]
PyQT Property for aspect ratio mode to be used when rendering the image
- Returns:
Index at Qt.AspectRatioMode enum
- Return type:
int
- readFilename() str[source]
The filename of the image to be displayed. This can be an absolute or relative path to the image file.
- Returns:
The filename configured.
- Return type:
str
- readRecursiveImageSearch() bool[source]
Whether or not to search for a provided image file recursively in subfolders relative to the location of this display.
- Returns:
If recursive search is enabled.
- Return type:
bool
- setAspectRatioMode(new_mode) None[source]
PyQT Property for aspect ratio mode to be used when rendering the image
- Parameters:
new_mode (int) – Index at Qt.AspectRatioMode enum
- setFilename(new_file) None[source]
The filename of the image to be displayed.
This file can be either relative to the
.uifile or absolute. If the path does not exist, a shape of.null_colorwill be displayed instead.- Parameters:
new_file (str) – The filename to be used
- class pydm.widgets.drawing.PyDMDrawingRectangle(parent=None, init_channel=None)[source]
Bases:
PyDMDrawingA widget with a rectangle drawn in it. This class inherits from PyDMDrawing.
- Parameters:
parent (QWidget) – The parent widget for the Label
init_channel (str, optional) – The channel to be used by the widget.
- class pydm.widgets.drawing.PyDMDrawingTriangle(parent=None, init_channel=None)[source]
Bases:
PyDMDrawingA widget with a triangle drawn in it. This class inherits from PyDMDrawing.
- Parameters:
parent (QWidget) – The parent widget for the Label
init_channel (str, optional) – The channel to be used by the widget.
- class pydm.widgets.drawing.PyDMDrawingEllipse(parent=None, init_channel=None)[source]
Bases:
PyDMDrawingA widget with an ellipse drawn in it. This class inherits from PyDMDrawing.
- Parameters:
parent (QWidget) – The parent widget for the Label
init_channel (str, optional) – The channel to be used by the widget.
- class pydm.widgets.drawing.PyDMDrawingCircle(parent=None, init_channel=None)[source]
Bases:
PyDMDrawingA widget with a circle drawn in it. This class inherits from PyDMDrawing.
- Parameters:
parent (QWidget) – The parent widget for the Label
init_channel (str, optional) – The channel to be used by the widget.
- class pydm.widgets.drawing.PyDMDrawingArc(parent=None, init_channel=None)[source]
Bases:
PyDMDrawingA widget with an arc drawn in it. This class inherits from PyDMDrawing.
- Parameters:
parent (QWidget) – The parent widget for the Label
init_channel (str, optional) – The channel to be used by the widget.
- draw_item(painter)[source]
Draws the arc after setting up the canvas with a call to
`PyDMDrawing.draw_item`.
- readSpanAngle() float[source]
PyQT Property for the span angle in degrees
- Returns:
Angle in degrees
- Return type:
float
- readStartAngle() None[source]
PyQT Property for the start angle in degrees
- Returns:
Angle in degrees
- Return type:
float
- class pydm.widgets.drawing.PyDMDrawingPie(parent=None, init_channel=None)[source]
Bases:
PyDMDrawingArcA widget with a pie drawn in it. This class inherits from PyDMDrawing.
- Parameters:
parent (QWidget) – The parent widget for the Label
init_channel (str, optional) – The channel to be used by the widget.
- class pydm.widgets.drawing.PyDMDrawingChord(parent=None, init_channel=None)[source]
Bases:
PyDMDrawingArcA widget with a chord drawn in it. This class inherits from PyDMDrawing.
- Parameters:
parent (QWidget) – The parent widget for the Label
init_channel (str, optional) – The channel to be used by the widget.
- class pydm.widgets.drawing.PyDMDrawingPolygon(parent=None, init_channel=None)[source]
Bases:
PyDMDrawingA widget with a polygon drawn in it. This class inherits from PyDMDrawing.
- Parameters:
parent (QWidget) – The parent widget for the Label
init_channel (str, optional) – The channel to be used by the widget.
- class pydm.widgets.drawing.PyDMDrawingPolyline(parent=None, init_channel=None)[source]
Bases:
PyDMDrawingLineBaseA widget with a multi-segment, piecewise-linear line drawn in it. This class inherits from PyDMDrawingLineBase.
- Parameters:
parent (QWidget) – The parent widget for the Label
init_channel (str, optional) – The channel to be used by the widget.
- class pydm.widgets.drawing.PyDMDrawingIrregularPolygon(parent=None, init_channel=None)[source]
Bases:
PyDMDrawingPolylineA widget contains an irregular polygon (arbitrary number of vertices, arbitrary lengths).
This is a special case of the PyDMDrawingPolyline, adding the requirement that the last point is always identical to the first point.
This widget is created for compatibility with MEDM’s polygon widget.
- Parameters:
parent (QWidget) – The parent widget for the Label
init_channel (str, optional) – The channel to be used by the widget.