![]() |
VPTissue Reference Manual
|
QGraphicsView with the ability to pan and zoom. More...
#include <PanAndZoomView.h>


Public Member Functions | |
| PanAndZoomView (double zoomMin=0.07, double zoomMax=100.0, QWidget *parent=nullptr) | |
| Constructor. More... | |
| virtual | ~PanAndZoomView () |
| Destructor. | |
| virtual void | enterEvent (QEvent *event) |
| Overriding enterEvent to grab focus when the view is entered. More... | |
| virtual void | keyPressEvent (QKeyEvent *event) |
| Overriding keyPressEvent to detect when control key is pressed. More... | |
| virtual void | keyReleaseEvent (QKeyEvent *event) |
| Overriding releasePressEvent to detect when control key is released. More... | |
| void | ResetZoom () |
| Resets the view to the normal zoom level. | |
| void | ScaleView (double factor) |
| Scales the view, bounded by the minimum and maximum zooming factor. More... | |
| double | Scaling () |
| Gets the current scaling of the view (assuming the view was only scaled with ScaleView() and the horizontal and vertical scaling are the same) More... | |
| virtual void | wheelEvent (QWheelEvent *event) |
| Overriding wheelEvent to scroll the view when control key is held down. More... | |
QGraphicsView with the ability to pan and zoom.
Definition at line 30 of file PanAndZoomView.h.
| SimShell::Gui::PanAndZoomView::PanAndZoomView | ( | double | zoomMin = 0.07, |
| double | zoomMax = 100.0, |
||
| QWidget * | parent = nullptr |
||
| ) |
Constructor.
| zoomMin | The minimum zooming factor |
| zoomMax | The maximum zooming factor |
| parent | The widget's parent |
Definition at line 32 of file PanAndZoomView.cpp.
|
virtual |
Overriding enterEvent to grab focus when the view is entered.
| event | The key event |
Definition at line 74 of file PanAndZoomView.cpp.
|
virtual |
Overriding keyPressEvent to detect when control key is pressed.
| event | The key event |
Definition at line 57 of file PanAndZoomView.cpp.
|
virtual |
Overriding releasePressEvent to detect when control key is released.
| event | The key event |
Definition at line 65 of file PanAndZoomView.cpp.
| void SimShell::Gui::PanAndZoomView::ScaleView | ( | double | factor | ) |
Scales the view, bounded by the minimum and maximum zooming factor.
| factor | The scaling factor |
Definition at line 43 of file PanAndZoomView.cpp.
Referenced by wheelEvent().

| double SimShell::Gui::PanAndZoomView::Scaling | ( | ) |
Gets the current scaling of the view (assuming the view was only scaled with ScaleView() and the horizontal and vertical scaling are the same)
| double | The scaling factor of the view |
Definition at line 87 of file PanAndZoomView.cpp.
Referenced by SimPT_Editor::TissueGraphicsView::GenerateRegularPattern(), and SimPT_Editor::TissueGraphicsView::GenerateVoronoiPattern().

|
virtual |
Overriding wheelEvent to scroll the view when control key is held down.
| event |
Definition at line 92 of file PanAndZoomView.cpp.
References ScaleView().
