The VMainGraphicsView class main scene view. More...
#include <vmaingraphicsview.h>
Public Slots | |
void | zoomByScale (qreal scale) |
void | zoomIn () |
void | zoomOut () |
void | zoom100Percent () |
void | zoomToFit () |
void | zoomToRect (const QRectF &rect) |
void | updateView (const QTransform &transform) |
void | resetScrollBars () |
void | resetScrollAnimations () |
Signals | |
void | mouseRelease () |
mouseRelease help catch mouse release event. More... | |
void | itemClicked (QGraphicsItem *item) |
void | signalZoomScaleChanged (qreal scale) |
Public Member Functions | |
VMainGraphicsView (QWidget *parent=nullptr) | |
VMainGraphicsView constructor. More... | |
void | setShowToolOptions (bool value) |
void | allowRubberBand (bool value) |
void | zoomPanEnabled (bool value) |
void | zoomToAreaEnabled (bool value) |
void | setRubberBandColor (QRubberBand *band, const QColor &color) |
void | initScrollBars () |
Static Public Member Functions | |
static void | NewSceneRect (QGraphicsScene *sc, QGraphicsView *view, QGraphicsItem *item=nullptr) |
NewSceneRect calculate scene rect what contains all items and doesn't less that size of scene view. More... | |
static QRectF | SceneVisibleArea (QGraphicsView *view) |
static qreal | MinScale () |
static qreal | MaxScale () |
Protected Member Functions | |
virtual void | mousePressEvent (QMouseEvent *event) Q_DECL_OVERRIDE |
mousePressEvent handle mouse press events. More... | |
virtual void | mouseMoveEvent (QMouseEvent *event) Q_DECL_OVERRIDE |
virtual void | mouseReleaseEvent (QMouseEvent *event) Q_DECL_OVERRIDE |
mouseReleaseEvent handle mouse release events. More... | |
virtual void | mouseDoubleClickEvent (QMouseEvent *event) Q_DECL_OVERRIDE |
Protected Attributes | |
QSharedPointer< QCursor > | curMagnifier |
Private Attributes | |
GraphicsViewZoom * | zoom |
bool | showToolProperties |
bool | showScrollBars |
bool | isallowRubberBand |
bool | isZoomToAreaActive |
bool | isRubberBandActive |
bool | isRubberBandColorSet |
bool | isZoomPanActive |
bool | isPanDragActive |
QRubberBand * | rubberBand |
QRect * | rubberBandRect |
QPoint | startPoint |
QPoint | endPoint |
QPoint | m_ptStartPos |
QPoint | cursorPos |
The VMainGraphicsView class main scene view.
Definition at line 158 of file vmaingraphicsview.h.
|
explicit |
VMainGraphicsView constructor.
parent | parent object. |
Definition at line 467 of file vmaingraphicsview.cpp.
References GraphicsViewZoom::zoomed().
void VMainGraphicsView::allowRubberBand | ( | bool | value | ) |
Definition at line 827 of file vmaingraphicsview.cpp.
References isallowRubberBand.
void VMainGraphicsView::initScrollBars | ( | ) |
Definition at line 870 of file vmaingraphicsview.cpp.
References qApp, and showScrollBars.
Referenced by resetScrollBars().
|
signal |
Referenced by MainWindow::InitDocksContain(), and mousePressEvent().
|
static |
Definition at line 812 of file vmaingraphicsview.cpp.
References maxSceneSize.
Referenced by GraphicsViewZoom::gentleZoom(), MainWindow::initToolsToolBar(), zoomByScale(), zoomIn(), and zoomToRect().
|
static |
Definition at line 803 of file vmaingraphicsview.cpp.
References maxSceneSize.
Referenced by GraphicsViewZoom::gentleZoom(), MainWindow::initToolsToolBar(), zoomByScale(), zoomOut(), and zoomToRect().
|
protectedvirtual |
Definition at line 790 of file vmaingraphicsview.cpp.
References qApp.
|
protectedvirtual |
Definition at line 717 of file vmaingraphicsview.cpp.
References endPoint, isPanDragActive, isRubberBandActive, isRubberBandColorSet, m_ptStartPos, qApp, rubberBand, setRubberBandColor(), and startPoint.
|
protectedvirtual |
mousePressEvent handle mouse press events.
event | mouse press event. |
Definition at line 631 of file vmaingraphicsview.cpp.
References isallowRubberBand, isPanDragActive, isRubberBandActive, isZoomPanActive, isZoomToAreaActive, itemClicked(), m_ptStartPos, rubberBand, showToolProperties, startPoint, and VSimpleCurve::Type.
|
signal |
mouseRelease help catch mouse release event.
Usefull when you need show dialog after working with tool visualization.
Referenced by MainWindow::InitScenes(), and mouseReleaseEvent().
|
protectedvirtual |
mouseReleaseEvent handle mouse release events.
event | mouse release event. |
Definition at line 757 of file vmaingraphicsview.cpp.
References endPoint, isPanDragActive, isRubberBandActive, isRubberBandColorSet, mouseRelease(), rubberBand, rubberBandRect, and updateView().
|
static |
NewSceneRect calculate scene rect what contains all items and doesn't less that size of scene view.
sc | scene. |
view | view. |
Definition at line 838 of file vmaingraphicsview.cpp.
References SCASSERT, SceneVisibleArea(), and VMainGraphicsScene::visibleItemsBoundingRect().
Referenced by MainWindow::addDraftBlock(), ShowOperationPointName::Do(), MainWindow::exportDraftBlocksAs(), MainWindow::FullParseFile(), GraphicsViewZoom::gentleZoom(), VPattern::LiteParseTree(), MainWindow::LoadPattern(), MainWindow::New(), VGraphicsSimpleTextItem::paint(), AddGroupItem::redo(), AddGroup::redo(), AddToCalc::redo(), DelGroup::redo(), MoveGroupItem::redo(), MovePiece::redo(), MoveSpline::redo(), MoveSplinePath::redo(), RemoveGroupItem::redo(), VAbstractOperation::setPointNamePosition(), VToolDoublePoint::setPointNamePosition(), VToolSinglePoint::setPointNamePosition(), VNodePoint::setPointNamePosition(), ShowDoublePointName::setVisibility(), VAbstractSpline::ShowToolVisualization(), AddGroupItem::undo(), AddGroup::undo(), AddToCalc::undo(), DelGroup::undo(), MoveGroupItem::undo(), MoveSpline::undo(), MoveSplinePath::undo(), RemoveGroupItem::undo(), updateView(), and MainWindow::zoomFirstShow().
|
slot |
Definition at line 906 of file vmaingraphicsview.cpp.
References GraphicsViewZoom::initScrollAnimations(), and zoom.
Referenced by MainWindow::Preferences().
|
slot |
Definition at line 900 of file vmaingraphicsview.cpp.
References initScrollBars().
Referenced by MainWindow::Preferences().
|
static |
Definition at line 863 of file vmaingraphicsview.cpp.
References SCASSERT.
Referenced by VToolBasePoint::itemChange(), PatternPieceTool::itemChange(), VControlPointSpline::itemChange(), VGraphicsSimpleTextItem::itemChange(), and NewSceneRect().
void VMainGraphicsView::setRubberBandColor | ( | QRubberBand * | band, |
const QColor & | color | ||
) |
Definition at line 618 of file vmaingraphicsview.cpp.
References isRubberBandColorSet.
Referenced by mouseMoveEvent().
void VMainGraphicsView::setShowToolOptions | ( | bool | value | ) |
Definition at line 821 of file vmaingraphicsview.cpp.
References showToolProperties.
|
signal |
Referenced by MainWindow::InitScenes(), and updateView().
|
slot |
Definition at line 576 of file vmaingraphicsview.cpp.
References NewSceneRect(), SCASSERT, VMainGraphicsScene::setCurrentTransform(), and signalZoomScaleChanged().
Referenced by mouseReleaseEvent(), zoom100Percent(), zoomByScale(), zoomIn(), zoomOut(), and zoomToRect().
|
slot |
Definition at line 533 of file vmaingraphicsview.cpp.
References updateView().
Referenced by MainWindow::initToolsToolBar().
|
slot |
Definition at line 497 of file vmaingraphicsview.cpp.
References MaxScale(), MinScale(), and updateView().
Referenced by GroupsWidget::zoomToObject().
|
slot |
Definition at line 509 of file vmaingraphicsview.cpp.
References MaxScale(), and updateView().
Referenced by MainWindow::initToolsToolBar().
|
slot |
Definition at line 521 of file vmaingraphicsview.cpp.
References MinScale(), and updateView().
Referenced by MainWindow::initToolsToolBar().
void VMainGraphicsView::zoomPanEnabled | ( | bool | value | ) |
Definition at line 602 of file vmaingraphicsview.cpp.
References isZoomPanActive, and isZoomToAreaActive.
void VMainGraphicsView::zoomToAreaEnabled | ( | bool | value | ) |
Definition at line 585 of file vmaingraphicsview.cpp.
References curMagnifier, isZoomPanActive, and isZoomToAreaActive.
|
slot |
Definition at line 544 of file vmaingraphicsview.cpp.
References SCASSERT, VMainGraphicsScene::setOriginsVisible(), VMainGraphicsScene::visibleItemsBoundingRect(), and zoomToRect().
Referenced by MainWindow::initToolsToolBar().
|
slot |
Definition at line 555 of file vmaingraphicsview.cpp.
References MaxScale(), MinScale(), and updateView().
Referenced by zoomToFit().
|
protected |
Definition at line 207 of file vmaingraphicsview.h.
Referenced by zoomToAreaEnabled().
|
private |
Definition at line 225 of file vmaingraphicsview.h.
|
private |
Definition at line 223 of file vmaingraphicsview.h.
Referenced by mouseMoveEvent(), and mouseReleaseEvent().
|
private |
Definition at line 214 of file vmaingraphicsview.h.
Referenced by allowRubberBand(), and mousePressEvent().
|
private |
Definition at line 219 of file vmaingraphicsview.h.
Referenced by mouseMoveEvent(), mousePressEvent(), and mouseReleaseEvent().
|
private |
Definition at line 216 of file vmaingraphicsview.h.
Referenced by mouseMoveEvent(), mousePressEvent(), and mouseReleaseEvent().
|
private |
Definition at line 217 of file vmaingraphicsview.h.
Referenced by mouseMoveEvent(), mouseReleaseEvent(), and setRubberBandColor().
|
private |
Definition at line 218 of file vmaingraphicsview.h.
Referenced by mousePressEvent(), zoomPanEnabled(), and zoomToAreaEnabled().
|
private |
Definition at line 215 of file vmaingraphicsview.h.
Referenced by mousePressEvent(), zoomPanEnabled(), and zoomToAreaEnabled().
|
private |
Definition at line 224 of file vmaingraphicsview.h.
Referenced by mouseMoveEvent(), and mousePressEvent().
|
private |
Definition at line 220 of file vmaingraphicsview.h.
Referenced by mouseMoveEvent(), mousePressEvent(), and mouseReleaseEvent().
|
private |
Definition at line 221 of file vmaingraphicsview.h.
Referenced by mouseReleaseEvent().
|
private |
Definition at line 213 of file vmaingraphicsview.h.
Referenced by initScrollBars().
|
private |
Definition at line 212 of file vmaingraphicsview.h.
Referenced by mousePressEvent(), and setShowToolOptions().
|
private |
Definition at line 222 of file vmaingraphicsview.h.
Referenced by mouseMoveEvent(), and mousePressEvent().
|
private |
Definition at line 211 of file vmaingraphicsview.h.
Referenced by resetScrollAnimations().