#include <GraphicsView.hxx>
Definition at line 33 of file GraphicsView.hxx.
GraphicsView::GraphicsView |
( |
QWidget * |
parent = 0 | ) |
|
GraphicsView::~GraphicsView |
( |
| ) |
|
|
virtual |
void GraphicsView::contextMenuEvent |
( |
QContextMenuEvent * |
event | ) |
|
|
protected |
void GraphicsView::mouseMoveEvent |
( |
QMouseEvent * |
e | ) |
|
|
protected |
Definition at line 128 of file GraphicsView.cxx.
References _fittingArea, _panning, _prevPos, _prevX, _prevY, _rect, _scale, and _zooming.
130 WrapGraphicsView::mouseMoveEvent(e);
131 if (e->buttons()==Qt::LeftButton)
133 QPoint current = e->pos();
136 qreal currentX = e->globalX();
137 qreal currentY = e->globalY();
145 double deltax = delta/900.;
146 double zoom = exp(deltax);
161 _rect = scene()->addRect(QGraphicsView::mapToScene(QRect(
_prevPos, current)).boundingRect());
162 _rect->setZValue(100000);
163 _rect->setParentItem(0);
167 _rect->setRect(QGraphicsView::mapToScene(QRect(
_prevPos, current)).boundingRect());
void GraphicsView::mousePressEvent |
( |
QMouseEvent * |
e | ) |
|
|
protected |
void GraphicsView::mouseReleaseEvent |
( |
QMouseEvent * |
e | ) |
|
|
protected |
Definition at line 199 of file GraphicsView.cxx.
References _fittingArea, _panning, _prevPos, _rect, _zooming, and DEBTRACE.
203 setDragMode(QGraphicsView::NoDrag);
204 setTransformationAnchor(QGraphicsView::AnchorViewCenter);
208 QPoint current = e->pos();
209 fitInView(QGraphicsView::mapToScene(QRect(
_prevPos, current)).boundingRect(), Qt::KeepAspectRatio);
214 QTransform q = transform();
215 DEBTRACE(q.m11()<<
" "<<q.m12()<<
" "<<q.m21()<<
" "<<q.m22()<<
" "<<q.dx()<<
" "<<q.dy());
216 WrapGraphicsView::mouseReleaseEvent(e);
void GraphicsView::onCenterOnNode |
( |
| ) |
|
|
virtualslot |
void GraphicsView::onViewFitAll |
( |
| ) |
|
|
virtualslot |
void GraphicsView::onViewFitArea |
( |
| ) |
|
|
virtualslot |
void GraphicsView::onViewGlobalPan |
( |
| ) |
|
|
virtualslot |
void GraphicsView::onViewPan |
( |
| ) |
|
|
virtualslot |
void GraphicsView::onViewReset |
( |
| ) |
|
|
virtualslot |
void GraphicsView::onViewZoom |
( |
| ) |
|
|
virtualslot |
void GraphicsView::onZoomToBloc |
( |
| ) |
|
|
virtualslot |
void GraphicsView::wheelEvent |
( |
QWheelEvent * |
e | ) |
|
|
protectedvirtual |
Definition at line 219 of file GraphicsView.cxx.
References _scale, and DEBTRACE.
221 DEBTRACE(
"GraphicsView::wheelEvent " << e->delta());
222 double zoom = exp(0.1*e->delta()/120);
224 setTransformationAnchor(QGraphicsView::AnchorUnderMouse);
bool YACS::HMI::GraphicsView::_fittingArea |
|
protected |
bool YACS::HMI::GraphicsView::_panning |
|
protected |
QPoint YACS::HMI::GraphicsView::_prevPos |
|
protected |
int YACS::HMI::GraphicsView::_prevX |
|
protected |
int YACS::HMI::GraphicsView::_prevY |
|
protected |
QGraphicsRectItem* YACS::HMI::GraphicsView::_rect |
|
protected |
qreal YACS::HMI::GraphicsView::_scale |
|
protected |
bool YACS::HMI::GraphicsView::_zooming |
|
protected |
The documentation for this class was generated from the following files: