Loading...
Searching...
No Matches
interactionModeManager.h
Go to the documentation of this file.
#ifndef BALL_VIEW_KERNEL_MODES_MODEMANAGER_H
#define BALL_VIEW_KERNEL_MODES_MODEMANAGER_H
#ifndef BALL_VIEW_RENDERING_RENDERERS_RENDERER_H
#include <BALL/VIEW/RENDERING/RENDERERS/renderer.h>
#endif
#include <list>
#include <QtCore/QObject>
class QAction;
class QMenu;
class QActionGroup;
class QKeyEvent;
class QMouseEvent;
class QWheelEvent;
class QToolBar;
namespace BALL
{
namespace VIEW
{
class InteractionMode;
class Scene;
class InteractionModeManager : public QObject
{
Q_OBJECT
public:
InteractionModeManager(Scene* scene);
virtual ~InteractionModeManager();
QString getCurrentModeName() const;
virtual void keyPressEvent(QKeyEvent* evt);
virtual void keyReleaseEvent(QKeyEvent* evt);
virtual void mouseDoubleClickEvent(QMouseEvent* evt);
virtual void mouseMoveEvent(QMouseEvent* evt);
virtual void mousePressEvent(QMouseEvent* evt);
virtual void mouseReleaseEvent(QMouseEvent* evt);
virtual void wheelEvent(QWheelEvent* evt);
virtual void addToolBarEntries(QToolBar* tb);
virtual void populateContextMenu(QMenu* menu);
void setStereoMode(bool stereo_mode);
virtual void setMouseSensitivity(float sensitivity);
virtual void setMouseWheelSensitivity(float sensitivity);
void switchToLastMode();
protected Q_SLOTS:
void setMode_(InteractionMode* new_mode);
protected:
Renderer::StereoMode stereo_mode_;
InteractionMode* current_mode_;
InteractionMode* last_mode_;
QActionGroup* actions_;
std::list<InteractionMode*> modes_;
Scene* scene_;
bool need_update_;
void init_();
bool handleStereoKeyPress_(QKeyEvent* evt);
};
}
}
#endif //BALL_VIEW_KERNEL_MODES_MODEMANAGER_H
BALL::VIEW::InteractionModeManager::addToolBarEntries
virtual void addToolBarEntries(QToolBar *tb)
BALL::VIEW::InteractionModeManager::switchToLastMode
void switchToLastMode()
BALL::VIEW::InteractionModeManager::mouseMoveEvent
virtual void mouseMoveEvent(QMouseEvent *evt)
BALL::VIEW::InteractionModeManager::handleStereoKeyPress_
bool handleStereoKeyPress_(QKeyEvent *evt)
BALL::VIEW::InteractionModeManager::getCurrentModeName
QString getCurrentModeName() const
BALL::VIEW::InteractionModeManager::setMode_
void setMode_(InteractionMode *new_mode)
BALL::VIEW::InteractionModeManager::setMouseWheelSensitivity
virtual void setMouseWheelSensitivity(float sensitivity)
BALL::VIEW::InteractionModeManager::init_
void init_()
BALL::VIEW::InteractionModeManager::setMouseSensitivity
virtual void setMouseSensitivity(float sensitivity)
BALL::VIEW::InteractionModeManager::populateContextMenu
virtual void populateContextMenu(QMenu *menu)
BALL::VIEW::InteractionModeManager::InteractionModeManager
InteractionModeManager(Scene *scene)
BALL::VIEW::InteractionModeManager::setStereoMode
void setStereoMode(bool stereo_mode)
BALL::VIEW::InteractionModeManager::mouseReleaseEvent
virtual void mouseReleaseEvent(QMouseEvent *evt)
BALL::VIEW::InteractionModeManager::actions_
QActionGroup * actions_
Definition interactionModeManager.h:63
BALL::VIEW::InteractionModeManager::keyPressEvent
virtual void keyPressEvent(QKeyEvent *evt)
BALL::VIEW::InteractionModeManager::mouseDoubleClickEvent
virtual void mouseDoubleClickEvent(QMouseEvent *evt)
BALL::VIEW::InteractionModeManager::last_mode_
InteractionMode * last_mode_
Definition interactionModeManager.h:62
BALL::VIEW::InteractionModeManager::~InteractionModeManager
virtual ~InteractionModeManager()
BALL::VIEW::InteractionModeManager::modes_
std::list< InteractionMode * > modes_
Definition interactionModeManager.h:64
BALL::VIEW::InteractionModeManager::keyReleaseEvent
virtual void keyReleaseEvent(QKeyEvent *evt)
BALL::VIEW::InteractionModeManager::scene_
Scene * scene_
Definition interactionModeManager.h:65
BALL::VIEW::InteractionModeManager::stereo_mode_
Renderer::StereoMode stereo_mode_
Definition interactionModeManager.h:60
BALL::VIEW::InteractionModeManager::wheelEvent
virtual void wheelEvent(QWheelEvent *evt)
BALL::VIEW::InteractionModeManager::current_mode_
InteractionMode * current_mode_
Definition interactionModeManager.h:61
BALL::VIEW::InteractionModeManager::need_update_
bool need_update_
Definition interactionModeManager.h:66
BALL::VIEW::InteractionModeManager::mousePressEvent
virtual void mousePressEvent(QMouseEvent *evt)
BALL::VIEW::InteractionMode
Definition interactionMode.h:25
BALL::VIEW::Renderer::StereoMode
StereoMode
Definition renderer.h:60
BALL::VIEW::Scene
Definition scene.h:141
QMouseEvent
QObject
BALL::VIEW
Definition constraints.h:35
BALL
Definition constants.h:13
renderer.h