17 #include <QGraphicsSceneMouseEvent>
50 setTransform(QTransform().rotate(-1.0 *
m_item->
angle()));
57 qreal xmin = std::min(event->pos().x(), opposPos.x());
58 qreal xmax = std::max(event->pos().x(), opposPos.x());
59 qreal ymin = std::min(event->pos().y(), opposPos.y());
60 qreal ymax = std::max(event->pos().y(), opposPos.y());
61 qreal
width = xmax - xmin;
62 qreal
height = ymax - ymin;
64 qreal xcenter = xmin + (xmax - xmin) / 2.;
65 qreal ycenter = ymin + (ymax - ymin) / 2.;
67 QPointF center(xcenter, ycenter);
68 QPointF centerInScene = mapToScene(center);
92 IShape2DView::mouseMoveEvent(event);
122 setTransform(QTransform().rotate(-1.0 *
m_item->
angle()));
Defines EllipseView class.
Defines MaskItems classes.
DoubleDescriptor yRadius() const
DoubleDescriptor xRadius() const
void setYRadius(double y_radius)
DoubleDescriptor xCenter() const
DoubleDescriptor angle() const
void setYCenter(double y_center)
void setXCenter(double x_center)
void setXRadius(double x_radius)
DoubleDescriptor yCenter() const
QRectF mask_rectangle() override
QPainterPath shape() const override
EllipseView(EllipseItem *item)
void onPropertyChange() override
void update_position() override
updates position of view using item properties
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override
qreal top() const override
Returns the y-coordinate of the rectangle's top edge.
void onChangedY() override
void onChangedX() override
void onItemDestroyed() override
SessionItem * parameterizedItem() const override
qreal bottom() const override
Returns the y-coordinate of the rectangle's bottom edge.
qreal left() const override
Returns the x-coordinate of the rectangle's left edge.
qreal right() const override
Returns the x-coordinate of the rectangle's right edge.
qreal toSceneX(qreal value) const
qreal fromSceneY(qreal value) const
void setBlockOnProperty(bool value)
void disconnectFromItem(SessionItem *item)
qreal fromSceneX(qreal value) const
convert scene coordinates to ColorMap plot coordinates
qreal toSceneY(qreal value) const
Base view for all rectangular-like masks.
SizeHandleElement * m_activeHandleElement
QRectF m_mask_rect
mask rectangle in scene coordinates
qreal width() const
Returns width of the rectangle.
void update_view() override
update visual appearance of view (triggered by ISceneAdaptor)
QPointF m_resize_opposite_origin
Base class for a GUI data item.
EHandleType getHandleType() const