modify abstracttool iface
[yamf.git] / yamf / tools / polygons / polygons.h
blob8f10b0dfeeec57107c0829a1cd5be2e8c06fad3d
1 /***************************************************************************
2 * Copyright (C) 2007 by Jorge Cuadrado *
3 * kuadrosxx@gmail.com *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program 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 *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19 ***************************************************************************/
21 #ifndef POLYGONS_H
22 #define POLYGONS_H
25 #include <yamf/drawing/abstracttool.h>
26 #include <yamf/common/yamf_exports.h>
28 #include <QPointF>
30 namespace YAMF {
32 namespace Item {
33 class Polygon; }
35 namespace Drawing {
37 class BrushManager;
39 namespace Tool {
41 /**
42 * @ingroup tools
43 * @~spanish
44 * @brief Esta clase provee de una herramienta para la creación de poligonos.
45 * @author Jorge Cuadrado <kuadrosxx@gmail.com>
47 class YAMF_EXPORT Polygons: public Drawing::AbstractTool
49 Q_OBJECT
50 public:
51 Polygons(QObject *parent = 0);
52 virtual ~Polygons();
54 virtual void init(Photogram *photogram);
56 virtual QString id() const;
57 virtual void press(const QGraphicsSceneMouseEvent *input);
58 virtual void move(const QGraphicsSceneMouseEvent *input);
59 virtual void release(const QGraphicsSceneMouseEvent *input);
61 virtual DGui::Action *action() const;
63 int type() const;
65 virtual void aboutToChangeTool();
67 void setupConfigBar(QToolBar *configBar);
69 private slots:
70 void onChangeStart(double start);
72 private:
73 struct Private;
74 Private *const d;
81 #endif