1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 18:35:20 +00:00
OpenMW/apps/opencs/view/render/scenewidget.hpp

78 lines
1.6 KiB
C++
Raw Normal View History

2013-11-02 02:48:30 +01:00
#ifndef OPENCS_VIEW_SCENEWIDGET_H
#define OPENCS_VIEW_SCENEWIDGET_H
#include <QWidget>
namespace Ogre
{
class Camera;
class SceneManager;
class RenderWindow;
}
namespace CSVRender
{
class SceneWidget : public QWidget
{
Q_OBJECT
public:
2013-11-02 02:48:30 +01:00
enum NavigationMode
{
NavigationMode_Free
};
2013-11-02 02:48:30 +01:00
SceneWidget(QWidget *parent);
virtual ~SceneWidget(void);
2013-11-02 02:48:30 +01:00
QPaintEngine* paintEngine() const;
2013-11-02 02:48:30 +01:00
private:
void paintEvent(QPaintEvent* e);
void resizeEvent(QResizeEvent* e);
bool event(QEvent* e);
2014-02-25 13:09:37 +01:00
void keyPressEvent (QKeyEvent *event);
void keyReleaseEvent (QKeyEvent *event);
void focusOutEvent (QFocusEvent *event);
2014-02-25 13:39:49 +01:00
void wheelEvent (QWheelEvent *event);
2014-02-25 14:09:07 +01:00
void leaveEvent (QEvent *event);
void mouseMoveEvent (QMouseEvent *event);
void mouseReleaseEvent (QMouseEvent *event);
void updateOgreWindow();
2013-11-02 02:48:30 +01:00
2014-02-25 14:14:53 +01:00
int getFastFactor() const;
Ogre::Camera* mCamera;
Ogre::SceneManager* mSceneMgr;
Ogre::RenderWindow* mWindow;
NavigationMode mNavigationMode;
2014-02-25 13:09:37 +01:00
bool mUpdate;
int mKeyForward;
int mKeyBackward;
2014-02-25 13:31:15 +01:00
int mKeyLeft;
int mKeyRight;
bool mFast;
2014-02-25 14:09:07 +01:00
bool mDragging;
bool mMod1;
2014-02-25 14:09:07 +01:00
QPoint mOldPos;
2014-02-25 14:14:53 +01:00
int mMouseSensitivity;
int mFastFactor;
2014-02-25 13:09:37 +01:00
private slots:
void update();
};
2013-11-02 02:48:30 +01:00
}
#endif