ganeswidgets/inc/hgspring.h
branchGCC_SURGE
changeset 10 c348b9772569
parent 5 4fa04caf0f43
child 11 42505cd701c6
equal deleted inserted replaced
4:463f1934e292 10:c348b9772569
    16 */
    16 */
    17 
    17 
    18 #ifndef HGSPRING_H
    18 #ifndef HGSPRING_H
    19 #define HGSPRING_H
    19 #define HGSPRING_H
    20 
    20 
    21 #include <qpoint>
    21 #include <QPoint>
    22 #include <qobject>
    22 #include <QObject>
    23 #include <qtime>
    23 #include <QTime>
    24 
    24 
    25 class QTimer;
    25 class QTimer;
    26 
    26 
    27 /**
    27 /**
    28  * Spring physics class.
    28  * Spring physics class.
    40     
    40     
    41     void animateToPos(const QPointF& pos);
    41     void animateToPos(const QPointF& pos);
    42     void gotoPos(const QPointF& pos);
    42     void gotoPos(const QPointF& pos);
    43     void cancel();
    43     void cancel();
    44     bool isActive() const;
    44     bool isActive() const;
       
    45     void resetVelocity();
    45 
    46 
    46     const QPointF& startPos() const;
    47     const QPointF& startPos() const;
    47     const QPointF& pos() const;
    48     const QPointF& pos() const;
    48     const QPointF& endPos() const;    
    49     const QPointF& endPos() const;    
    49     const QPointF& velocity() const;
    50     const QPointF& velocity() const;