madgui.widget.floor_plan module

Components to draw a 2D floor plan of a given MAD-X lattice.

Classes

FloorCoords(x, y, z, theta, phi, psi)

FloorPlanWidget(session)

LatticeFloorPlan(*args, **kwargs)

Graphics widget to draw 2D floor plan of given lattice.

class madgui.widget.floor_plan.FloorCoords(x, y, z, theta, phi, psi)

Bases: tuple

Attributes

phi

Alias for field number 4

psi

Alias for field number 5

theta

Alias for field number 3

x

Alias for field number 0

y

Alias for field number 1

z

Alias for field number 2

property phi

Alias for field number 4

property psi

Alias for field number 5

property theta

Alias for field number 3

property x

Alias for field number 0

property y

Alias for field number 1

property z

Alias for field number 2

class madgui.widget.floor_plan.FloorPlanWidget(session)[source]

Bases: PyQt5.QtWidgets.QWidget

class madgui.widget.floor_plan.LatticeFloorPlan(*args, **kwargs)[source]

Bases: PyQt5.QtWidgets.QGraphicsView

Graphics widget to draw 2D floor plan of given lattice.

Methods

mapRectToScene(rect)

Map topleft/botright rect from viewport to scene coordinates.

mouseMoveEvent(self, QMouseEvent)

mousePressEvent(self, QMouseEvent)

resizeEvent(event)

Maintain visible region on resize.

setElements(elements, survey, selection)

setProjection(theta, phi[, psi])

setViewRect(rect)

Fit the given scene rectangle into the visible view.

set_model(model)

set_session(session)

wheelEvent(event)

Handle mouse wheel as zoom.

zoom(scale)

Scale the figure uniformly along both axes.

mapRectToScene(rect)[source]

Map topleft/botright rect from viewport to scene coordinates.

This assumes there is no rotation/shearing.

model = None
mouseMoveEvent(self, QMouseEvent)[source]
mousePressEvent(self, QMouseEvent)[source]
replay = None
resizeEvent(event)[source]

Maintain visible region on resize.

session = None
setElements(elements, survey, selection)[source]
setProjection(theta, phi, psi=0)[source]
setViewRect(rect)[source]

Fit the given scene rectangle into the visible view.

This assumes there is no rotation/shearing.

set_model(model)[source]
set_session(session)[source]
wheelEvent(event)[source]

Handle mouse wheel as zoom.

zoom(scale)[source]

Scale the figure uniformly along both axes.