Updated Qt frontend to latest Scroll interface

This commit is contained in:
Xawotihs@gmail.com
2012-01-29 22:34:55 +00:00
parent 4db47dcbd6
commit 28be95b401
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -73,7 +73,7 @@ public:
return g_startTimer.elapsed(); return g_startTimer.elapsed();
}; };
Q_INVOKABLE void doScroll(int x, int y, int magnitude) { Q_INVOKABLE void doScroll(int x, int y, int magnitude) {
m_engine->Scroll(x, y, magnitude); m_engine->Scroll(x, y);
}; };
int getNominalHeight(){ return SCREEN_HEIGHT;}; int getNominalHeight(){ return SCREEN_HEIGHT;};
int getNominalWidth(){ return SCREEN_WIDTH;}; int getNominalWidth(){ return SCREEN_WIDTH;};
+2 -2
View File
@@ -333,10 +333,10 @@ void WagicCore::wheelEvent ( QGraphicsSceneWheelEvent * event)
#endif #endif
{ {
if(event->orientation() == Qt::Vertical) if(event->orientation() == Qt::Vertical)
m_engine->Scroll(0, 3*event->delta(), static_cast<int>(sqrt(9*event->delta()*event->delta()))); m_engine->Scroll(0, 3*event->delta());
else else
m_engine->Scroll(3*event->delta(), 0, static_cast<int>(sqrt(9*event->delta()*event->delta()))); m_engine->Scroll(3*event->delta(), 0);
event->accept(); event->accept();
} }