Commit ceb16a9c authored by Pierre Kraemer's avatar Pierre Kraemer

ajout cb_wheelEvent

parent 4bc17c66
...@@ -291,6 +291,11 @@ public: ...@@ -291,6 +291,11 @@ public:
*/ */
virtual void cb_mouseMove(int button, int x, int y) {} virtual void cb_mouseMove(int button, int x, int y) {}
/**
* the mouse has been move (with button still pressed)
*/
virtual void cb_wheelEvent(int delta, int x, int y) {}
/** /**
* key press CB (context is ok) * key press CB (context is ok)
*/ */
...@@ -365,7 +370,6 @@ public: ...@@ -365,7 +370,6 @@ public:
*/ */
std::string selectFileSave(const std::string& title = "open file", const std::string& dir = ".", const std::string& filters = "all (*.*)"); std::string selectFileSave(const std::string& title = "open file", const std::string& dir = ".", const std::string& filters = "all (*.*)");
public slots: public slots:
virtual void cb_New() { std::cerr << "callback not implemented" << std::endl; } virtual void cb_New() { std::cerr << "callback not implemented" << std::endl; }
virtual void cb_Open() { std::cerr << "callback not implemented" << std::endl; } virtual void cb_Open() { std::cerr << "callback not implemented" << std::endl; }
......
...@@ -241,6 +241,9 @@ void GLWidget::wheelEvent(QWheelEvent* event) ...@@ -241,6 +241,9 @@ void GLWidget::wheelEvent(QWheelEvent* event)
newModel = 1; newModel = 1;
updateGL(); updateGL();
if (m_cbs)
m_cbs->cb_wheelEvent(event->delta(), event->x(), getHeight() - event->y());
} }
void GLWidget::keyPressEvent(QKeyEvent* event) void GLWidget::keyPressEvent(QKeyEvent* event)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment