Standard 2D/3D view interaction.
|
|
| InteractionView3D (ImageView3D &view) |
| |
| void | reset () override |
| |
| void | contextMenuCreate (QMenu &m) override |
| | Create context menu entries.
|
| |
| void | contextMenuEvaluate (QAction *a) override |
| | Evaluate action chosen in context menu.
|
| |
| void | createActions () override |
| | Create actions shown in context menu.
|
| |
|
void | setSceneCenter (const vec3 ¢er) |
| | Set scene center.
|
| |
|
const vec3 & | sceneCenter () const |
| | Get scene center.
|
| |
| bool | sceneEvent (QEvent *event) override |
| | Modify the view parameters based on the mouse events.
|
| |
|
bool | sceneEventTouch (QEvent *event) |
| | Modify the view parameters based on the touchscreen events.
|
| |
|
mat4 | transformation () const |
| | Current transformation.
|
| |
|
void | setInteractionLodMode (GlVolumeView::LodMode lodMode) |
| |
|
void | setInteractionLodSizeThresholdMb (int lodVolumeSizeThresholdMb) |
| |
|
void | setOrientToNormalOnClick (bool orientOnClick) |
| | If true, the slices will be oriented to the surface normal on double click.
|
| |
| | ViewInteraction (InteractiveView &view) |
| | Instantiate a new ViewInteraction that contains already basic actions for the view.
|
| |
| void | contextMenuCreate (QMenu &m) override |
| | Create context menu entries.
|
| |
|
virtual void | setViewActionMap (ViewActionMap *m) |
| | Sets the action mapping of this view. If nullptr, will default to the global one.
|
| |
|
virtual ViewActionMap * | viewActionMap () |
| | Returns the local view action map for this view interaction, if any has been set.
|
| |
| void | setMouseActionSpeed (ViewActionType action, double speed) |
| | Setters for the speed of a mouse (touch) action.
|
| |
|
void | setTouchActionSpeed (ViewActionType action, double speed) |
| |
|
double | mouseActionSpeed (ViewActionType action) const |
| | Getters for the speed of a mouse (touch) action, return the default value if the action is not found in the map.
|
| |
|
double | touchActionSpeed (ViewActionType action) const |
| |
|
bool | matchMappedActions (ViewActionType viewAction, Qt::MouseButton button, Qt::KeyboardModifiers modifiers) const |
| | Returns true if the MouseAction defined by button and modifiers is registered for the viewAction.
|
| |
| virtual void | createCustomViewActionMap () |
| | Must be used to override the global view action mapper This method can be overridden in order to define a custom default mapping between view actions and user mouse events Example code for the overridden method:
|
| |
|
virtual void | openContextMenu (QPoint pos, QPoint globalPos, Qt::KeyboardModifiers modifiers) |
| |
|
void | setUseContextMenu (bool use) |
| | Set if the context menu must be created or not.
|
| |
|
bool | useContextMenu () const |
| | Specifies if the view creates context menu entries or not. Default value is false.
|
| |
|
| SignalReceiver ()=default |
| | Default constructor.
|
| |
|
| SignalReceiver (const SignalReceiver &other) |
| | Copy constructor, does not copy any existing signal connections from other.
|
| |
|
SignalReceiver & | operator= (SignalReceiver rhs) |
| | Assignment operator, disconnects all existing connections, does not copy any existing signal connections from rhs.
|
| |
|
virtual | ~SignalReceiver () |
| | Virtual destructor disconnects from all connected signals.
|
| |
|
|
bool | changePose (QMouseEvent *event, const vec2 &mouseDistance) |
| |
|
void | addTranslation (double dx, double dy, double dz=0.0) |
| | Adds dx, dy, and dz to the current translation matrix (since the last mouse press event)
|
| |
|
void | applyIncrementalTransform () |
| | Applies the current transformation from m_translation and m_rotation to m_matrix0 Sets m_translation and m_rotation to zero.
|
| |
|
void | handleKeyboardShortcut (int eventId) |
| |
|
virtual void | keyPressEvent (QKeyEvent *event) |
| | Triggers actions if the pressed key sequence matches their shortcut.
|
| |
| void | createActions () override |
| | Creates actions shown in context menu.
|
| |
|
void | disconnectAll () |
| | Disconnects all existing connections.
|
| |
|
|
ImageView3D & | m_imageView3D |
| |
|
vec2i | m_mouseDownPosition |
| |
|
int | m_mouseDownButton |
| |
|
mat4 | m_mouseDownMatrix |
| |
|
vec2 | m_mouseDownWindowLevel |
| |
|
double | m_mouseDownAlpha |
| |
|
bool | m_dragging |
| |
|
bool | m_rotateZ |
| |
|
double | m_rotateZFactor |
| |
|
int | m_rotateZAxis |
| |
|
Camera | m_referenceCam |
| | View camera on mouse press.
|
| |
|
vec3 | m_sceneCenter |
| |
|
vec3 | m_translation |
| | Current translation parameters since the last mouse press event.
|
| |
|
vec3 | m_rotation |
| | Current rotation parameters since the last mouse press event.
|
| |
|
GlVolumeView::LodMode | m_lodMode |
| |
|
int | m_lodVolumeSizeThresholdMb |
| |
|
bool | m_orientToNormalOnClick |
| |
|
bool | m_simultaneousBlending |
| |
|
bool | m_isTouch |
| |
|
int | m_oldDistance |
| | Indicates that we are generally in a touch gesture right now.
|
| |
|
QPointF | m_oldPoint |
| | Indicates the cached distance between 2 former touchpoints.
|
| |
|
QPointF | m_oldCenterPoint |
| | Indicates the cached point of a single touch.
|
| |
|
QLineF | m_oldAngleReferenceLine |
| | Indicates the cached center between 2 former touchpoints.
|
| |
|
InteractiveView & | m_view |
| |
| ViewActionMap * | m_viewActionMap |
| | Custom mapping for this specific view. This will override the global mapping if is not nullptr.
|
| |
|
QMap< QString, QAction * > | m_actions |
| | Actions used in the context menu.
|
| |
|
bool | m_useContextMenu = false |
| | Default value is false.
|
| |
|
| static bool | addMappedViewAction (ViewActionType viewAction, Qt::MouseButton button, Qt::KeyboardModifiers modifiers) |
| |
|
static bool | removeMappedViewAction (ViewActionType viewAction, Qt::MouseButton button, Qt::KeyboardModifiers modifiers) |
| | Removes mapping from viewAction to MouseAction defined by button and modifiers Returns true if removing succeeds, or false if this mapping does not exists.
|
| |
|
static void | resetActionMapping () |
| | Loads the default view interaction mapping.
|
| |
|
static const ViewActionMap & | globalViewActionMap () |
| | Const access to the global view action mapper.
|
| |
|
static void | setGlobalViewActionMap (const ViewActionMap &map) |
| | Sets the global view action map.
|
| |
|
static bool | hasConflicts (const ViewActionMap &actionMap, std::vector< std::pair< ViewActionType, ViewActionType > > &conflictingActions) |
| | Checks if the mapping defined in actionMap has any conflicts.
|
| |
|
static const std::unordered_map< ViewActionType, QString > | viewActionsName |
| |
|
static const std::unordered_map< Qt::MouseButton, QString > | mouseButtonsName |
| |
|
void | contextMenuEvaluate (QAction *action) override |
| | Evaluate action chosen in context menu or by shortcut.
|
| |
|
static ViewActionMap | viewActionMapGlobal |
| | Global mapping between view actions and user mouse events (only mouse and keyboard modifiers now, touch and gestures must be supported too)
|
| |