paysages3d/src/interface/modeler/quickapp/OpenGLView.h

49 lines
1 KiB
C
Raw Normal View History

#ifndef OPENGLVIEW_H
#define OPENGLVIEW_H
#include "modeler_global.h"
#include <QQuickItem>
namespace paysages {
namespace modeler {
class OpenGLView : public QQuickItem
{
Q_OBJECT
public:
explicit OpenGLView(QQuickItem *parent = 0);
public slots:
void handleWindowChanged(QQuickWindow *win);
void paint();
void handleResize();
2014-08-27 16:19:48 +00:00
protected:
2014-09-26 15:46:39 +00:00
virtual void wheelEvent(QWheelEvent *event) override;
virtual void mousePressEvent(QMouseEvent *event) override;
virtual void mouseReleaseEvent(QMouseEvent *event) override;
virtual void mouseMoveEvent(QMouseEvent *event) override;
virtual void hoverMoveEvent(QHoverEvent *event) override;
2014-08-27 16:19:48 +00:00
virtual void timerEvent(QTimerEvent *event) override;
2015-07-22 19:30:56 +00:00
private:
bool acceptInputs() const;
2015-07-22 19:30:56 +00:00
double getSpeedFactor(QInputEvent *event);
private:
2015-09-14 17:25:54 +00:00
int delayed;
bool initialized;
bool resized;
2014-08-28 08:29:12 +00:00
MainModelerWindow *window;
OpenGLRenderer *renderer;
2014-09-26 15:46:39 +00:00
Qt::MouseButton mouse_button;
QPointF mouse_pos;
};
}
}
#endif // OPENGLVIEW_H