1/*
2 Copyright (c) 2007 Paolo Capriotti <p.capriotti@gmail.com>
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8*/
9
10#ifndef MESSAGE_H
11#define MESSAGE_H
12
13#include <QGraphicsTextItem>
14#include <KSharedPtr>
15#include "sprite.h"
16
17class Message : public QGraphicsTextItem, public Sprite
18{
19 qreal m_opacity;
20 QPointF m_velocity;
21public:
22 Message(const QString& text, const QFont& font, int maxwidth);
23
24 virtual void setOpacityF(qreal opacity);
25 virtual qreal opacityF() const;
26
27 virtual void setVelocity(const QPointF& vel);
28 virtual QPointF velocity() const;
29
30 virtual void setPosition(const QPointF& pos);
31 virtual QPointF position() const;
32
33 int height() const;
34};
35
36typedef KSharedPtr<Message> MessagePtr;
37
38#endif // MESSAGE_H
39