1 /* This file is part of KsirK.
2    Copyright (C) 2008 Gael de Chalendar <kleag@free.fr>
3 
4    KsirK is free software; you can redistribute it and/or
5    modify it under the terms of the GNU General Public
6    License as published by the Free Software Foundation, either version 2
7    of the License, or (at your option) any later version.
8 
9    This program is distributed in the hope that it will be useful,
10    but WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12    General Public License for more details.
13 
14    You should have received a copy of the GNU General Public License
15    along with this program; if not, write to the Free Software
16    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17    02110-1301, USA
18 */
19 
20 #ifndef KSIRKSKINEDITORTEXTITEM_H
21 #define KSIRKSKINEDITORTEXTITEM_H
22 
23 // include files for Qt
24 #include <QGraphicsTextItem>
25 #include <QObject>
26 #include <QPointF>
27 
28 // include files for KDE
29 
30 // include files for kde games
31 
32 class QGraphicsSceneMouseEvent;
33 
34 namespace KsirkSkinEditor
35 {
36 class TextItem : public QGraphicsTextItem
37 {
38 Q_OBJECT
39 
40 public:
41   /**
42     * Create the window and initializes its members
43     */
44   explicit TextItem(QGraphicsItem* parent=0);
45 
46   /**
47     * Deletes the background and the pool
48     */
49   ~TextItem() override;
50 
51 Q_SIGNALS:
52   void pressed(QGraphicsItem*,const QPointF&);
53   void placed(QGraphicsItem*, const QPointF&);
54 
55 protected:
56   void mousePressEvent(QGraphicsSceneMouseEvent* event) override;
57   void mouseReleaseEvent (QGraphicsSceneMouseEvent* event) override;
58 
59 };
60 
61 } // closing namespace KsirkSkinEditor
62 
63 #endif
64 
65