RGraphicsViewQt
Class in GUI Module
Header: #include <src/gui/RGraphicsViewQt.h>
Inherits: QWidget
Description
Section titled “Description”QWidget based 2d graphics view.
This graphics view displays a rectangular area of a RGraphicsSceneQt.
Scriptable: This class is available in script environments.
\generateScriptShell
Public Functions
Section titled “Public Functions”RGraphicsViewQt(QWidget *parent=NULL, bool showFocus=true) |
|
| virtual | ~RGraphicsViewQt() |
| void | disableGestures() |
| virtual int | getHeight() const |
| RGraphicsViewImage * | getImageView() const |
| virtual QRect | getRect() const |
| virtual bool | getSignalsBlocked() const |
| virtual int | getWidth() const |
| virtual void | removeFocus() |
| void | setFocusFrameWidget(QFrame *w) |
| void | setImageView(RGraphicsViewImage *v) |
| virtual void | setSignalsBlocked(bool on) |
| virtual void | simulateMouseMoveEvent() |
| virtual QSize | sizeHint() const |
Protected Functions
Section titled “Protected Functions”| virtual void | dragEnterEvent(QDragEnterEvent *event) |
| virtual void | dropEvent(QDropEvent *event) |
| bool | event(QEvent *e)Handle terminate events and gestures. |
| virtual void | focusInEvent(QFocusEvent *event)Called when this view gets the focus. |
| virtual bool | focusNextPrevChild(bool next)Tab / Shift+Tab with focus in the graphics view: moves the keyboard focus to the first / last widget of the options tool bar if there is one (RMainWindowQt::handleTabKey). |
| virtual void | focusOutEvent(QFocusEvent *event)Called when this view lost the focus. |
| bool | gestureEvent(QGestureEvent *event)Handle gesture events. |
| virtual void | keyPressEvent(QKeyEvent *event) |
| virtual void | keyReleaseEvent(QKeyEvent *event) |
| virtual void | mouseDoubleClickEvent(QMouseEvent *event) |
| virtual void | mouseMoveEvent(QMouseEvent *event)Relays the Qt mouse event to the scene. |
| virtual void | mousePressEvent(QMouseEvent *event) |
| virtual void | mouseReleaseEvent(QMouseEvent *event) |
| virtual void | paintEvent(QPaintEvent *)Repaints the view. |
| virtual void | resizeEvent(QResizeEvent *event) |
| virtual void | tabletEvent(QTabletEvent *event) |
| virtual void | wheelEvent(QWheelEvent *event) |
Private Attributes
Section titled “Private Attributes”| QFrame * | focusFrameWidget |
| bool | gesturesEnabled |
| bool | gotMouseButtonPress |
| RGraphicsViewImage * | imageView |
| Qt::MouseButtons | lastButtonState remember last mouse button state for wacom bug workaround |
| QElapsedTimer | mouseClickTimer |
| RVector | mousePressModelPosition |
| RVector | mousePressScreenPosition |
| bool | showFocus |
Private Slots
Section titled “Private Slots”| void | imageViewDeleted() |
Signals
Section titled “Signals”| void | dragEnter(QDragEnterEvent *event) |
| void | drop(QDropEvent *event) |
Member Documentation
Section titled “Member Documentation”RGraphicsViewQt
Section titled “RGraphicsViewQt”RGraphicsViewQt::RGraphicsViewQt(QWidget *parent=NULL, bool showFocus=true)~RGraphicsViewQt
Section titled “~RGraphicsViewQt”virtual RGraphicsViewQt::~RGraphicsViewQt()virtual
disableGestures
Section titled “disableGestures”void RGraphicsViewQt::disableGestures()inline
getHeight
Section titled “getHeight”virtual int RGraphicsViewQt::getHeight() constvirtual const
getImageView
Section titled “getImageView”RGraphicsViewImage * RGraphicsViewQt::getImageView() constinline const
getRect
Section titled “getRect”virtual QRect RGraphicsViewQt::getRect() constvirtual const
getSignalsBlocked
Section titled “getSignalsBlocked”virtual bool RGraphicsViewQt::getSignalsBlocked() constvirtual const
getWidth
Section titled “getWidth”virtual int RGraphicsViewQt::getWidth() constvirtual const
removeFocus
Section titled “removeFocus”virtual void RGraphicsViewQt::removeFocus()virtual
setFocusFrameWidget
Section titled “setFocusFrameWidget”void RGraphicsViewQt::setFocusFrameWidget(QFrame *w)setImageView
Section titled “setImageView”void RGraphicsViewQt::setImageView(RGraphicsViewImage *v)setSignalsBlocked
Section titled “setSignalsBlocked”virtual void RGraphicsViewQt::setSignalsBlocked(bool on)virtual
simulateMouseMoveEvent
Section titled “simulateMouseMoveEvent”virtual void RGraphicsViewQt::simulateMouseMoveEvent()virtual
sizeHint
Section titled “sizeHint”virtual QSize RGraphicsViewQt::sizeHint() constvirtual const
dragEnterEvent
Section titled “dragEnterEvent”virtual void RGraphicsViewQt::dragEnterEvent(QDragEnterEvent *event)virtual protected
dropEvent
Section titled “dropEvent”virtual void RGraphicsViewQt::dropEvent(QDropEvent *event)virtual protected
bool RGraphicsViewQt::event(QEvent *e)protected
Handle terminate events and gestures.
focusInEvent
Section titled “focusInEvent”virtual void RGraphicsViewQt::focusInEvent(QFocusEvent *event)virtual protected
Called when this view gets the focus.
Highlights the view to show to the user that events go to this view.
focusNextPrevChild
Section titled “focusNextPrevChild”virtual bool RGraphicsViewQt::focusNextPrevChild(bool next)virtual protected
Tab / Shift+Tab with focus in the graphics view: moves the keyboard focus to the first / last widget of the options tool bar if there is one (RMainWindowQt::handleTabKey).
Otherwise, the focus continues to the next / previous widget of the main window. Without this, the focus would get stuck in the graphics view, since QMdiArea only cycles through its sub windows (keyboard / screen reader navigation).
focusOutEvent
Section titled “focusOutEvent”virtual void RGraphicsViewQt::focusOutEvent(QFocusEvent *event)virtual protected
Called when this view lost the focus.
Resets the focus highlighting.
gestureEvent
Section titled “gestureEvent”bool RGraphicsViewQt::gestureEvent(QGestureEvent *event)protected
Handle gesture events.
keyPressEvent
Section titled “keyPressEvent”virtual void RGraphicsViewQt::keyPressEvent(QKeyEvent *event)virtual protected
keyReleaseEvent
Section titled “keyReleaseEvent”virtual void RGraphicsViewQt::keyReleaseEvent(QKeyEvent *event)virtual protected
mouseDoubleClickEvent
Section titled “mouseDoubleClickEvent”virtual void RGraphicsViewQt::mouseDoubleClickEvent(QMouseEvent *event)virtual protected
mouseMoveEvent
Section titled “mouseMoveEvent”virtual void RGraphicsViewQt::mouseMoveEvent(QMouseEvent *event)virtual protected
Relays the Qt mouse event to the scene.
mousePressEvent
Section titled “mousePressEvent”virtual void RGraphicsViewQt::mousePressEvent(QMouseEvent *event)virtual protected
mouseReleaseEvent
Section titled “mouseReleaseEvent”virtual void RGraphicsViewQt::mouseReleaseEvent(QMouseEvent *event)virtual protected
paintEvent
Section titled “paintEvent”virtual void RGraphicsViewQt::paintEvent(QPaintEvent *)virtual protected
Repaints the view.
If the view has been invalidated before, the view is redrawn from scratch. Otherwise, only a cached buffer is drawn (very fast).
See also: invalidate
resizeEvent
Section titled “resizeEvent”virtual void RGraphicsViewQt::resizeEvent(QResizeEvent *event)virtual protected
tabletEvent
Section titled “tabletEvent”virtual void RGraphicsViewQt::tabletEvent(QTabletEvent *event)virtual protected
wheelEvent
Section titled “wheelEvent”virtual void RGraphicsViewQt::wheelEvent(QWheelEvent *event)virtual protected
focusFrameWidget
Section titled “focusFrameWidget”QFrame* RGraphicsViewQt::focusFrameWidgetprivate
gesturesEnabled
Section titled “gesturesEnabled”bool RGraphicsViewQt::gesturesEnabledprivate
gotMouseButtonPress
Section titled “gotMouseButtonPress”bool RGraphicsViewQt::gotMouseButtonPressprivate
imageView
Section titled “imageView”RGraphicsViewImage* RGraphicsViewQt::imageViewprivate
lastButtonState
Section titled “lastButtonState”Qt::MouseButtons RGraphicsViewQt::lastButtonStateprivate
remember last mouse button state for wacom bug workaround
mouseClickTimer
Section titled “mouseClickTimer”QElapsedTimer RGraphicsViewQt::mouseClickTimerprivate
mousePressModelPosition
Section titled “mousePressModelPosition”RVector RGraphicsViewQt::mousePressModelPositionprivate
mousePressScreenPosition
Section titled “mousePressScreenPosition”RVector RGraphicsViewQt::mousePressScreenPositionprivate
showFocus
Section titled “showFocus”bool RGraphicsViewQt::showFocusprivate
imageViewDeleted
Section titled “imageViewDeleted”void RGraphicsViewQt::imageViewDeleted()private
dragEnter
Section titled “dragEnter”void RGraphicsViewQt::dragEnter(QDragEnterEvent *event)void RGraphicsViewQt::drop(QDropEvent *event)