Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

47 lines (37 sloc) 0.734 kb
/**
* Bajo la licencia GPL-3 ó superior.
*
* Copyright (C) 2008 Rafael Fernández López
*/
#ifndef SURFACE_H
#define SURFACE_H
#include <QtCore/QTimer>
#include <QtGui/QGraphicsScene>
class Surface
: public QGraphicsScene
{
public:
Surface(QObject *parent = 0)
: QGraphicsScene(parent)
, m_friction(0.99)
{
QTimer *timer = new QTimer(this);
timer->setInterval(10);
connect(timer, SIGNAL(timeout()), this, SLOT(advance()));
timer->start();
}
~Surface()
{
}
void setFriction(float friction)
{
m_friction = friction;
}
float friction() const
{
return m_friction;
}
private:
float m_friction;
};
#endif
Jump to Line
Something went wrong with that request. Please try again.