neoscore.interface.qt.converters

Helper methods for conversion between neoscore.core and Qt classes

neoscore.interface.qt.converters.qt_point_to_point(qt_point: Union[QPoint, QPointF]) Point[source]

Create a Point from a QPoint or QPointF

Parameters

qt_point – The source point

neoscore.interface.qt.converters.point_to_qt_point(point: Point) QPoint[source]

Create a QPoint from a Point

Parameters

point – The source point

neoscore.interface.qt.converters.point_to_qt_point_f(point: Point) QPointF[source]

Create a QPointF from a Point

Parameters

point – The source point

neoscore.interface.qt.converters.qt_rect_to_rect(qt_rect: Union[QRect, QRectF]) Rect[source]

Create a Rect from a QRect or QRectF

Parameters

qt_rect – The source rect

neoscore.interface.qt.converters.rect_to_qt_rect(rect: Rect) QRect[source]

Create a QRect from a Rect

Parameters

rect – The source rect

neoscore.interface.qt.converters.rect_to_qt_rect_f(rect: Rect) QRectF[source]

Create a QRectF from a Rect

Parameters

rect – The source rect

neoscore.interface.qt.converters.color_to_q_color(color: Color) QColor[source]

Create a QColor from a Color

Parameters

color – The source Color

neoscore.interface.qt.converters.q_color_to_color(q_color: QColor) Color[source]

Create a Color from a QColor

Parameters

q_color – The source QColor

neoscore.interface.qt.converters.q_mouse_event_to_mouse_event(q_event: QMouseEvent, ns_event_type: MouseEventType, window_pos: QPointF) MouseEvent[source]
neoscore.interface.qt.converters.q_key_event_to_key_event(q_event: QKeyEvent, basic_event_type: KeyEventType) KeyEvent[source]