File indexing completed on 2022-11-29 18:40:36

0001 /*
0002     SPDX-FileCopyrightText: 2007 Paolo Capriotti <p.capriotti@gmail.com>
0003     SPDX-FileCopyrightText: 2010 Brian Croom <brian.s.croom@gmail.com>
0004 
0005     SPDX-License-Identifier: GPL-2.0-or-later
0006 */
0007 
0008 #ifndef BALL_H
0009 #define BALL_H
0010 
0011 #include <KGameRenderedItem>
0012 #include <QPointF>
0013 #include "sprite.h"
0014 
0015 class KGameRenderer;
0016 
0017 class Ball : public KGameRenderedItem, public Sprite
0018 {
0019 public:
0020     Ball(KGameRenderer* renderer, const QString& id, int size);
0021 
0022     void setOpacityF(qreal opacity) override;
0023     qreal opacityF() const override;
0024 
0025     void setVelocity(const QPointF& vel) override;
0026     QPointF velocity() const override;
0027     
0028     void setPosition(const QPointF& pos) override;
0029     QPointF position() const override;
0030     
0031     qreal radius() const;
0032 private:
0033     QPointF m_velocity;
0034 };
0035 
0036 #endif // BALL_H
0037