modify abstracttool iface
[yamf.git] / yamf / tools / text / text.h
blob33077a76134dcf40050e8000f673fa95799e3e90
1 /***************************************************************************
2 * Copyright (C) 2007 Jorge Cuadrado *
3 * kuadrosxx@gmail.com *
4 * *
5 * This library is free software; you can redistribute it and/or *
6 * modify it under the terms of the GNU Lesser General Public *
7 * License as published by the Free Software Foundation; either *
8 * version 2.1 of the License, or (at your option) any later version. *
9 * *
10 * This library is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
13 * Lesser General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU Lesser General Public *
16 * License along with this library; if not, write to the Free Software *
17 * Foundation, Inc., *
18 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA *
19 ***************************************************************************/
21 #ifndef YAMF_DRAWING_TOOLTEXT_H
22 #define YAMF_DRAWING_TOOLTEXT_H
24 #include <yamf/drawing/abstracttool.h>
25 #include <yamf/common/yamf_exports.h>
27 class QKeyEvent;
29 class QFont;
31 namespace YAMF {
33 namespace Drawing {
35 namespace Tool {
37 /**
38 * @ingroup tools
39 * @brief Esta clase provee de una herramienta para insertar texto a la animaciĆ³n.
40 * @author Jorge Cuadrado <kuadrosxx@gmail.com>
42 class Text : public Drawing::AbstractTool
44 Q_OBJECT
45 public:
46 Text( QObject *parent = 0 );
47 virtual ~Text();
49 virtual void init(Photogram *photogram);
51 virtual QString id() const;
52 virtual void press(const QGraphicsSceneMouseEvent *input);
53 virtual void move(const QGraphicsSceneMouseEvent *input);
54 virtual void release(const QGraphicsSceneMouseEvent *input);
56 virtual DGui::Action *action() const;
58 int type() const;
60 virtual void aboutToChangeTool();
62 void setupConfigBar(QToolBar *configBar);
64 virtual void keyPressEvent(QKeyEvent *event);
66 private slots:
67 void onChangeFont();
68 void onEdited();
70 private:
71 struct Private;
72 Private *const d;
81 #endif