PyDMDrawing Widgets

class pydm.widgets.drawing.PyDMDrawingLine(parent=None, init_channel=None)[source]

Bases: PyDMDrawingLineBase

A 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.

draw_item(painter) None[source]

Draws the line after setting up the canvas with a call to `PyDMDrawing.draw_item`.

class pydm.widgets.drawing.PyDMDrawingImage(parent=None, init_channel=None, filename='')[source]

Bases: PyDMDrawing

Renders an image given by the filename property. 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

aspectRatioMode

PyQT Property for aspect ratio mode to be used when rendering the image

Returns:

Index at Qt.AspectRatioMode enum

Return type:

int

draw_item(painter)[source]

Draws the image after setting up the canvas with a call to `PyDMDrawing.draw_item`.

filename

The filename of the image to be displayed. This can be an absolute or relative path to the display file.

Returns:

The filename configured.

Return type:

str

movie_finished()[source]

Callback executed when the movie is finished.

Return type:

None

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

sizeHint(self) QSize[source]
class pydm.widgets.drawing.PyDMDrawingRectangle(parent=None, init_channel=None)[source]

Bases: PyDMDrawing

A 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.

draw_item(painter)[source]

Draws the rectangle after setting up the canvas with a call to `PyDMDrawing.draw_item`.

class pydm.widgets.drawing.PyDMDrawingTriangle(parent=None, init_channel=None)[source]

Bases: PyDMDrawing

A 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.

draw_item(painter)[source]

Draws the triangle after setting up the canvas with a call to `PyDMDrawing.draw_item`.

class pydm.widgets.drawing.PyDMDrawingEllipse(parent=None, init_channel=None)[source]

Bases: PyDMDrawing

A 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.

draw_item(painter)[source]

Draws the ellipse after setting up the canvas with a call to `PyDMDrawing.draw_item`.

class pydm.widgets.drawing.PyDMDrawingCircle(parent=None, init_channel=None)[source]

Bases: PyDMDrawing

A 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.

draw_item(painter)[source]

Draws the circle after setting up the canvas with a call to `PyDMDrawing.draw_item`.

class pydm.widgets.drawing.PyDMDrawingArc(parent=None, init_channel=None)[source]

Bases: PyDMDrawing

A 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`.

spanAngle

PyQT Property for the span angle in degrees

Returns:

Angle in degrees

Return type:

float

startAngle

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: PyDMDrawingArc

A 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.

draw_item(painter)[source]

Draws the pie after setting up the canvas with a call to `PyDMDrawing.draw_item`.

class pydm.widgets.drawing.PyDMDrawingChord(parent=None, init_channel=None)[source]

Bases: PyDMDrawingArc

A 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.

draw_item(painter)[source]

Draws the chord after setting up the canvas with a call to `PyDMDrawing.draw_item`.

class pydm.widgets.drawing.PyDMDrawingPolygon(parent=None, init_channel=None)[source]

Bases: PyDMDrawing

A 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.

draw_item(painter)[source]

Draws the Polygon after setting up the canvas with a call to `PyDMDrawing.draw_item`.

numberOfPoints

PyQT Property for the number of points

Returns:

Number of Points

Return type:

int

class pydm.widgets.drawing.PyDMDrawingPolyline(parent=None, init_channel=None)[source]

Bases: PyDMDrawingLineBase

A 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.

draw_item(painter) None[source]

Draws the segmented line after setting up the canvas with a call to PyDMDrawing.draw_item.

getPoints() List[str][source]

Convert internal points representation for use as QStringList.

points

Convert internal points representation for use as QStringList.

class pydm.widgets.drawing.PyDMDrawingIrregularPolygon(parent=None, init_channel=None)[source]

Bases: PyDMDrawingPolyline

A 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.

getPoints()[source]

Convert internal points representation for use as QStringList.

points