EnhancedGraphicsView Class Reference

The EnhancedGraphicsView is a QGraphicsView with some additional functions. More...

#include <ArmarXGui/libraries/ArmarXGuiBase/widgets/EnhancedGraphicsView.h>

+ Inheritance diagram for EnhancedGraphicsView:

Public Slots

void setAllVisible (bool visible)
 
void setDraggingDisabled (bool disabled=true)
 
void setDraggingEnabled (bool enabled=true)
 
void setDraggingKeyboardModifier (Qt::KeyboardModifier mod)
 
void setDraggingMouseButton (Qt::MouseButton button)
 
void setRotationDisabled (bool disabled=true)
 
void setRotationEnabled (bool enabled=true)
 
void setRotationFactor (qreal factor)
 
void setRotationKeyboardModifier (Qt::KeyboardModifier mod)
 
void setZoomDisabled (bool disabled=true)
 
void setZoomEnabled (bool enabled=true)
 
void setZoomFactor (qreal factor)
 
void setZoomKeyboardModifier (Qt::KeyboardModifier mod)
 

Public Member Functions

Qt::KeyboardModifier getDraggingKeyboardModifier () const
 
Qt::MouseButton getDraggingMouseButton () const
 
qreal getRotationFactor () const
 
Qt::KeyboardModifier getRotationKeyboardModifier () const
 
qreal getZoomFactor () const
 
Qt::KeyboardModifier getZoomKeyboardModifier () const
 
qreal setZoomFactor ()
 

Protected Member Functions

void mouseMoveEvent (QMouseEvent *e) override
 
void mousePressEvent (QMouseEvent *e) override
 
void wheelEvent (QWheelEvent *e) override
 

Protected Attributes

Qt::MouseButton draggingButton {Qt::LeftButton}
 
bool draggingEnabled {true}
 
Qt::KeyboardModifier draggingModifier {Qt::ControlModifier}
 
QPointF draggingStartPosition
 
bool rotationEnabled {true}
 
qreal rotationFactor {0.01}
 
Qt::KeyboardModifier rotationModifier {Qt::ShiftModifier}
 
bool zoomEnabled {true}
 
qreal zoomFacor {1.05}
 
Qt::KeyboardModifier zoomModifier {Qt::ControlModifier}
 

Detailed Description

The EnhancedGraphicsView is a QGraphicsView with some additional functions.

Additional functions are:

  • Zooming (default ctrl+scroll)
  • Roatating (default shift+scroll)
  • Dragging the scene (default ctrl+left click+dragging)

Definition at line 41 of file EnhancedGraphicsView.h.

Member Function Documentation

◆ getDraggingKeyboardModifier()

Qt::KeyboardModifier getDraggingKeyboardModifier ( ) const

Definition at line 49 of file EnhancedGraphicsView.cpp.

◆ getDraggingMouseButton()

Qt::MouseButton getDraggingMouseButton ( ) const

Definition at line 54 of file EnhancedGraphicsView.cpp.

◆ getRotationFactor()

qreal getRotationFactor ( ) const

Definition at line 34 of file EnhancedGraphicsView.cpp.

◆ getRotationKeyboardModifier()

Qt::KeyboardModifier getRotationKeyboardModifier ( ) const

Definition at line 29 of file EnhancedGraphicsView.cpp.

◆ getZoomFactor()

qreal getZoomFactor ( ) const

Definition at line 44 of file EnhancedGraphicsView.cpp.

◆ getZoomKeyboardModifier()

Qt::KeyboardModifier getZoomKeyboardModifier ( ) const

Definition at line 39 of file EnhancedGraphicsView.cpp.

◆ mouseMoveEvent()

void mouseMoveEvent ( QMouseEvent *  e)
overrideprotected

Definition at line 133 of file EnhancedGraphicsView.cpp.

◆ mousePressEvent()

void mousePressEvent ( QMouseEvent *  e)
overrideprotected

Definition at line 127 of file EnhancedGraphicsView.cpp.

◆ setAllVisible

void setAllVisible ( bool  visible)
slot

Definition at line 119 of file EnhancedGraphicsView.cpp.

◆ setDraggingDisabled

void setDraggingDisabled ( bool  disabled = true)
slot

Definition at line 104 of file EnhancedGraphicsView.cpp.

◆ setDraggingEnabled

void setDraggingEnabled ( bool  enabled = true)
slot

Definition at line 99 of file EnhancedGraphicsView.cpp.

◆ setDraggingKeyboardModifier

void setDraggingKeyboardModifier ( Qt::KeyboardModifier  mod)
slot

Definition at line 109 of file EnhancedGraphicsView.cpp.

◆ setDraggingMouseButton

void setDraggingMouseButton ( Qt::MouseButton  button)
slot

Definition at line 114 of file EnhancedGraphicsView.cpp.

◆ setRotationDisabled

void setRotationDisabled ( bool  disabled = true)
slot

Definition at line 64 of file EnhancedGraphicsView.cpp.

◆ setRotationEnabled

void setRotationEnabled ( bool  enabled = true)
slot

Definition at line 59 of file EnhancedGraphicsView.cpp.

◆ setRotationFactor

void setRotationFactor ( qreal  factor)
slot

Definition at line 74 of file EnhancedGraphicsView.cpp.

◆ setRotationKeyboardModifier

void setRotationKeyboardModifier ( Qt::KeyboardModifier  mod)
slot

Definition at line 69 of file EnhancedGraphicsView.cpp.

◆ setZoomDisabled

void setZoomDisabled ( bool  disabled = true)
slot

Definition at line 84 of file EnhancedGraphicsView.cpp.

◆ setZoomEnabled

void setZoomEnabled ( bool  enabled = true)
slot

Definition at line 79 of file EnhancedGraphicsView.cpp.

◆ setZoomFactor() [1/2]

qreal setZoomFactor ( )

◆ setZoomFactor [2/2]

void setZoomFactor ( qreal  factor)
slot

Definition at line 94 of file EnhancedGraphicsView.cpp.

◆ setZoomKeyboardModifier

void setZoomKeyboardModifier ( Qt::KeyboardModifier  mod)
slot

Definition at line 89 of file EnhancedGraphicsView.cpp.

◆ wheelEvent()

void wheelEvent ( QWheelEvent *  e)
overrideprotected

Definition at line 154 of file EnhancedGraphicsView.cpp.

Member Data Documentation

◆ draggingButton

Qt::MouseButton draggingButton {Qt::LeftButton}
protected

Definition at line 89 of file EnhancedGraphicsView.h.

◆ draggingEnabled

bool draggingEnabled {true}
protected

Definition at line 87 of file EnhancedGraphicsView.h.

◆ draggingModifier

Qt::KeyboardModifier draggingModifier {Qt::ControlModifier}
protected

Definition at line 88 of file EnhancedGraphicsView.h.

◆ draggingStartPosition

QPointF draggingStartPosition
protected

Definition at line 90 of file EnhancedGraphicsView.h.

◆ rotationEnabled

bool rotationEnabled {true}
protected

Definition at line 79 of file EnhancedGraphicsView.h.

◆ rotationFactor

qreal rotationFactor {0.01}
protected

Definition at line 81 of file EnhancedGraphicsView.h.

◆ rotationModifier

Qt::KeyboardModifier rotationModifier {Qt::ShiftModifier}
protected

Definition at line 80 of file EnhancedGraphicsView.h.

◆ zoomEnabled

bool zoomEnabled {true}
protected

Definition at line 83 of file EnhancedGraphicsView.h.

◆ zoomFacor

qreal zoomFacor {1.05}
protected

Definition at line 85 of file EnhancedGraphicsView.h.

◆ zoomModifier

Qt::KeyboardModifier zoomModifier {Qt::ControlModifier}
protected

Definition at line 84 of file EnhancedGraphicsView.h.


The documentation for this class was generated from the following files: